diff --git a/components/fieldlabel/index.css b/components/fieldlabel/index.css index 503d3ccc0bd..f2f6cf1baed 100644 --- a/components/fieldlabel/index.css +++ b/components/fieldlabel/index.css @@ -91,14 +91,12 @@ governing permissions and limitations under the License. -webkit-font-smoothing: subpixel-antialiased; -moz-osx-font-smoothing: auto; - font-smoothing: subpixel-antialiased; color: var(--spectrum-fieldlabel-color); } /* international lang support */ .spectrum-FieldLabel { - &:lang(ja), &:lang(zh), &:lang(ko) { @@ -109,24 +107,18 @@ governing permissions and limitations under the License. .spectrum-FieldLabel-requiredIcon { margin-block: 0; margin-inline: var(--mod-field-label-text-to-asterisk, var(--spectrum-field-label-text-to-asterisk)) 0; + vertical-align: var(--mod-field-label-asterisk-vertical-align, baseline); } -.spectrum-FieldLabel--left { +.spectrum-FieldLabel--left, +.spectrum-FieldLabel--right { display: inline-block; padding-block: var(--mod-fieldlabel-side-padding-top, var(--spectrum-fieldlabel-side-padding-top)) 0; padding-inline: 0 var(--mod-fieldlabel-side-padding-right, var(--spectrum-fieldlabel-side-padding-right)); - - & .spectrum-FieldLabel-requiredIcon { - margin-block: var(--mod-field-label-text-to-asterisk, var(--spectrum-field-label-text-to-asterisk)) 0; - margin-inline: var(--mod-field-label-text-to-asterisk, var(--spectrum-field-label-text-to-asterisk)) 0; - } } .spectrum-FieldLabel--right { - display: inline-block; text-align: end; - padding-block: var(--mod-fieldlabel-side-padding-top, var(--spectrum-fieldlabel-side-padding-top)) 0; - padding-inline: 0 var(--mod-fieldlabel-side-padding-right, var(--spectrum-fieldlabel-side-padding-right)); } .spectrum-Form { @@ -151,7 +143,6 @@ governing permissions and limitations under the License. } /* disabled state */ - .spectrum-FieldLabel, .spectrum-Form-itemLabel { &.is-disabled { @@ -176,7 +167,7 @@ governing permissions and limitations under the License. display: flex; flex-direction: column; - &+.spectrum-Form-item { + & + .spectrum-Form-item { margin-block-start: var(--mod-field-label-top-to-asterisk, var(--spectrum-field-label-top-to-asterisk)); } } diff --git a/components/fieldlabel/metadata/fieldlabel.yml b/components/fieldlabel/metadata/fieldlabel.yml index 73d06982650..34f19798680 100644 --- a/components/fieldlabel/metadata/fieldlabel.yml +++ b/components/fieldlabel/metadata/fieldlabel.yml @@ -7,7 +7,7 @@ sections: - name: Migration Guide description: | ### T-shirt sizing - Field Label now supports t-shirt sizing and requires that you specify the size by adding a `.spectrum-FieldLabel--size*` class. + Field label now supports t-shirt sizing and requires that you specify the size by adding a `.spectrum-FieldLabel--size*` class. examples: - id: fieldlabel-sizing name: Sizing @@ -16,7 +16,7 @@ examples:

S

- +
@@ -24,7 +24,7 @@ examples:

M (default)

- +
@@ -33,7 +33,7 @@ examples:

L

- +
@@ -42,7 +42,7 @@ examples:

XL

- +
@@ -51,39 +51,40 @@ examples: - id: fieldlabel-standard name: Standard markup: | - +
- +
- id: fieldlabel-side-left name: Left - description: A left aligned field label. + description: A left aligned Field label. markup: | - +
- id: fieldlabel-side-right name: Right - description: A right aligned field label. + description: A right aligned Field label. markup: | - +
- id: fieldlabel-required name: Required - description: Field label for a required field. + description: A Field label for a required field can display either the text "(required)", or an asterisk. If using the asterisk icon, do not leave any space between the label text and the start of the `` element in the markup, so extra space is not added in addition to the inline margin. markup: | -
- +
@@ -99,8 +100,9 @@ examples:

-
- -