Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/silver-buttons-shine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

**Chip, Tag**: Ensure font size scales correctly with the current size mode by using the token `--ds-body-sm-font-size`. Note: there might be a small visual change for `Chip` used without explicit `data-size`, since it used to have `font-size: 90%`.
2 changes: 1 addition & 1 deletion .github/workflows/test-visual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# pr runs ONLY when the pr is in review, and on new pushes to that pr
pull_request:
branches: [main, next]
types: [ready_for_review, synchronize, reopened]
types: [opened, ready_for_review, synchronize, reopened]
paths:
- .github/workflows/test-visual.yml
- 'packages/**/*.tsx?'
Expand Down
5 changes: 1 addition & 4 deletions packages/css/src/chip.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
color: var(--dsc-chip-color);
cursor: pointer;
font-family: inherit;
font-size: var(--ds-body-sm-font-size);
gap: var(--dsc-chip-spacing);
line-height: var(--ds-line-height-sm);
margin: 0;
Expand All @@ -56,10 +57,6 @@
display: inline-flex;
}

&:not([data-size]) {
font-size: var(--ds-font-size-minus-1);
}

/* Show focus ring when input inside is focused by keyboard interaction */
&:has(:focus-visible) {
@composes ds-focus--visible from './base.css';
Expand Down
1 change: 1 addition & 0 deletions packages/css/src/tag.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
box-sizing: border-box;
color: var(--dsc-tag-color);
height: fit-content; /* In case placed in display: flex */
font-size: var(--ds-body-sm-font-size);
line-height: var(--ds-line-height-sm);
min-height: var(--dsc-tag-min-height);
padding: var(--dsc-tag-padding);
Expand Down