Skip to content

Commit 7af5e8f

Browse files
fix(fieldlabel, helptext): restore overrides (#5865)
Co-authored-by: Cory Dransfeldt <[email protected]>
1 parent d6ff8e1 commit 7af5e8f

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

.changeset/bold-ducks-end.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@spectrum-web-components/field-label': patch
3+
'@spectrum-web-components/help-text': patch
4+
---
5+
6+
Fix missing CSS custom property overrides for field-label and help-text components
7+
8+
Previously, these components had empty override files despite having corresponding `--system-*` tokens defined in the system theme bridge. This caused the components to not properly apply size-specific spacing tokens for top and bottom text positioning. The fix adds the missing CSS custom property mappings to ensure proper theming across all component sizes (s, m, l, xl).

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ parameters:
2222
# 3. Commit this change to the PR branch where the changes exist.
2323
current_golden_images_hash:
2424
type: string
25-
default: 89cb380330cef18d34c0d4cf893790d9c7167b08
25+
default: b88c1b90e553e4f212ad60a5d96abc4dc9ed6be0
2626
wireit_cache_name:
2727
type: string
2828
default: wireit

1st-gen/packages/field-label/src/field-label-overrides.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,23 @@
99
* OF ANY KIND, either express or implied. See the License for the specific language
1010
* governing permissions and limitations under the License.
1111
*/
12+
13+
:host {
14+
--spectrum-field-label-top-to-text: var(--system-field-label-top-to-text);
15+
--spectrum-field-label-bottom-to-text: var(--system-field-label-bottom-to-text);
16+
}
17+
18+
:host([size="s"]) {
19+
--spectrum-field-label-top-to-text: var(--system-field-label-top-to-text-small);
20+
--spectrum-field-label-bottom-to-text: var(--system-field-label-bottom-to-text-small);
21+
}
22+
23+
:host([size="l"]) {
24+
--spectrum-field-label-top-to-text: var(--system-field-label-top-to-text-large);
25+
--spectrum-field-label-bottom-to-text: var(--system-field-label-bottom-to-text-large);
26+
}
27+
28+
:host([size="xl"]) {
29+
--spectrum-field-label-top-to-text: var(--system-field-label-top-to-text-extra-large);
30+
--spectrum-field-label-bottom-to-text: var(--system-field-label-bottom-to-text-extra-large);
31+
}

1st-gen/packages/help-text/src/help-text-overrides.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,23 @@
99
* OF ANY KIND, either express or implied. See the License for the specific language
1010
* governing permissions and limitations under the License.
1111
*/
12+
13+
:host {
14+
--spectrum-helptext-top-to-text: var(--system-helptext-top-to-text);
15+
--spectrum-helptext-bottom-to-text: var(--system-helptext-bottom-to-text);
16+
}
17+
18+
:host([size="s"]) {
19+
--spectrum-helptext-top-to-text: var(--system-helptext-top-to-text-small);
20+
--spectrum-helptext-bottom-to-text: var(--system-helptext-bottom-to-text-small);
21+
}
22+
23+
:host([size="l"]) {
24+
--spectrum-helptext-top-to-text: var(--system-helptext-top-to-text-large);
25+
--spectrum-helptext-bottom-to-text: var(--system-helptext-bottom-to-text-large);
26+
}
27+
28+
:host([size="xl"]) {
29+
--spectrum-helptext-top-to-text: var(--system-helptext-top-to-text-extra-large);
30+
--spectrum-helptext-bottom-to-text: var(--system-helptext-bottom-to-text-extra-large);
31+
}

0 commit comments

Comments
 (0)