Skip to content

feat(card): update card to use unified theme tokens#8180

Closed
wise-king-sullyman wants to merge 35 commits into
patternfly:mainfrom
wise-king-sullyman:card-unified-theme-token-updates
Closed

feat(card): update card to use unified theme tokens#8180
wise-king-sullyman wants to merge 35 commits into
patternfly:mainfrom
wise-king-sullyman:card-unified-theme-token-updates

Conversation

@wise-king-sullyman

@wise-king-sullyman wise-king-sullyman commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

Closes #8086

Figma: https://www.figma.com/design/qRn3S225WwGHIdgGZX0LTC/Unified-Theme--Design-Tokens--Styles---Specs?node-id=9552-14258&p=f&t=AmaPrRnVNe38gCx6-0

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

Summary by CodeRabbit

  • Style
    • Migrated icons from Font Awesome to the PatternFly icon system across Card demos, templates, and gallery examples for consistent visuals and accessible markup.
    • Updated card styling: subtler default borders, new base card shadow, explicit selectable border widths/colors, and refined tile/secondary card background, border, and shadow defaults to improve appearance and state consistency.

@coderabbitai

coderabbitai Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

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

Replaces inline Font Awesome/pficon <i> markup with the pfIcon helper across Card templates and updates Card SCSS tokens: adds card box-shadow, adjusts border colors/widths, and introduces as-tile/tile/selectable state defaults and overrides.

Changes

Cohort / File(s) Summary
Icon migration to pfIcon
src/patternfly/components/Card/card-header-toggle-icon.hbs, src/patternfly/demos/Card/card-template-gallery.hbs, src/patternfly/demos/Card/examples/Card.md, src/patternfly/demos/Card/templates/card-demo--popover-table.hbs, src/patternfly/demos/Card/templates/card-demo--status-card.hbs, src/patternfly/demos/Card/templates/card-demo--template-gallery.hbs, src/patternfly/demos/Card/templates/card-template-data-list.hbs, src/patternfly/demos/Card/templates/card-template-events.hbs, src/patternfly/demos/Card/templates/card-template-expandable-status-card.hbs, src/patternfly/demos/Card/templates/card-template-expandable-status.hbs, src/patternfly/demos/Card/templates/card-template-status.hbs
Replaced raw <i> Font Awesome/pficon markup with PatternFly icon composition using {{pfIcon "..."}} inside icon/icon-content blocks; alters icon DOM structure while preserving layout and behavior.
Card component styling (token updates)
src/patternfly/components/Card/card.scss
Added base card box-shadow variable and applied it; adjusted default BorderColor and explicit selectable BorderWidth/BorderColor; introduced as-tile background/border defaults and tile/selectable/secondary/plain state overrides and box-shadow propagation.

Sequence Diagram(s)

