feat(card): limit box shadows to glass only, undo card view demo changes - #8306
Conversation
WalkthroughRemoved shared box-shadow tokens and default box-shadow assignments from Card styles so only glass-variant cards explicitly apply a shadow. Updated gallery demo templates: removed a duplicate gallery, removed Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
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 |
|
Preview: https://pf-pr-8306.surge.sh A11y report: https://pf-pr-8306-a11y.surge.sh |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/patternfly/components/Card/card.scss`:
- Around line 305-306: The glass modifier in card.scss has box-shadow before
backdrop-filter which violates the configured property order; in the block
containing the variables var(--#{$card}--m-glass--BackdropFilter) and
var(--#{$card}--m-glass--BoxShadow) (search for box-shadow:
var(--#{$card}--m-glass--BoxShadow)), swap the two declarations so
backdrop-filter: var(--#{$card}--m-glass--BackdropFilter) appears before
box-shadow: var(--#{$card}--m-glass--BoxShadow) to satisfy stylelint.
🪄 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: 6aaab6a0-ea17-4db4-8bec-27ef5e8704c0
📒 Files selected for processing (3)
src/patternfly/components/Card/card.scsssrc/patternfly/demos/Card/card-template-gallery.hbssrc/patternfly/demos/CardView/examples/CardView.md
💤 Files with no reviewable changes (1)
- src/patternfly/demos/CardView/examples/CardView.md
mcoker
left a comment
There was a problem hiding this comment.
Just one comment, otherwise lgtm!
| --#{$card}--BoxShadow: var(--#{$card}--m-glass--BoxShadow); | ||
|
|
||
| backdrop-filter: var(--#{$card}--m-glass--BackdropFilter); | ||
| box-shadow: var(--#{$card}--m-glass--BoxShadow); |
There was a problem hiding this comment.
Looks like there is a conflict. Main should pull in a change where the .pf-m-glass modifier is wrapped in :where(.pf-v6-theme-glass) and the style block is at the top of the card CSS. IMO I'd remove this block here in favor of the block that comes from main, but you'd update that block to set box-shadow: var(--#{$card}--m-glass--BoxShadow); instead of --#{$card}--BoxShadow: var(--#{$card}--m-glass--BoxShadow); to work with the updates you've made here.
lboehling
left a comment
There was a problem hiding this comment.
design looks good to me! thank you!
|
🎉 This PR is included in version 6.5.0-prerelease.70 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #8231
Assisted by Claude Code running Opus 4.6
Convenience link: https://pf-pr-8306.surge.sh/components/card
Summary by CodeRabbit
Refactor
Documentation