fix(banner): link colors - #8412
Conversation
|
Preview: https://pf-pr-8412.surge.sh A11y report: https://pf-pr-8412-a11y.surge.sh |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis PR updates the banner component's SCSS to introduce CSS custom properties for link ChangesBanner link text-decoration styling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/patternfly/components/Banner/banner.scss (1)
81-83: ⚡ Quick winConsider consolidating anchor element rules.
There are now two separate
aelement 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-colorrule 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
📒 Files selected for processing (1)
src/patternfly/components/Banner/banner.scss
Co-authored-by: Michael Coker <[email protected]>
Co-authored-by: Michael Coker <[email protected]>
Co-authored-by: Michael Coker <[email protected]>
|
🎉 This PR is included in version 6.6.0-prerelease.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
text-decoration-coloris now consistently applied, including correct behavior for hover states.