Skip to content

Commit 758e615

Browse files
Elliott Marquezcopybara-github
authored andcommitted
fix(button,fab,chips,labs): text-transform inherits through shadow root
PiperOrigin-RevId: 612948745
1 parent b74e3dd commit 758e615

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

button/internal/_shared.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@
9999
color: var(--_label-text-color);
100100
padding: 0;
101101
gap: inherit;
102+
// Override the user-agent text-transform: none of <button> and <a>
103+
text-transform: inherit;
102104

103105
&::-moz-focus-inner {
104106
padding: 0;

chips/internal/_shared.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@
222222
}
223223
}
224224

225+
a,
226+
button {
227+
// Override the user-agent text-transform: none of <button> and <a>
228+
text-transform: inherit;
229+
}
230+
225231
a,
226232
button:not(:disabled) {
227233
cursor: inherit;

fab/internal/_shared.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ $_md-sys-motion: tokens.md-sys-motion-values();
5555
outline: none;
5656
// Required for elevation and ripple to stay below content
5757
z-index: 0;
58+
// Override the user-agent text-transform: none of <button>
59+
text-transform: inherit;
5860

5961
&.extended {
6062
width: inherit;

labs/navigationtab/internal/_navigation-tab.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ $animation-duration: 100ms;
7676
font-size: var(--_label-text-size);
7777
line-height: var(--_label-text-line-height);
7878
font-weight: var(--_label-text-weight);
79+
// Override the user-agent text-transform: none of <button>
80+
text-transform: inherit;
7981

8082
// Firefox draws a dotted border around focused buttons unless specifically overridden.
8183
&::-moz-focus-inner {

labs/segmentedbutton/internal/_shared.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
vertical-align: middle;
6262
padding-inline-start: var(--_spacing-leading);
6363
padding-inline-end: var(--_spacing-trailing);
64+
// Override the user-agent text-transform: none of <button>
65+
text-transform: inherit;
6466

6567
.md3-segmented-button__outline {
6668
border-color: var(--_outline-color);

0 commit comments

Comments
 (0)