Skip to content

Commit 84c8519

Browse files
feat(textfield): Add field-sizing token
PiperOrigin-RevId: 896050822
1 parent 7d7cbf4 commit 84c8519

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

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;

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)