Skip to content

Commit 578dde4

Browse files
bernhard-adobepfulton
authored andcommitted
feat: addressing PR review feedback (#1476)
1 parent 8e65d0e commit 578dde4

File tree

2 files changed

+25
-31
lines changed

2 files changed

+25
-31
lines changed

components/fieldlabel/index.css

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ governing permissions and limitations under the License.
1414
--spectrum-fieldlabel-top-to-text: var(--spectrum-component-top-to-text-75);
1515
--spectrum-fieldlabel-bottom-to-text: var(--spectrum-component-bottom-to-text-75);
1616
--spectrum-fieldlabel-font-size: var(--spectrum-font-size-75);
17+
1718
--spectrum-fieldlabel-line-height: var(--spectrum-line-height-100);
19+
--spectrum-fieldlabel-CJK-line-height: var(--spectrum-CJK-line-height-100);
20+
1821
--spectrum-fieldlabel-asterisk-gap: var(--spectrum-field-label-top-to-asterisk-small);
1922
--spectrum-fieldlabel-side-padding-top: var(--spectrum-component-top-to-text-75);
2023
--spectrum-fieldlabel-side-padding-right: var(--spectrum-spacing-100);
@@ -25,7 +28,10 @@ governing permissions and limitations under the License.
2528
--spectrum-fieldlabel-top-to-text: var(--spectrum-component-top-to-text-75);
2629
--spectrum-fieldlabel-bottom-to-text: var(--spectrum-component-bottom-to-text-75);
2730
--spectrum-fieldlabel-font-size: var(--spectrum-font-size-75);
31+
2832
--spectrum-fieldlabel-line-height: var(--spectrum-line-height-200);
33+
--spectrum-fieldlabel-CJK-line-height: var(--spectrum-CJK-line-height-200);
34+
2935
--spectrum-fieldlabel-asterisk-gap: var(--spectrum-field-label-top-to-asterisk-medium);
3036
--spectrum-fieldlabel-side-padding-top: var(--spectrum-component-top-to-text-75);
3137
--spectrum-fieldlabel-side-padding-right: var(--spectrum-spacing-200);
@@ -35,7 +41,10 @@ governing permissions and limitations under the License.
3541
--spectrum-fieldlabel-top-to-text: var(--spectrum-component-top-to-text-100);
3642
--spectrum-fieldlabel-bottom-to-text: var(--spectrum-component-bottom-to-text-100);
3743
--spectrum-fieldlabel-font-size: var(--spectrum-font-size-100);
38-
--spectrum-fieldlabel-line-height: var(--spectrum-CJK-line-height-100);
44+
45+
--spectrum-fieldlabel-line-height: var(--spectrum-line-height-100);
46+
--spectrum-fieldlabel-CJK-line-height: var(--spectrum-CJK-line-height-100);
47+
3948
--spectrum-fieldlabel-asterisk-gap: var(--spectrum-field-label-top-to-asterisk-large);
4049
--spectrum-fieldlabel-side-padding-top: var(--spectrum-component-top-to-text-100);
4150
--spectrum-fieldlabel-side-padding-right: var(--spectrum-spacing-200);
@@ -45,7 +54,11 @@ governing permissions and limitations under the License.
4554
--spectrum-fieldlabel-top-to-text: var(--spectrum-component-top-to-text-200);
4655
--spectrum-fieldlabel-bottom-to-text: var(--spectrum-component-bottom-to-text-200);
4756
--spectrum-fieldlabel-font-size: var(--spectrum-font-size-200);
48-
--spectrum-fieldlabel-line-height: var(--spectrum-CJK-line-height-200);
57+
58+
--spectrum-fieldlabel-line-height: var(--spectrum-line-height-200);
59+
--spectrum-fieldlabel-CJK-line-height: var(--spectrum-CJK-line-height-200);
60+
61+
4962
--spectrum-fieldlabel-asterisk-gap: var(--spectrum-field-label-top-to-asterisk-extra-large);
5063
--spectrum-fieldlabel-side-padding-top: var(--spectrum-component-top-to-text-200);
5164
--spectrum-fieldlabel-side-padding-right: var(--spectrum-spacing-200);
@@ -63,8 +76,7 @@ governing permissions and limitations under the License.
6376
font-size: var(--spectrum-fieldlabel-font-size);
6477
font-weight: var(--spectrum-font-weight-regular);
6578

66-
/* line heights coming from core-tokens do not calculate correctly to the previous line-heights */
67-
line-height: calc(var(--spectrum-fieldlabel-line-height) * var(--spectrum-fieldlabel-font-size));
79+
line-height: var(--spectrum-fieldlabel-line-height);
6880

6981

7082
vertical-align: top;
@@ -74,6 +86,15 @@ governing permissions and limitations under the License.
7486
font-smoothing: subpixel-antialiased;
7587
}
7688

89+
/* international lang support */
90+
.spectrum-FieldLabel {
91+
&:lang(ja),
92+
&:lang(zh),
93+
&:lang(ko) {
94+
line-height: var(--mod-fieldlabel-CJK-line-height, var(--spectrum-fieldlabel-CJK-line-height));
95+
}
96+
}
97+
7798
.spectrum-FieldLabel-requiredIcon {
7899
margin-block: 0; /* Previously used this improperly, it doesn't reposition asterisk, just increased top margin on the whole field label var(--spectrum-fieldlabel-asterisk-margin-y) */
79100
margin-inline: var(--spectrum-fieldlabel-asterisk-gap) 0;

components/fieldlabel/skin.css

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)