-
Notifications
You must be signed in to change notification settings - Fork 53
Increase specificity of custom fill in PricingOptions #1044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…istItem and UnorderedList.Item.
🦋 Changeset detectedLatest commit: 9fe22ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟢 No design token changes found |
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Bumps CSS specificity for custom icon fills by applying the fill
value as an inline style, ensuring it overrides conflicting rules.
- Adds
style.fill
toListItem
leading visuals whenleadingVisualFill
is defined - Updates the changeset to describe the specificity increase
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/react/src/list/ListItem/ListItem.tsx | Inline style.fill added to iconProps for greater specificity |
.changeset/blue-bees-battle.md | Change description updated to reflect specificity bump |
Comments suppressed due to low confidence (2)
.changeset/blue-bees-battle.md:2
- The changeset header references
@primer/react-brand
but the updated code is in@primer/react
. Update the package name to ensure the patch is applied correctly.
'@primer/react-brand': patch
packages/react/src/list/ListItem/ListItem.tsx:45
- There are no tests verifying that the inline
style.fill
is applied correctly. Add or update unit tests to cover the new behavior whenleadingVisualFill
is provided.
const iconProps = {fill: leadingVisualFill, 'aria-label': leadingVisualAriaLabel, style: {fill: leadingVisualFill}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Summary
Resolves https://github.com/github/primer/issues/5302
Bumps up the CSS specificity of
fill
on custom leading icons in bothPricingOptions.FeatureListItem
andUnorderedList.Item
. Does so by applying the fill throughstyle
, assuming it's notundefined
.Note: This issue occurs specifically in dotcom, where the
.octicon
CSS styles forfill
overrides the HTMLfill
attribute.Verified the Canary in dotcom Storybook, now works as expected 👇
This update also fixes the ✔️ and ❌ icons, which previously weren't showing the correct colors for the same reason (screenshots below)
🔗 Preview link from Primer Brand Storybook
List of notable changes:
fill
value as an inline style, so that dynamic values can continue to be passed through. Only applies if defined.Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
update snapshots
label to the PR)Reviewer checklist:
Screenshots: