Skip to content

feat(icon): add rh-standard icon styling - #8280

Merged
mcoker merged 2 commits into
patternfly:mainfrom
kmcfaul:rhds-standard-icon
Apr 6, 2026
Merged

feat(icon): add rh-standard icon styling#8280
mcoker merged 2 commits into
patternfly:mainfrom
kmcfaul:rhds-standard-icon

Conversation

@kmcfaul

@kmcfaul kmcfaul commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Closes #8071.

Add .pf-v6-icon-rh-standard to any icon to test the styling, as I don't believe core uses any RH standard set icons atm.

--pf-t--global--icon--color--brand--default feels like the more correct token to use here, but it currently does not change in the redhat theme so I'm currently using the accent color token instead.

Summary by CodeRabbit

  • Style
    • Added a new standard icon style with fixed dimensions (3rem) to ensure consistent sizing across the UI.
    • The icon now uses the brand accent color token for consistent theming and visual alignment with brand styling.

@coderabbitai

coderabbitai Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 0dbbd88b-7727-4043-ba9d-f4cb916a2e5f

📥 Commits

Reviewing files that changed from the base of the PR and between 75504fb and c00c70a.

📒 Files selected for processing (1)
  • src/patternfly/base/patternfly-svg-icons.scss
✅ Files skipped from review due to trivial changes (1)
  • src/patternfly/base/patternfly-svg-icons.scss

Walkthrough

Added a new PatternFly SVG icon CSS class selector .#{$pf-prefix}icon-rh-standard that sets width: 3rem, height: 3rem, and color: var(--pf-t--global--icon--color--brand--accent--default).

Changes

Cohort / File(s) Summary
RHDS Standard Icon Styling
src/patternfly/base/patternfly-svg-icons.scss
Added new .#{$pf-prefix}icon-rh-standard selector with width: 3rem, height: 3rem, and brand accent color token.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

released on @prerelease``

Suggested reviewers

  • mcoker
  • andrew-ronaldson
  • srambach
  • bekah-stephens
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR implementation does not fully meet the linked issue #8071 requirements: size is set to 3rem instead of 3/4em, and color uses accent token instead of the brand color token as specified. Adjust the size from 3rem to 3/4em and use the brand color token instead of the accent color token to match #8071 requirements exactly.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(icon): add rh-standard icon styling' follows conventional commit guidelines with proper 'feat' type prefix and descriptive scope.
Out of Scope Changes check ✅ Passed The changes are scoped to adding a single CSS class for the RH standard icon styling and are directly related to the linked issue #8071 objectives.

✏️ 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.

@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/base/patternfly-svg-icons.scss`:
- Around line 24-30: The .#{$pf-prefix}icon-rh-standard rule uses incorrect
sizing and property: change width and height from 3em to 0.75em (3/4em) and
replace the color declaration with an SVG fill using the brand token (use fill:
var(--pf-t--global--color--brand--accent--default)) so the selector
.#{$pf-prefix}icon-rh-standard sets width: 0.75em; height: 0.75em; and fill:
var(--pf-t--global--color--brand--accent--default).
🪄 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: 56a51542-90b8-427d-aeba-8077db4cf687

📥 Commits

Reviewing files that changed from the base of the PR and between 9fc1a6b and 75504fb.

📒 Files selected for processing (1)
  • src/patternfly/base/patternfly-svg-icons.scss

Comment on lines +24 to +30
.#{$pf-prefix}icon-rh-standard {
width: 3em;
height: 3em;

// color: var(--pf-t--global--icon--color--brand--default);
color: var(--pf-t--global--color--brand--accent--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.

⚠️ Potential issue | 🟠 Major

Requirement mismatch: RH standard icon variant uses wrong size and color property

Line 25 and Line 26 set 3em, but the objective calls for 3/4em (0.75em). Also, Line 29 sets color, while the requirement asks for SVG fill using the brand token.

Proposed fix
 .#{$pf-prefix}icon-rh-standard {
-  width: 3em;
-  height: 3em;
+  width: .75em;
+  height: .75em;
 
-  // color: var(--pf-t--global--icon--color--brand--default);
-  color: var(--pf-t--global--color--brand--accent--default);
+  fill: var(--pf-t--global--icon--color--brand--accent--default);
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/patternfly/base/patternfly-svg-icons.scss` around lines 24 - 30, The
.#{$pf-prefix}icon-rh-standard rule uses incorrect sizing and property: change
width and height from 3em to 0.75em (3/4em) and replace the color declaration
with an SVG fill using the brand token (use fill:
var(--pf-t--global--color--brand--accent--default)) so the selector
.#{$pf-prefix}icon-rh-standard sets width: 0.75em; height: 0.75em; and fill:
var(--pf-t--global--color--brand--accent--default).

@patternfly-build

patternfly-build commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator

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

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.

Icons: create rhds standard icon variant

3 participants