Change BpkBadge font style from footnote to caption#4318
Open
fourcolourblack wants to merge 1 commit intomainfrom
Open
Change BpkBadge font style from footnote to caption#4318fourcolourblack wants to merge 1 commit intomainfrom
fourcolourblack wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the bpk-badge Sass mixin typography to use the “caption” text style instead of “footnote”, aligning badge styling with the intended design token typography.
Changes:
- Switches the badge typography mixin from
bpk-footnotetobpk-captioninbpk-badge.
Comments suppressed due to low confidence (1)
packages/bpk-mixins/_badges.scss:63
bpk-badgenow includestypography.bpk-caption, but the mixin still setsfont-size/line-heightfallbacks to thesmtokens viabpk-themeable-property. Since those declarations come after the caption include, the compiled output will still default to the previous (footnote/sm) sizing, so this change likely won’t actually switch the badge typography to caption.
To make the badge truly use caption sizing, align the themeable fallbacks with caption (e.g., tokens.$bpk-font-size-xs and tokens.$bpk-line-height-xs) and/or remove the redundant typography include so there’s a single source of truth for these values.
@include typography.bpk-text;
@include typography.bpk-caption;
@include utils.bpk-themeable-property(
font-size,
--bpk-badge-font-size,
tokens.$bpk-font-size-sm
);
@include utils.bpk-themeable-property(
font-weight,
--bpk-badge-font-weight,
tokens.$bpk-font-weight-book
);
@include utils.bpk-themeable-property(
line-height,
--bpk-badge-line-height,
tokens.$bpk-line-height-sm
);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Visit https://backpack.github.io/storybook-prs/4318 to see this build running in a browser. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Remember to include the following changes:
[Clover-123][BpkButton] Updating the colourREADME.md(If you have created a new component)README.md