Skip to content

feat(card): limit box shadows to glass only, undo card view demo changes - #8306

Merged
mcoker merged 3 commits into
patternfly:mainfrom
wise-king-sullyman:card-glass-pr-design-followup
Apr 15, 2026
Merged

feat(card): limit box shadows to glass only, undo card view demo changes#8306
mcoker merged 3 commits into
patternfly:mainfrom
wise-king-sullyman:card-glass-pr-design-followup

Conversation

@wise-king-sullyman

@wise-king-sullyman wise-king-sullyman commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

Closes #8231

Assisted by Claude Code running Opus 4.6

Convenience link: https://pf-pr-8306.surge.sh/components/card

Summary by CodeRabbit

  • Refactor

    • Simplified card shadow behavior for more consistent rendering; glass-style cards now apply their shadow explicitly.
  • Documentation

    • Added more card gallery examples, including additional selectable and disabled variations.
    • Removed duplicate gallery examples from the CardView docs to reduce redundancy and improve clarity.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Removed 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 pf-m-secondary from first card, and added several new card instances (cards 4–10) with selectable/selected variations.

Changes

Cohort / File(s) Summary
Card Styling
src/patternfly/components/Card/card.scss
Removed root/shared --*--BoxShadow token assignments and box-shadow usage from the base card rules; added an explicit box-shadow declaration to the .pf-m-glass variant.
Demo Template Gallery
src/patternfly/demos/Card/card-template-gallery.hbs
Removed pf-m-secondary from first gallery card; added card instances -card-4 through -card-10 with complete header/actions/title/body and selectable/selected state variants.
CardView Example
src/patternfly/demos/CardView/examples/CardView.md
Removed duplicate gallery section renders, leaving a single gallery instance before pagination.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

released on @prerelease``

Suggested reviewers

  • mcoker
  • thatblindgeye
  • srambach
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title follows conventional commit format with 'feat' prefix and clearly describes the main changes: limiting box shadows to glass variant and reverting demo changes.
Linked Issues check ✅ Passed The PR successfully implements issue #8231 requirements: removes box-shadow from default/secondary/clickable card variants while preserving them only for glass-modified cards.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue: card SCSS modifications align with design requirements, and demo file changes explicitly revert earlier unrelated modifications.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 and usage tips.

@patternfly-build

patternfly-build commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

@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

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8e414b8 and a619711.

📒 Files selected for processing (3)
  • src/patternfly/components/Card/card.scss
  • src/patternfly/demos/Card/card-template-gallery.hbs
  • src/patternfly/demos/CardView/examples/CardView.md
💤 Files with no reviewable changes (1)
  • src/patternfly/demos/CardView/examples/CardView.md

Comment thread src/patternfly/components/Card/card.scss Outdated
@wise-king-sullyman
wise-king-sullyman requested review from a team, lboehling and mcoker April 13, 2026 20:09

@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.

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);

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.

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 lboehling left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

design looks good to me! thank you!

@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 d4780be into patternfly:main Apr 15, 2026
5 checks passed
@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.5.0-prerelease.70 🎉

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.

Card: Glass PR Design Followup

4 participants