Skip to content

Commit 96dbffa

Browse files
authored
Improve label contrast in dark theme (#2185)
1 parent 8bae948 commit 96dbffa

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.changeset/metal-sloths-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudfour/patterns': minor
3+
---
4+
5+
Increases contrast of `label` element text inside of dark theme containers.

src/base/_defaults.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@ address {
308308
font-style: normal;
309309
}
310310

311+
/**
312+
* Labels
313+
*/
314+
315+
label {
316+
color: var(--theme-color-text-label);
317+
}
318+
311319
/**
312320
* Horizontal rules
313321
*

src/base/_themes.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
--theme-color-text-base: #{color.$text-dark};
2424
--theme-color-text-code: #{color.$text-code};
2525
--theme-color-text-emphasis: var(--theme-color-text-base);
26+
--theme-color-text-label: inherit;
2627
--theme-color-text-muted: #{color.$text-dark-muted};
2728
--theme-opacity-del: #{opacity.$muted};
2829
}
@@ -42,6 +43,7 @@
4243
--theme-color-text-base: #{color.$text-light};
4344
--theme-color-text-code: var(--theme-color-text-emphasis);
4445
--theme-color-text-emphasis: #{color.$text-light-emphasis};
46+
--theme-color-text-label: var(--theme-color-text-emphasis);
4547
--theme-color-text-muted: #{color.$text-light};
4648
--theme-opacity-del: 1;
4749
}

0 commit comments

Comments
 (0)