From 3a0f486e988db9120f47fa50977ef61d9e2da858 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Thu, 19 Jan 2023 14:34:43 -0500 Subject: [PATCH] fix label colors in checkbox, radio, and switch --- docs/resources/changelog.md | 1 + src/components/checkbox/checkbox.styles.ts | 2 +- src/components/radio/radio.styles.ts | 2 +- src/components/switch/switch.styles.ts | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index b81510c4..b3d5facf 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -29,6 +29,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti - Fixed a bug that caused the value of `` to be `undefined` depending on where the radio was activated [#1134](https://github.com/shoelace-style/shoelace/issues/1134) - Fixed a bug that caused body content to shift when scroll locking was enabled [#1132](https://github.com/shoelace-style/shoelace/issues/1132) - Fixed a bug in `` that caused icons to sometimes be clipped in Safari +- Fixed a bug that prevented label colors from inheriting by default in ``, ``, and `` - Refactored the `ShoelaceFormControl` interface to remove the `invalid` property, allowing a more intuitive API for controlling validation internally - Renamed the internal `FormSubmitController` to `FormControlController` to better reflect what it's used for - Updated Lit to 2.6.1 diff --git a/src/components/checkbox/checkbox.styles.ts b/src/components/checkbox/checkbox.styles.ts index 98ca1b0c..3d664ca8 100644 --- a/src/components/checkbox/checkbox.styles.ts +++ b/src/components/checkbox/checkbox.styles.ts @@ -13,7 +13,7 @@ export default css` align-items: top; font-family: var(--sl-input-font-family); font-weight: var(--sl-input-font-weight); - color: var(--sl-input-color); + color: var(--sl-input-label-color); vertical-align: middle; cursor: pointer; } diff --git a/src/components/radio/radio.styles.ts b/src/components/radio/radio.styles.ts index 659845b5..e1ec20cb 100644 --- a/src/components/radio/radio.styles.ts +++ b/src/components/radio/radio.styles.ts @@ -18,7 +18,7 @@ export default css` font-family: var(--sl-input-font-family); font-size: var(--sl-input-font-size-medium); font-weight: var(--sl-input-font-weight); - color: var(--sl-input-color); + color: var(--sl-input-label-color); vertical-align: middle; cursor: pointer; } diff --git a/src/components/switch/switch.styles.ts b/src/components/switch/switch.styles.ts index a165ca69..851713a7 100644 --- a/src/components/switch/switch.styles.ts +++ b/src/components/switch/switch.styles.ts @@ -38,7 +38,7 @@ export default css` font-family: var(--sl-input-font-family); font-size: inherit; font-weight: var(--sl-input-font-weight); - color: var(--sl-input-color); + color: var(--sl-input-label-color); vertical-align: middle; cursor: pointer; }