File tree 3 files changed +19
-2
lines changed
packages/components/src/styles/components
3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @hashicorp/design-system-components " : minor
3
+ ---
4
+
5
+ ` Badge ` - Update foreground and background colors to improve contrast for a11y
6
+
7
+ ` BadgeCount ` - Update foreground color of neutral variant to improve contrast for a11y
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ $hds-badge-count-size-props: (
67
67
.hds-badge-count--color-neutral {
68
68
& .hds-badge-count--type-filled {
69
69
color : var (--token-color-foreground-primary );
70
- background-color : var (--token-color-surface-strong );
70
+ background-color : var (--token-color-palette-neutral-200 );
71
71
}
72
72
73
73
& .hds-badge-count--type-inverted {
Original file line number Diff line number Diff line change @@ -34,6 +34,16 @@ $hds-badge-colors-props: (
34
34
35
35
36
36
.hds-badge {
37
+ // Redefine color values to increase contrast
38
+ --token-color-surface-success : var (--token-color-palette-green-100 );
39
+ --token-color-foreground-success-on-surface : var (--token-color-palette-green-400 );
40
+ --token-color-surface-warning : var (--token-color-palette-amber-100 );
41
+ --token-color-foreground-warning-on-surface : var (--token-color-palette-amber-400 );
42
+ --token-color-surface-critical : var (--token-color-palette-red-100 );
43
+ --token-color-foreground-critical-on-surface : var (--token-color-palette-red-400 );
44
+ --token-color-surface-highlight : var (--token-color-palette-purple-100 );
45
+ --token-color-foreground-highlight-on-surface : var (--token-color-palette-purple-400 );
46
+
37
47
display : inline-flex ;
38
48
align-items : center ;
39
49
max-width : 100% ;
@@ -111,7 +121,7 @@ $hds-badge-size-props: (
111
121
.hds-badge--color-neutral {
112
122
& .hds-badge--type-filled {
113
123
color : var (--token-color-foreground-primary );
114
- background-color : var (--token-color-surface-strong );
124
+ background-color : var (--token-color-palette-neutral-200 );
115
125
}
116
126
117
127
& .hds-badge--type-inverted {
You can’t perform that action at this time.
0 commit comments