|
11 | 11 | * governing permissions and limitations under the License.
|
12 | 12 | */
|
13 | 13 |
|
14 |
| -@media (forced-colors: active) { |
15 |
| - .spectrum-HelpText { |
16 |
| - --highcontrast-helptext-content-color-default: CanvasText; |
17 |
| - --highcontrast-helptext-icon-color-default: CanvasText; |
18 |
| - |
19 |
| - forced-color-adjust: none; |
| 14 | +.spectrum-HelpText { |
| 15 | + /* Spacing */ |
| 16 | + --spectrum-helptext-min-height: var(--spectrum-component-height-100); |
| 17 | + --spectrum-helptext-icon-size: var(--spectrum-workflow-icon-size-100); |
| 18 | + --spectrum-helptext-text-to-visual: var(--spectrum-text-to-visual-100); |
| 19 | + --spectrum-helptext-edge-to-workflow-icon: var(--spectrum-component-top-to-workflow-icon-100); |
| 20 | + --spectrum-helptext-top-to-text: var(--spectrum-component-top-to-text-100); |
| 21 | + --spectrum-helptext-bottom-to-text: var(--spectrum-component-bottom-to-text-100); |
| 22 | + |
| 23 | + /* Typpography */ |
| 24 | + --spectrum-helptext-font-size: var(--spectrum-font-size-100); |
| 25 | + --spectrum-helptext-font-family: var(--spectrum-sans-font-family-stack); |
| 26 | + --spectrum-helptext-font-style: var(--spectrum-default-font-style); |
| 27 | + --spectrum-helptext-line-height: var(--spectrum-line-height-100); |
| 28 | + --spectrum-helptext-font-weight: var(--spectrum-regular-font-weight); |
20 | 29 |
|
21 |
| - .spectrum-HelpText-validationIcon, |
22 |
| - .spectrum-HelpText-text { |
23 |
| - forced-color-adjust: none; |
24 |
| - } |
| 30 | + &:lang(ja), |
| 31 | + &:lang(zh), |
| 32 | + &:lang(ko) { |
| 33 | + --mod-helptext-line-height: var(--mod-helptext-line-height-cjk, var(--spectrum-cjk-line-height-100)); |
25 | 34 | }
|
26 |
| -} |
27 |
| - |
28 |
| -.spectrum-HelpText { |
29 |
| - --spectrum-helptext-content-color-default: var(--spectrum-neutral-subdued-content-color-default); |
30 |
| - --spectrum-helptext-icon-color-default: var(--spectrum-neutral-subdued-content-color-default); |
31 | 35 |
|
32 | 36 | &.spectrum-HelpText--sizeS {
|
33 | 37 | --spectrum-helptext-min-height: var(--spectrum-component-height-75);
|
34 | 38 | --spectrum-helptext-icon-size: var(--spectrum-workflow-icon-size-75);
|
35 | 39 | --spectrum-helptext-font-size: var(--spectrum-font-size-75);
|
36 | 40 | --spectrum-helptext-text-to-visual: var(--spectrum-text-to-visual-75);
|
37 |
| - --spectrum-helptext-top-to-workflow-icon: var(--spectrum-help-text-top-to-workflow-icon-small); |
38 |
| - --spectrum-helptext-bottom-to-workflow-icon: var(--spectrum-helptext-top-to-workflow-icon); |
39 |
| - --spectrum-helptext-top-to-text: var(--spectrum-component-top-to-text-75); |
40 |
| - --spectrum-helptext-bottom-to-text: var(--spectrum-component-bottom-to-text-75); |
41 |
| - } |
42 |
| - |
43 |
| - &, |
44 |
| - &.spectrum-HelpText--sizeM { |
45 |
| - --spectrum-helptext-min-height: var(--spectrum-component-height-75); |
46 |
| - --spectrum-helptext-icon-size: var(--spectrum-workflow-icon-size-100); |
47 |
| - --spectrum-helptext-font-size: var(--spectrum-font-size-75); |
48 |
| - --spectrum-helptext-text-to-visual: var(--spectrum-text-to-visual-75); |
49 |
| - --spectrum-helptext-top-to-workflow-icon: var(--spectrum-help-text-top-to-workflow-icon-medium); |
50 |
| - --spectrum-helptext-bottom-to-workflow-icon: var(--spectrum-helptext-top-to-workflow-icon); |
| 41 | + --spectrum-helptext-edge-to-workflow-icon: var(--spectrum-component-top-to-workflow-icon-75); |
51 | 42 | --spectrum-helptext-top-to-text: var(--spectrum-component-top-to-text-75);
|
52 | 43 | --spectrum-helptext-bottom-to-text: var(--spectrum-component-bottom-to-text-75);
|
53 | 44 | }
|
54 | 45 |
|
55 | 46 | &.spectrum-HelpText--sizeL {
|
56 |
| - --spectrum-helptext-min-height: var(--spectrum-component-height-100); |
57 |
| - --spectrum-helptext-icon-size: var(--spectrum-workflow-icon-size-200); |
58 |
| - --spectrum-helptext-font-size: var(--spectrum-font-size-100); |
59 |
| - --spectrum-helptext-text-to-visual: var(--spectrum-text-to-visual-100); |
60 |
| - --spectrum-helptext-top-to-workflow-icon: var(--spectrum-help-text-top-to-workflow-icon-large); |
61 |
| - --spectrum-helptext-bottom-to-workflow-icon: var(--spectrum-helptext-top-to-workflow-icon); |
62 |
| - --spectrum-helptext-top-to-text: var(--spectrum-component-top-to-text-100); |
63 |
| - --spectrum-helptext-bottom-to-text: var(--spectrum-component-bottom-to-text-100); |
64 |
| - } |
65 |
| - |
66 |
| - &.spectrum-HelpText--sizeXL { |
67 | 47 | --spectrum-helptext-min-height: var(--spectrum-component-height-200);
|
68 |
| - --spectrum-helptext-icon-size: var(--spectrum-workflow-icon-size-300); |
| 48 | + --spectrum-helptext-icon-size: var(--spectrum-workflow-icon-size-200); |
69 | 49 | --spectrum-helptext-font-size: var(--spectrum-font-size-200);
|
70 | 50 | --spectrum-helptext-text-to-visual: var(--spectrum-text-to-visual-200);
|
71 |
| - --spectrum-helptext-top-to-workflow-icon: var(--spectrum-help-text-top-to-workflow-icon-extra-large); |
72 |
| - --spectrum-helptext-bottom-to-workflow-icon: var(--spectrum-helptext-top-to-workflow-icon); |
| 51 | + --spectrum-helptext-edge-to-workflow-icon: var(--spectrum-component-top-to-workflow-icon-200); |
73 | 52 | --spectrum-helptext-top-to-text: var(--spectrum-component-top-to-text-200);
|
74 | 53 | --spectrum-helptext-bottom-to-text: var(--spectrum-component-bottom-to-text-200);
|
75 | 54 | }
|
76 | 55 |
|
| 56 | + &.spectrum-HelpText--sizeXL { |
| 57 | + --spectrum-helptext-min-height: var(--spectrum-component-height-300); |
| 58 | + --spectrum-helptext-icon-size: var(--spectrum-workflow-icon-size-300); |
| 59 | + --spectrum-helptext-font-size: var(--spectrum-font-size-300); |
| 60 | + --spectrum-helptext-text-to-visual: var(--spectrum-text-to-visual-300); |
| 61 | + --spectrum-helptext-edge-to-workflow-icon: var(--spectrum-component-top-to-workflow-icon-300); |
| 62 | + --spectrum-helptext-top-to-text: var(--spectrum-component-top-to-text-300); |
| 63 | + --spectrum-helptext-bottom-to-text: var(--spectrum-component-bottom-to-text-300); |
| 64 | + } |
| 65 | + |
| 66 | + &, |
77 | 67 | &.spectrum-HelpText--neutral {
|
78 | 68 | --spectrum-helptext-content-color-default: var(--spectrum-neutral-subdued-content-color-default);
|
79 | 69 | --spectrum-helptext-icon-color-default: var(--spectrum-neutral-subdued-content-color-default);
|
80 | 70 | }
|
81 | 71 |
|
82 | 72 | &.spectrum-HelpText--negative {
|
83 |
| - --spectrum-helptext-content-color-default: var(--spectrum-negative-color-900); |
84 |
| - --spectrum-helptext-icon-color-default: var(--spectrum-negative-color-900); |
| 73 | + --spectrum-helptext-content-color-default: var(--spectrum-negative-content-color-default); |
| 74 | + --spectrum-helptext-icon-color-default: var(--spectrum-negative-content-color-default); |
85 | 75 | }
|
86 | 76 |
|
87 | 77 | &.is-disabled {
|
88 | 78 | --spectrum-helptext-content-color-default: var(--spectrum-disabled-content-color);
|
89 | 79 | --spectrum-helptext-icon-color-default: var(--spectrum-disabled-content-color);
|
90 | 80 | }
|
| 81 | +} |
91 | 82 |
|
| 83 | +.spectrum-HelpText { |
92 | 84 | color: var(--highcontrast-helptext-content-color-default, var(--mod-helptext-content-color-default, var(--spectrum-helptext-content-color-default)));
|
93 | 85 | display: flex;
|
94 | 86 | font-size: var(--mod-helptext-font-size, var(--spectrum-helptext-font-size));
|
95 | 87 | min-block-size: var(--mod-helptext-min-height, var(--spectrum-helptext-min-height));
|
96 | 88 |
|
97 |
| - &:lang(ja), |
98 |
| - &:lang(zh), |
99 |
| - &:lang(ko) { |
100 |
| - --mod-helptext-line-height: var(--mod-helptext-line-height-cjk, var(--spectrum-cjk-line-height-100)); |
101 |
| - } |
102 |
| - |
103 | 89 | .spectrum-HelpText-validationIcon {
|
104 | 90 | margin-inline-end: var(--mod-helptext-text-to-visual, var(--spectrum-helptext-text-to-visual));
|
105 |
| - padding-block-start: var(--mod-helptext-top-to-workflow-icon, var(--spectrum-helptext-top-to-workflow-icon)); |
106 |
| - padding-block-end: var(--mod-helptext-bottom-to-workflow-icon, var(--spectrum-helptext-bottom-to-workflow-icon)); |
| 91 | + padding-block-start: var(--mod-helptext-top-edge-to-workflow-icon, var(--spectrum-helptext-edge-to-workflow-icon)); |
| 92 | + padding-block-end: var(--mod-helptext-bottom-edge-to-workflow-icon, var(--spectrum-helptext-edge-to-workflow-icon)); |
107 | 93 | flex-shrink: 0;
|
108 | 94 | block-size: var(--mod-helptext-icon-size, var(--spectrum-helptext-icon-size));
|
109 | 95 | inline-size: var(--mod-helptext-icon-size, var(--spectrum-helptext-icon-size));
|
|
112 | 98 | .spectrum-HelpText-text {
|
113 | 99 | padding-block-start: var(--mod-helptext-top-to-text, var(--spectrum-helptext-top-to-text));
|
114 | 100 | padding-block-end: var(--mod-helptext-bottom-to-text, var(--spectrum-helptext-bottom-to-text));
|
115 |
| - line-height: var(--mod-helptext-line-height, var(--spectrum-line-height-100)); |
| 101 | + line-height: var(--mod-helptext-line-height, var(--spectrum-helptext-line-height)); |
| 102 | + font-family: var(--mod-helptext-font-family, var(--spectrum-helptext-font-family)); |
| 103 | + font-style: var(--mod-helptext-font-style, var(--spectrum-helptext-font-style)); |
| 104 | + font-weight: var(--mod-helptext-font-weight, var(--spectrum-helptext-font-weight)); |
116 | 105 | }
|
117 | 106 |
|
| 107 | + /* Variants -- Neutral, negative, disabled */ |
118 | 108 | &.spectrum-HelpText--neutral {
|
119 | 109 | .spectrum-HelpText-text {
|
120 | 110 | color: var(--highcontrast-helptext-content-color-default, var(--mod-helptext-content-color-default, var(--spectrum-helptext-content-color-default)));
|
|
145 | 135 | }
|
146 | 136 | }
|
147 | 137 | }
|
| 138 | + |
| 139 | +@media (forced-colors: active) { |
| 140 | + .spectrum-HelpText { |
| 141 | + --highcontrast-helptext-content-color-default: CanvasText; |
| 142 | + --highcontrast-helptext-icon-color-default: CanvasText; |
| 143 | + } |
| 144 | +} |
0 commit comments