Skip to content

Commit b84b93e

Browse files
fix(actionbutton): prevent diacritic clipping in thai (#3256)
- add line-height to .spectrum-ActionButton-label - add test case for Thai language - for justified action groups, specify that the desired effect is for them to grow to fill the available space (as opposed to allow allowing flex-shrink)
1 parent 71a48b4 commit b84b93e

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

.changeset/calm-ears-think.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@spectrum-css/actiongroup": patch
3+
---
4+
5+
Action group
6+
7+
`flex: 1` has now changed to `flex-grow: 1` in the `.spectrum-ActionGroup--justified .spectrum-ActionGroup-item` selector to specify the desired behavior of justified action groups.

.changeset/fair-badgers-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@spectrum-css/actionbutton": patch
3+
---
4+
5+
Adds line-height on `.spectrum-ActionButton-label` in order to accommodate text with diacritics that may be cut off vertically.

components/actionbutton/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ a.spectrum-ActionButton {
234234
.spectrum-ActionButton-label {
235235
@extend %spectrum-ButtonLabel;
236236
pointer-events: none;
237+
line-height: var(--spectrum-actionbutton-height);
237238

238239
font-size: var(--mod-actionbutton-font-size, var(--spectrum-actionbutton-font-size));
239240
white-space: nowrap;

components/actionbutton/stories/actionbutton.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ export const ActionButtonGroup = Variants({
7575
testHeading: "Static white",
7676
staticColor: "white",
7777
},
78+
{
79+
testHeading: "Internationalization (Thai)",
80+
label: "ล้างทั้งหมด",
81+
},
7882
],
7983
stateData: [{
8084
testHeading: "Disabled",

components/actiongroup/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,5 @@
154154
}
155155

156156
.spectrum-ActionGroup--justified .spectrum-ActionGroup-item {
157-
flex: 1;
157+
flex-grow: 1;
158158
}

0 commit comments

Comments
 (0)