Skip to content

fix(banner): link colors - #8412

Merged
mcoker merged 8 commits into
patternfly:mainfrom
jcmill:bug/8403-banner-inline-links
Jun 23, 2026
Merged

mcoker merged 8 commits into
patternfly:mainfrom
jcmill:bug/8403-banner-inline-links

Conversation

@jcmill

@jcmill jcmill commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #8403

Fixes link text decoration colors. Links and their underlines now inherit the banner's text color tokens (on-danger, on-success, etc.) instead of using default link colors.

Summary by CodeRabbit

  • Style
    • Improved banner link styling so text-decoration-color is now consistently applied, including correct behavior for hover states.
    • Added dedicated theming variables for banner-level and link-level text-decoration color, ensuring inline link-styled buttons match banner link appearance.

@jcmill
jcmill requested review from andrew-ronaldson and mcoker May 18, 2026 13:37
@patternfly-build

patternfly-build commented May 18, 2026 •

Copy link
Copy Markdown
Collaborator

@coderabbitai

coderabbitai Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR updates the banner component's SCSS to introduce CSS custom properties for link text-decoration-color. Banner-level variables are defined, applied to anchor elements, and propagated through button .pf-m-link modifiers to ensure consistent text-decoration styling on colored banners.

Changes

Banner link text-decoration styling

Layer / File(s) Summary
Text-decoration color CSS custom properties and rules
src/patternfly/components/Banner/banner.scss
Added --<banner>--a--TextDecorationColor set to currentcolor and mapped it into --<banner>--m-link--TextDecorationColor and --<banner>--m-link--hover--TextDecorationColor. Applied text-decoration-color to anchor elements and extended the inline button .pf-m-link modifier to set button-level TextDecorationColor and hover variants from the banner link variables.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

released on @prerelease``

Suggested reviewers

  • mcoker
  • bekah-stephens
  • kaylachumley
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(banner): link colors' follows conventional commit format with proper prefix and clearly describes the banner link color fix.
Linked Issues check ✅ Passed Changes to banner.scss properly implement text-decoration-color support for links and inline buttons, directly addressing issue #8403's requirement to override text-decoration styles.
Out of Scope Changes check ✅ Passed All modifications are scoped to banner link styling and directly related to fixing text-decoration color inheritance for banner-specific background colors.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/patternfly/components/Banner/banner.scss (1)

81-83: ⚡ Quick win

Consider consolidating anchor element rules.

There are now two separate a element rules in the .#{$banner} block (lines 81-83 and lines 161-176). While the separation may be intentional for cascade ordering, consolidating them would improve maintainability and make the anchor styling easier to locate.

♻️ Proposed consolidation

Move the text-decoration-color rule into the existing anchor block:

-  a {
-    text-decoration-color: var(--#{$banner}--a--TextDecorationColor);
-  }
-
   &.pf-m-danger {
     --#{$banner}--BackgroundColor: var(--#{$banner}--m-danger--BackgroundColor);
     --#{$banner}--Color: var(--#{$banner}--m-danger--Color);

And update the existing anchor rule:

   a {
     color: var(--#{$banner}--link--Color);
     text-decoration-line: var(--#{$banner}--link--TextDecoration);
+    text-decoration-color: var(--#{$banner}--a--TextDecorationColor);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/patternfly/components/Banner/banner.scss` around lines 81 - 83, There are
duplicate anchor rules inside the .#{$banner} block: the isolated `a {
text-decoration-color: var(--#{$banner}--a--TextDecorationColor); }` should be
consolidated into the main anchor rule (the other `a` selector block that
contains the banner link styles) — move the `text-decoration-color` declaration
into that existing `a` block and remove the standalone `a` rule so all banner
anchor styles live in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/patternfly/components/Banner/banner.scss`:
- Line 26: Change the CSS value "currentColor" to lowercase "currentcolor" in
the banner CSS custom property declaration for
--#{$banner}--a--TextDecorationColor (located in banner.scss) so the keyword is
lowercase and satisfies stylelint; update that single declaration accordingly.

---

Nitpick comments:
In `@src/patternfly/components/Banner/banner.scss`:
- Around line 81-83: There are duplicate anchor rules inside the .#{$banner}
block: the isolated `a { text-decoration-color:
var(--#{$banner}--a--TextDecorationColor); }` should be consolidated into the
main anchor rule (the other `a` selector block that contains the banner link
styles) — move the `text-decoration-color` declaration into that existing `a`
block and remove the standalone `a` rule so all banner anchor styles live in one
place.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 29ba05d1-f84a-4920-a940-42c6be769fc9

📥 Commits

Reviewing files that changed from the base of the PR and between 7d298e4 and cadfae8.

📒 Files selected for processing (1)
  • src/patternfly/components/Banner/banner.scss

Comment thread src/patternfly/components/Banner/banner.scss Outdated
Comment thread src/patternfly/components/Banner/banner.scss Outdated
Comment thread src/patternfly/components/Banner/banner.scss Outdated
Comment thread src/patternfly/components/Banner/banner.scss Outdated
@jcmill
jcmill requested a review from mcoker June 23, 2026 16:28
Comment thread src/patternfly/components/Banner/banner.scss Outdated
Comment thread src/patternfly/components/Banner/banner.scss Outdated

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦸‍♂️

@mcoker
mcoker merged commit 05a468c into patternfly:main Jun 23, 2026
6 checks passed
@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.6.0-prerelease.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - Banner - text decoration on Inline links broken.

5 participants