Skip to content

Commit

Permalink
chore(button): add flex-shrink to SVG and images (#2612)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes and mimarz authored Oct 15, 2024
1 parent 208cd81 commit 6c35bb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/mighty-buttons-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

Button: Fix SVG and images shrinking in flex containers
5 changes: 5 additions & 0 deletions packages/css/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
text-align: inherit;
text-decoration: none;

& svg,
& img {
flex-shrink: 0;
}

&:focus-visible {
position: relative; /* Place focusring on top */
}
Expand Down

0 comments on commit 6c35bb3

Please sign in to comment.