Update badge icon 1.3.0#3576
Conversation
❌ Deploy Preview for boosted failed. Why did it fail? →
|
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR updates the badge-icon component to align with the newer design tokens (system tokens 2.4.0) and the “Update badge - icon 1.3” spec, including new icon assets and additional supported sizes.
Changes:
- Added xsmall and small size variants for badge-icon documentation and styling.
- Reworked functional status badge-icon rendering to use new SVG mask assets (including a two-layer warning icon) and updated padding tokens.
- Added new badge icon SVG token assets per brand and updated Bundlewatch thresholds to reflect the CSS size increase.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| site/src/content/docs/components/badges.mdx | Updates badge-icon docs/examples for new sizes and disabled/variant states. |
| scss/_badges.scss | Refactors badge-icon styling (new size vars, status variant mixin, mask-based icons). |
| packages/sosh/scss/tokens/_composite.scss | Adds new badge icon SVG assets (positive/info/warning/negative). |
| packages/orange/scss/tokens/_composite.scss | Adds new badge icon SVG assets (positive/info/warning/negative). |
| packages/orange-compact/scss/tokens/_composite.scss | Adds new badge icon SVG assets (positive/info/warning/negative). |
| .bundlewatch.config.json | Updates max bundle sizes to accommodate CSS growth from new assets/styles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| &:has(.badge-status-icon) { | ||
| --#{$prefix}badge-color: #{$ouds-color-surface-status-negative-emphasized}; | ||
| --#{$prefix}badge-background-color: #{$ouds-color-content-on-status-negative-emphasized}; | ||
| position: relative; | ||
| display: block; | ||
| flex-shrink: 0; | ||
| width: var(--#{$prefix}badge-size); | ||
| height: var(--#{$prefix}badge-size); | ||
| padding: 0; |
There was a problem hiding this comment.
Righto, idk what was the rationale behind adding display: block here but it works the same without it and works for inline Badge-icon too. So I will delete
| .badge-status-icon::before { | ||
| background-color: currentcolor; | ||
| mask-image: escape-svg($icon); | ||
| } |
There was a problem hiding this comment.
Added mask: no-repeat center / contain;
| <span class="badge-status-icon"></span> | ||
| </p> | ||
| <p class="badge badge-positive badge-disabled"> | ||
| <span class="badge-status-icon"></span> | ||
| </p> | ||
| <p class="badge badge-info badge-disabled"> | ||
| <span class="badge-status-icon"></span> | ||
| </p> | ||
| <p class="badge badge-warning badge-disabled"> | ||
| <span class="badge-status-icon"></span> |
There was a problem hiding this comment.
Well, those are disabled so maybe not, then again something is shown... wdyt @hannahiss?
|
I changed the styles of the |
| Badges - icon are available in four sizes. Add `.badge-xsmall`, `.badge-small`, or `.badge-large` to have the size you want. Default size is medium. | ||
|
|
||
| <Example buttonLabel="badges icon sizes" class="d-flex align-items-center gap-large" code={`<p class="badge"> | ||
| <Example buttonLabel="badges icon sizes" class="d-flex align-items-center gap-large" code={`<p class="badge badge-xsmall"> |
There was a problem hiding this comment.
For small viewports we have an overflow, I propose to only use flex starting at md
| <Example buttonLabel="badges icon sizes" class="d-flex align-items-center gap-large" code={`<p class="badge badge-xsmall"> | |
| <Example buttonLabel="badges icon sizes" class="d-md-flex align-items-center gap-large" code={`<p class="badge badge-xsmall"> |
| { | ||
| "path": "./packages/orange/dist/css/ouds-web.css", | ||
| "maxSize": "65.5 kB" | ||
| "maxSize": "66.75 kB" |
There was a problem hiding this comment.
Oooff, as they say...
Types of change
Related issues
Closes #3541
Context & Motivation
Tokens update to 2.4.0
Description
Checklists
Checklist (for Core Team only)
Progression (for Core Team only)
ouds/mainfollowing conventional commitLive previews