Skip to content

Commit 603744b

Browse files
authored
fix: tag colors for emphasis strong (#1454)
* fix: colors for tag to work with dark-mode * fix: tag colors for strong emphasis
1 parent 979414b commit 603744b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

packages/components/src/styles/tag-components.scss

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22
@use "@db-ui/foundations/build/scss/color/color-variants" as *;
33
@use "@db-ui/foundations/build/scss/helpers/component" as *;
44

5+
@mixin overwrite-strong-white() {
6+
/* We force white as color for strong tags */
7+
--db-current-color: #fff;
8+
color: var(--db-current-color);
9+
}
10+
511
@mixin get-tag-colors() {
612
@extend %db-bg-neutral-strong;
713

814
&[data-emphasis="strong"] {
915
@extend %db-neutral-component;
16+
@include overwrite-strong-white();
1017
}
1118

1219
@each $name, $colors in $component-variants {
@@ -16,24 +23,32 @@
1623

1724
&[data-emphasis="strong"] {
1825
@extend %db-critical-component;
26+
27+
@include overwrite-strong-white();
1928
}
2029
} @else if ($name == "informational") {
2130
@extend %db-bg-informational;
2231

2332
&[data-emphasis="strong"] {
2433
@extend %db-informational-component;
34+
35+
@include overwrite-strong-white();
2536
}
2637
} @else if ($name == "warning") {
2738
@extend %db-bg-warning;
2839

2940
&[data-emphasis="strong"] {
3041
@extend %db-warning-component;
42+
43+
@include overwrite-strong-white();
3144
}
3245
} @else if ($name == "successful") {
3346
@extend %db-bg-successful;
3447

3548
&[data-emphasis="strong"] {
3649
@extend %db-successful-component;
50+
51+
@include overwrite-strong-white();
3752
}
3853
}
3954

@@ -45,6 +60,10 @@
4560
}
4661

4762
@mixin get-tag-colors-interactive() {
63+
&[data-emphasis="strong"] {
64+
@include overwrite-strong-white();
65+
}
66+
4867
&:has(input:not(:checked)) {
4968
@extend %db-bg-neutral;
5069
}
@@ -54,6 +73,7 @@
5473

5574
&[data-emphasis="strong"] {
5675
@extend %db-neutral-component-ia;
76+
@include overwrite-strong-white();
5777
}
5878

5979
@each $name, $colors in $component-variants {
@@ -63,24 +83,32 @@
6383

6484
&[data-emphasis="strong"] {
6585
@extend %db-critical-component-ia;
86+
87+
@include overwrite-strong-white();
6688
}
6789
} @else if ($name == "informational") {
6890
@extend %db-bg-informational-ia;
6991

7092
&[data-emphasis="strong"] {
7193
@extend %db-informational-component-ia;
94+
95+
@include overwrite-strong-white();
7296
}
7397
} @else if ($name == "warning") {
7498
@extend %db-bg-warning-ia;
7599

76100
&[data-emphasis="strong"] {
77101
@extend %db-warning-component-ia;
102+
103+
@include overwrite-strong-white();
78104
}
79105
} @else if ($name == "successful") {
80106
@extend %db-bg-successful-ia;
81107

82108
&[data-emphasis="strong"] {
83109
@extend %db-successful-component-ia;
110+
111+
@include overwrite-strong-white();
84112
}
85113
}
86114

0 commit comments

Comments
 (0)