(Skipped — changes are template/style updates without new multi-component runtime flow.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related issues

  • Card: add tile variant #8088: SCSS adds "as-tile" defaults and tile-specific background/border/box-shadow rules that align with the tile-variant objectives described in that issue.

Possibly related PRs

Suggested labels

released on @prerelease``

Suggested reviewers

  • srambach
  • lboehling
🚥 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 follows conventional commit guidelines with correct format (feat(scope): description) and accurately describes the main objective of updating Card component styling.
Linked Issues check ✅ Passed The changes comprehensively implement the linked issue #8086 requirements: replacing Font Awesome icons with PatternFly icon helpers, updating card styling with unified theme tokens, and applying new visual design patterns per the Figma specification.
Out of Scope Changes check ✅ Passed All changes remain in scope: icon migrations to PatternFly components and card styling updates align with the unified theme token objective; glass styles are properly excluded as specified.

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

📝 Coding Plan
  • Generate coding plan for human review comments

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 Feb 26, 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: 4

🤖 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`:
- Line 9: The global card box-shadow variable (--#{$card}--BoxShadow) is being
applied to all cards causing .pf-m-plain cards to keep elevation; update the
stylesheet so plain cards do not inherit it by either changing the rule that
applies the variable (or the box-shadow usage) to exclude elements with the
.pf-m-plain modifier, or explicitly reset the variable for the plain modifier
(e.g. add a .pf-m-plain selector that sets --#{$card}--BoxShadow: none or 0) so
.pf-m-plain cards have no elevation.
- Around line 209-212: The current selector "&.pf-m-selectable" is too broad and
applies the tile variables to all selectable cards; narrow it so the tile
background/border tokens only apply when the card is also in the tile mode by
changing the selector to require both classes (e.g., use a combined selector
such as &:is(.pf-m-selectable.pf-m-as-tile) or &.pf-m-selectable.pf-m-as-tile)
where the variables --#{$card}--m-as-tile--BackgroundColor and
--#{$card}--m-as-tile--BorderColor are set, ensuring only tile cards receive
those tokens.

In `@src/patternfly/demos/Card/examples/Card.md`:
- Around line 582-586: The icon used for the "Ready" status is semantically
incorrect: inside the template block with icon-content--modifier="pf-m-success"
the helper pfIcon is rendering "rh-ui-error"; update the template in Card.md so
the pfIcon invocation uses a success icon (replace "rh-ui-error" with
"rh-ui-check-circle") so the icon matches the pf-m-success modifier.
- Around line 633-637: The icon markup uses the error icon name "rh-ui-error"
while applying the success modifier "pf-m-success" (in the icon-content and
pfIcon usage), causing a semantic mismatch; update the pfIcon call to use the
success icon (e.g., "rh-ui-success") when rendering the Ready status so the icon
name matches the pf-m-success modifier (or, if the intent is to show an error,
change the modifier to pf-m-danger instead) — look for the template block with
the icon partials (icon, icon-content) and the pfIcon "rh-ui-error" and make the
appropriate replacement.

ℹ️ Review info

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

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 744794d and accd575.

📒 Files selected for processing (12)
  • src/patternfly/components/Card/card-header-toggle-icon.hbs
  • src/patternfly/components/Card/card.scss
  • src/patternfly/demos/Card/card-template-gallery.hbs
  • src/patternfly/demos/Card/examples/Card.md
  • src/patternfly/demos/Card/templates/card-demo--popover-table.hbs
  • src/patternfly/demos/Card/templates/card-demo--status-card.hbs
  • src/patternfly/demos/Card/templates/card-demo--template-gallery.hbs
  • src/patternfly/demos/Card/templates/card-template-data-list.hbs
  • src/patternfly/demos/Card/templates/card-template-events.hbs
  • src/patternfly/demos/Card/templates/card-template-expandable-status-card.hbs
  • src/patternfly/demos/Card/templates/card-template-expandable-status.hbs
  • src/patternfly/demos/Card/templates/card-template-status.hbs

Comment thread src/patternfly/components/Card/card.scss
Comment thread src/patternfly/components/Card/card.scss Outdated
Comment on lines 582 to 586
{{#> icon-content icon-content--modifier="pf-m-success"}}
<i class="fas fa-exclamation-circle" aria-hidden="true"></i>
{{pfIcon "rh-ui-error"}}
{{/icon-content}}
{{/icon}}
{{/l-flex-item}}

@coderabbitai coderabbitai Bot Feb 26, 2026

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.

⚠️ Potential issue | 🟡 Minor

Semantic mismatch: error icon used with success modifier.

The icon rh-ui-error is used inside icon-content--modifier="pf-m-success" for a "Ready" status. This appears to be a copy-paste error. A "Ready" state should use a success-themed icon like rh-ui-check-circle.

🐛 Proposed fix
                   {{#> icon icon--modifier="pf-m-inline"}}
                     {{#> icon-content icon-content--modifier="pf-m-success"}}
-                    {{pfIcon "rh-ui-error"}}
+                    {{pfIcon "rh-ui-check-circle"}}
                     {{/icon-content}}
                   {{/icon}}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{#> icon-content icon-content--modifier="pf-m-success"}}
<i class="fas fa-exclamation-circle" aria-hidden="true"></i>
{{pfIcon "rh-ui-error"}}
{{/icon-content}}
{{/icon}}
{{/l-flex-item}}
{{#> icon-content icon-content--modifier="pf-m-success"}}
{{pfIcon "rh-ui-check-circle"}}
{{/icon-content}}
{{/icon}}
{{/l-flex-item}}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/patternfly/demos/Card/examples/Card.md` around lines 582 - 586, The icon
used for the "Ready" status is semantically incorrect: inside the template block
with icon-content--modifier="pf-m-success" the helper pfIcon is rendering
"rh-ui-error"; update the template in Card.md so the pfIcon invocation uses a
success icon (replace "rh-ui-error" with "rh-ui-check-circle") so the icon
matches the pf-m-success modifier.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is funky, but it matches what we had before.

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.

@wise-king-sullyman, understood! If this preserves the existing behavior from before the icon migration, then maintaining consistency makes sense for this PR. Thanks for clarifying.

Comment on lines 633 to 637
{{#> icon icon--modifier="pf-m-inline"}}
{{#> icon-content icon-content--modifier="pf-m-success"}}
<i class="fas fa-exclamation-circle" aria-hidden="true"></i>
{{pfIcon "rh-ui-error"}}
{{/icon-content}}
{{/icon}}

@coderabbitai coderabbitai Bot Feb 26, 2026

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.

⚠️ Potential issue | 🟡 Minor

Same semantic mismatch: error icon with success modifier.

Same issue as above - using rh-ui-error with pf-m-success for "Ready" status.

🐛 Proposed fix
                   {{#> icon icon--modifier="pf-m-inline"}}
                     {{#> icon-content icon-content--modifier="pf-m-success"}}
-                    {{pfIcon "rh-ui-error"}}
+                    {{pfIcon "rh-ui-check-circle"}}
                     {{/icon-content}}
                   {{/icon}}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{#> icon icon--modifier="pf-m-inline"}}
{{#> icon-content icon-content--modifier="pf-m-success"}}
<i class="fas fa-exclamation-circle" aria-hidden="true"></i>
{{pfIcon "rh-ui-error"}}
{{/icon-content}}
{{/icon}}
{{#> icon icon--modifier="pf-m-inline"}}
{{#> icon-content icon-content--modifier="pf-m-success"}}
{{pfIcon "rh-ui-check-circle"}}
{{/icon-content}}
{{/icon}}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/patternfly/demos/Card/examples/Card.md` around lines 633 - 637, The icon
markup uses the error icon name "rh-ui-error" while applying the success
modifier "pf-m-success" (in the icon-content and pfIcon usage), causing a
semantic mismatch; update the pfIcon call to use the success icon (e.g.,
"rh-ui-success") when rendering the Ready status so the icon name matches the
pf-m-success modifier (or, if the intent is to show an error, change the
modifier to pf-m-danger instead) — look for the template block with the icon
partials (icon, icon-content) and the pfIcon "rh-ui-error" and make the
appropriate replacement.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is funky, but it matches what we had before.

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.

@wise-king-sullyman, understood! Since you're preserving the existing behavior from the previous implementation, that makes sense for this PR's scope. I won't push for this change. Thanks for the clarification!

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

♻️ Duplicate comments (2)
src/patternfly/components/Card/card.scss (2)

108-110: ⚠️ Potential issue | 🟠 Major

Plain cards still inherit elevation from the new global shadow.

Line 129 applies --#{$card}--BoxShadow globally, but .pf-m-plain (Line 256-259) does not reset it, so plain cards can still render with elevation.

Proposed fix
   // Plain - no border or background color
   --#{$card}--m-plain--BorderColor: transparent;
   --#{$card}--m-plain--BackgroundColor: transparent;
+  --#{$card}--m-plain--BoxShadow: none;
   &.pf-m-plain {
     --#{$card}--BorderColor: var(--#{$card}--m-plain--BorderColor);
     --#{$card}--BackgroundColor: var(--#{$card}--m-plain--BackgroundColor);
+    --#{$card}--BoxShadow: var(--#{$card}--m-plain--BoxShadow);
   }

Also applies to: 129-129, 256-259

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/patternfly/components/Card/card.scss` around lines 108 - 110, The plain
card variant is not resetting the global box-shadow variable, so update the
.pf-m-plain rule to reset the shadow by setting --#{$card}--BoxShadow: none (or
0 0 transparent) and ensure any applied box-shadow on .pf-c-card uses that
variable; modify the .pf-m-plain selector in card.scss to explicitly clear the
shadow using the --#{$card}--BoxShadow variable so plain cards do not inherit
elevation from the global BoxShadow declaration.

209-213: ⚠️ Potential issue | 🟠 Major

As-tile styling is still scoped too broadly to all selectable cards.

Line 210 (&.pf-m-selectable) applies tile background/border tokens to non-tile selectable cards too.

Proposed fix
-  `@at-root` .#{$card}__actions:has(> .#{$card}__selectable-actions input.#{$pf-prefix}screen-reader), // targets "card as tile", which are selectable cards with inputs
-  &.pf-m-selectable {
+  // Target only card-as-tile (selectable cards with screen-reader input)
+  &:has(.#{$card}__selectable-actions input.#{$pf-prefix}screen-reader) {
     --#{$card}--BackgroundColor: var(--#{$card}--m-as-tile--BackgroundColor);
     --#{$card}--BorderColor: var(--#{$card}--m-as-tile--BorderColor);
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/patternfly/components/Card/card.scss` around lines 209 - 213, The
selector currently applies as-tile tokens to all selectable cards because it
uses &.pf-m-selectable; narrow the selector to only target selectable cards that
are also "as-tile" by combining the modifiers—for example replace
&.pf-m-selectable with &.pf-m-selectable.pf-m-as-tile (or the equivalent class
interpolation for the as-tile modifier) so the block that sets
--#{$card}--BackgroundColor and --#{$card}--BorderColor from
--#{$card}--m-as-tile--BackgroundColor / --#{$card}--m-as-tile--BorderColor only
runs for cards that are both pf-m-selectable and pf-m-as-tile (referencing
.#{$card}__actions, .#{$card}__selectable-actions and the pf-prefix
screen-reader selector in the same rule).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@src/patternfly/components/Card/card.scss`:
- Around line 108-110: The plain card variant is not resetting the global
box-shadow variable, so update the .pf-m-plain rule to reset the shadow by
setting --#{$card}--BoxShadow: none (or 0 0 transparent) and ensure any applied
box-shadow on .pf-c-card uses that variable; modify the .pf-m-plain selector in
card.scss to explicitly clear the shadow using the --#{$card}--BoxShadow
variable so plain cards do not inherit elevation from the global BoxShadow
declaration.
- Around line 209-213: The selector currently applies as-tile tokens to all
selectable cards because it uses &.pf-m-selectable; narrow the selector to only
target selectable cards that are also "as-tile" by combining the modifiers—for
example replace &.pf-m-selectable with &.pf-m-selectable.pf-m-as-tile (or the
equivalent class interpolation for the as-tile modifier) so the block that sets
--#{$card}--BackgroundColor and --#{$card}--BorderColor from
--#{$card}--m-as-tile--BackgroundColor / --#{$card}--m-as-tile--BorderColor only
runs for cards that are both pf-m-selectable and pf-m-as-tile (referencing
.#{$card}__actions, .#{$card}__selectable-actions and the pf-prefix
screen-reader selector in the same rule).

ℹ️ Review info

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

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between accd575 and 7b59e35.

📒 Files selected for processing (1)
  • src/patternfly/components/Card/card.scss

@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 209-214: Update the stale comment above the tile-mode selector to
describe what the rule actually does: when the whole card is clickable and the
card actions are invisible (selectors using .#{$card}__actions and
.#{$card}__selectable-actions with input.#{$pf-prefix}screen-reader), the rule
applies tile-mode visual variables by setting --#{$card}--BackgroundColor and
--#{$card}--BorderColor to their m-as-tile variants; replace the old "remove the
padding/margin" wording with a concise note that this block switches the card to
tile visual styles (background and border) for clickable/selectable cards.

ℹ️ Review info

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

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b59e35 and 0d60d24.

📒 Files selected for processing (1)
  • src/patternfly/components/Card/card.scss

Comment on lines +209 to +214
// when the whole card is clickable and the card actions are invisible, remove the padding/margin so it doesn't take up space
@at-root .#{$card}__actions:has(> .#{$card}__selectable-actions input.#{$pf-prefix}screen-reader), // targets "card as tile", which are selectable cards with inputs
&:has(.#{$card}__selectable-actions input.#{$pf-prefix}screen-reader) {
--#{$card}--BackgroundColor: var(--#{$card}--m-as-tile--BackgroundColor);
--#{$card}--BorderColor: var(--#{$card}--m-as-tile--BorderColor);
}

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.

⚠️ Potential issue | 🟡 Minor

Update the stale inline comment above the tile-mode selector.

The comment says this block removes actions padding/margin, but the block now sets tile background/border variables. Please align the comment with current behavior to avoid future misreads.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/patternfly/components/Card/card.scss` around lines 209 - 214, Update the
stale comment above the tile-mode selector to describe what the rule actually
does: when the whole card is clickable and the card actions are invisible
(selectors using .#{$card}__actions and .#{$card}__selectable-actions with
input.#{$pf-prefix}screen-reader), the rule applies tile-mode visual variables
by setting --#{$card}--BackgroundColor and --#{$card}--BorderColor to their
m-as-tile variants; replace the old "remove the padding/margin" wording with a
concise note that this block switches the card to tile visual styles (background
and border) for clickable/selectable cards.

@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

♻️ Duplicate comments (1)
src/patternfly/components/Card/card.scss (1)

209-214: ⚠️ Potential issue | 🟡 Minor

Inline comment is stale for the selector block behavior.

Line [209] still mentions removing padding/margin, but this block now sets tile background/border variables (Lines [212-213]).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/patternfly/components/Card/card.scss` around lines 209 - 214, The
existing inline comment incorrectly says this selector "removes padding/margin"
but the selector block (.#{$card}__actions:has(> .#{$card}__selectable-actions
input.#{$pf-prefix}screen-reader and &:has(.#{$card}__selectable-actions
input.#{$pf-prefix}screen-reader)) actually sets tile-specific CSS variables
(--#{$card}--BackgroundColor and --#{$card}--BorderColor); update the comment to
accurately describe that this rule applies to cards rendered "as tile" with
selectable actions/screen-reader inputs and overrides the card background and
border variables to the m-as-tile values (remove the padding/margin claim and
mention the variable overrides and intent).
🤖 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 251-254: The .pf-m-secondary .pf-m-selectable/.pf-m-clickable rule
is overriding the .pf-m-current and .pf-m-selected border styles; update the CSS
so secondary selectable/clickable cards do not clobber selected/current borders
by adding more specific rules that restore the selected/current variables for
secondary cards (e.g. add selectors like
.pf-m-secondary.pf-m-selectable.pf-m-current,
.pf-m-secondary.pf-m-selectable.pf-m-selected, and the same for .pf-m-clickable
to set --#{$card}--BorderColor and --#{$card}--BorderWidth back to the
selected/current variable values), or alternatively scope the original rule to
exclude .pf-m-current and .pf-m-selected (using
:not(.pf-m-current):not(.pf-m-selected)) so the secondary selectable/clickable
variables only apply when the card is not selected/current.

---

Duplicate comments:
In `@src/patternfly/components/Card/card.scss`:
- Around line 209-214: The existing inline comment incorrectly says this
selector "removes padding/margin" but the selector block
(.#{$card}__actions:has(> .#{$card}__selectable-actions
input.#{$pf-prefix}screen-reader and &:has(.#{$card}__selectable-actions
input.#{$pf-prefix}screen-reader)) actually sets tile-specific CSS variables
(--#{$card}--BackgroundColor and --#{$card}--BorderColor); update the comment to
accurately describe that this rule applies to cards rendered "as tile" with
selectable actions/screen-reader inputs and overrides the card background and
border variables to the m-as-tile values (remove the padding/margin claim and
mention the variable overrides and intent).

ℹ️ Review info

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

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d60d24 and 948651d.

📒 Files selected for processing (2)
  • src/patternfly/components/Card/card-header-toggle-icon.hbs
  • src/patternfly/components/Card/card.scss

Comment thread src/patternfly/components/Card/card.scss Outdated
--#{$card}__header-toggle-icon--TransitionTimingFunction: var(--pf-t--global--motion--timing-function--default);
--#{$card}__header-toggle-icon--TransitionDuration: var(--pf-t--global--motion--duration--icon--default);
--#{$card}--m-expanded__header-toggle-icon--Rotate: 90deg;
--#{$card}--m-expanded__header-toggle-icon--Rotate: -180deg;

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.

🔥

@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 252-256: The selector uses chained :not() pseudo-classes which
breaks the stylelint selector-not-notation rule; update the two selectors (the
ones starting with &.pf-m-selectable and &.pf-m-clickable) to use a single
complex :not() with a comma-separated list like :not(.pf-m-current,
.pf-m-selected) and keep the existing CSS custom property assignments (e.g.,
--#{$card}--BorderColor and --#{$card}--BorderWidth) unchanged.

ℹ️ Review info

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

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 948651d and c548355.

📒 Files selected for processing (1)
  • src/patternfly/components/Card/card.scss

Comment thread src/patternfly/components/Card/card.scss Outdated
@lboehling

Copy link
Copy Markdown

hey @wise-king-sullyman! this all is looking really good -- wondering if we can go ahead and add a border--color--subtle/border--width--box--default to the static (non clickable/selectable) secondary card variant too? This wasn't noted in the designs, but i think it'll help make it looks more consistent esp in glass mode now that i'm seeing it in build. Thank you!

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

lgtm! thanks austin!

I'll note that the basic static cards kinda blend into the background in dark/default mode but i am going to tweak the box shadow and subtle border color tokens slightly so it appears more contrasted in non-glass modes -- no additional work needed for those updates in the card component itself since they'll come with the global token values!

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

Left a few commens. One other thing I noticed is that we're using both filled and outlined status icons, and I wasn't sure if that was on purpose or not?

Here's the backstop report for reference

Comment thread src/patternfly/demos/Card/templates/card-demo--template-gallery.hbs Outdated
Comment thread src/patternfly/demos/Card/templates/card-template-expandable-status-card.hbs Outdated
Comment thread src/patternfly/demos/Card/templates/card-template-expandable-status.hbs Outdated
Comment thread src/patternfly/demos/Card/templates/card-template-expandable-status.hbs Outdated
Comment on lines +116 to +117
--#{$card}--m-as-tile--BackgroundColor: var(--pf-t--global--background--color--control--default);
--#{$card}--m-as-tile--BorderColor: var(--pf-t--global--border--color--control--default);

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.

Also I saw we have a follow up design issue to add a tile variant of card. If so, and you think we'll have a .pf-m-tile modifier class for tiles, I would rename these vars to --m-tile instead of --m-as-tile since that's how we usually name variants. If you don't anticipate us adding the modifier class, you can always just use --tile in the var name. I would love to have a modifier for this though, instead of detecting whether it has an input with screen reader text, since that's pretty fragile.

@mcoker

mcoker commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

closing in favor of #8219

@mcoker mcoker closed this Mar 13, 2026
@wise-king-sullyman

Copy link
Copy Markdown
Collaborator Author

Closing as we merged #8219 instead

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Card: Token updates for unified theme

8 participants