diff --git a/src/components/input/themes/input.base.scss b/src/components/input/themes/input.base.scss index 3d3ccd209..df783d163 100644 --- a/src/components/input/themes/input.base.scss +++ b/src/components/input/themes/input.base.scss @@ -18,7 +18,7 @@ } [part='label'] { - display: inline-block; + display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; diff --git a/src/components/input/themes/shared/input.bootstrap.scss b/src/components/input/themes/shared/input.bootstrap.scss index debb8b4c2..9c1cb08e7 100644 --- a/src/components/input/themes/shared/input.bootstrap.scss +++ b/src/components/input/themes/shared/input.bootstrap.scss @@ -54,9 +54,13 @@ $theme: $bootstrap; border-radius: 0; } +[part~='label'], +[part~='input']::placeholder { + @include type-style('body-1'); +} + [part~='label'] { - line-height: rem(24px); - margin-bottom: rem(4px); + margin-block-end: rem(4px); color: var-get($theme, 'idle-secondary-color'); &:empty { diff --git a/src/components/input/themes/shared/input.fluent.scss b/src/components/input/themes/shared/input.fluent.scss index 332389946..02f5185ae 100644 --- a/src/components/input/themes/shared/input.fluent.scss +++ b/src/components/input/themes/shared/input.fluent.scss @@ -39,9 +39,10 @@ $focused-height: calc(var-get($theme, 'size') - #{($focused-border-width * 2)}); } [part='label'] { - font-size: rem(14px); - font-weight: 600; + @include type-style('subtitle-2'); + color: var-get($theme, 'idle-secondary-color'); + margin-block-end: rem(5px); } [part^='container'] { diff --git a/src/components/input/themes/shared/input.indigo.scss b/src/components/input/themes/shared/input.indigo.scss index bd3f9a00e..fee813d78 100644 --- a/src/components/input/themes/shared/input.indigo.scss +++ b/src/components/input/themes/shared/input.indigo.scss @@ -57,6 +57,7 @@ $transition-duration: .25s; @include type-style('caption'); color: var-get($theme, 'idle-secondary-color'); + margin-block-end: rem(4px); } [part^='container'] { diff --git a/src/components/input/themes/shared/input.material.scss b/src/components/input/themes/shared/input.material.scss index 8ed05cbb0..c5d7c8f41 100644 --- a/src/components/input/themes/shared/input.material.scss +++ b/src/components/input/themes/shared/input.material.scss @@ -11,7 +11,6 @@ $fs: rem(16px) !default; --label-position: #{sizable(18px, 22px, 26px)}; transform: translateY(calc(var(--label-position) * -1)); - font-size: rem(12px); } %floated-styles { @@ -45,6 +44,7 @@ $fs: rem(16px) !default; input:placeholder-shown + [part='notch'] [part='label'], [part~='filled'] + [part='notch'] [part='label'] { @extend %label; + @include type-style('caption'); } [part~='input'] { @@ -56,6 +56,8 @@ input:placeholder-shown + [part='notch'] [part='label'], } [part='label'] { + @include type-style('subtitle-1'); + color: var-get($theme, 'idle-secondary-color'); transition: transform 150ms cubic-bezier(.4, 0, .2, 1), @@ -137,6 +139,7 @@ input:placeholder-shown + [part='notch'] [part='label'], :host(:focus-within) { [part='label'] { @extend %label; + @include type-style('caption'); color: var-get($theme, 'focused-secondary-color'); }