Skip to content

Commit 885a454

Browse files
feat(textfield): Add field-sizing token
PiperOrigin-RevId: 896050822
1 parent 593705e commit 885a454

5 files changed

Lines changed: 7 additions & 2 deletions

File tree

textfield/internal/_filled-text-field.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
:host {
3737
// Only use the logical properties.
38-
$tokens: map.remove($tokens, 'container-shape');
38+
$tokens: map.remove($tokens, 'container-shape', 'field-sizing');
3939
@each $token, $value in $tokens {
4040
--_#{$token}: #{$value};
4141
}

textfield/internal/_input.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
.input {
2020
caret-color: var(--_caret-color);
21+
field-sizing: var(--_field-sizing);
2122
// remove extra height added by horizontal scrollbars
2223
overflow-x: hidden;
2324
text-align: inherit;

textfield/internal/_outlined-text-field.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
:host {
3232
// Only use the logical properties.
33-
$tokens: map.remove($tokens, 'container-shape');
33+
$tokens: map.remove($tokens, 'container-shape', 'field-sizing');
3434
@each $token, $value in $tokens {
3535
--_#{$token}: #{$value};
3636
}

tokens/_md-comp-filled-text-field.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ $supported-tokens: (
6565
'error-leading-icon-color',
6666
'error-supporting-text-color',
6767
'error-trailing-icon-color',
68+
'field-sizing',
6869
'focus-active-indicator-color',
6970
'focus-active-indicator-height',
7071
'focus-caret-color',
@@ -157,6 +158,7 @@ $_default: (
157158
if($exclude-hardcoded-values, null, 2px),
158159
'with-label-top-space': if($exclude-hardcoded-values, null, 8px),
159160
'with-label-bottom-space': if($exclude-hardcoded-values, null, 8px),
161+
'field-sizing': if($exclude-hardcoded-values, null, fixed),
160162
// TODO(b/270705687): remove when focus-caret-color token added
161163
'focus-caret-color': map.get($deps, 'md-sys-color', 'primary'),
162164
'with-leading-icon-leading-space':

tokens/_md-comp-outlined-text-field.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ $supported-tokens: (
5757
'error-outline-color',
5858
'error-supporting-text-color',
5959
'error-trailing-icon-color',
60+
'field-sizing',
6061
'focus-caret-color',
6162
'focus-input-text-color',
6263
'focus-label-text-color',
@@ -144,6 +145,7 @@ $_default: (
144145
if($exclude-hardcoded-values, null, 2px),
145146
'input-text-suffix-leading-space':
146147
if($exclude-hardcoded-values, null, 2px),
148+
'field-sizing': if($exclude-hardcoded-values, null, fixed),
147149
// TODO(b/270705687): remove when focus-caret-color token added
148150
'focus-caret-color': map.get($deps, 'md-sys-color', 'primary'),
149151
'with-leading-icon-leading-space':

0 commit comments

Comments
 (0)