Skip to content

Commit 5c49248

Browse files
Barsnesmimarz
authored andcommitted
chore(Button): text-align: inherit when not in full width (#2216)
After discussion in daily we will make button have `text-align: inherit` when not in full width. This is to make line breaks within the button look nicer for the user
1 parent ee5238d commit 5c49248

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/hip-masks-greet.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@digdir/designsystemet-css": patch
3+
---
4+
5+
Button: `text-align: inherit` when not in full width

packages/css/button.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
cursor: pointer;
2828
font-family: inherit;
2929
justify-content: center;
30-
text-align: center;
30+
text-align: inherit;
3131
text-decoration: none;
3232
position: relative;
3333
border-radius: var(--ds-border-radius-md);
@@ -85,6 +85,7 @@
8585

8686
.ds-btn--full-width {
8787
width: 100%;
88+
text-align: center;
8889
}
8990

9091
.ds-btn--secondary,

0 commit comments

Comments
 (0)