Skip to content

Commit d7c3414

Browse files
committed
fix(invalid): update default color
* fix alert for IE11 * fix badge for IE11
1 parent ad7c5fa commit d7c3414

File tree

8 files changed

+37
-18
lines changed

8 files changed

+37
-18
lines changed

docs/components/icon/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ hx-icon {
2828
}
2929

3030
&.danger {
31-
color: $red-900;
31+
color: $red-status-500;
3232
}
3333
}

src/elements/hx-toast/_shadow.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ button {
6969

7070
:host([type="error"]) {
7171
#hxIconWrapper {
72-
color: var(--hxIcon-color, $red-900);
72+
color: var(--hxIcon-color, $red-status-500);
7373
}
7474
}
7575

src/scss/components/alert/index.scss

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,46 @@
11
hx-alert {
2+
background-color: $gray-400;
23
background-color: var(--hxAlert-bgcolor, $gray-400);
4+
color: $gray-1000;
35
color: var(--hxAlert-color, $gray-1000);
46
display: block;
57
font-weight: 300;
68
line-height: 1.25rem;
79

810
&[type="info"] {
11+
background-color: $blue-100;
912
background-color: var(--hxAlert-info-bgcolor, $blue-100);
13+
color: $gray-1000;
1014
color: var(--hxAlert-info-color, $gray-1000);
1115
}
1216

1317
&[type="error"] {
14-
background-color: var(--hxAlert-error-bgcolor, $red-900);
18+
background-color: $red-status-500;
19+
background-color: var(--hxAlert-error-bgcolor, $red-status-500);
20+
color: $gray-0;
1521
color: var(--hxAlert-error-color, $gray-0);
1622
}
1723

1824
&[type="success"] {
25+
background-color: $green-500;
1926
background-color: var(--hxAlert-success-bgcolor, $green-500);
27+
color: $gray-0;
2028
color: var(--hxAlert-success-color, $gray-0);
2129
}
2230

2331
&[type="warning"] {
32+
background-color: $yellow-500;
2433
background-color: var(--hxAlert-warning-bgcolor, $yellow-500);
34+
color: $gray-1000;
2535
color: var(--hxAlert-warning-color, $gray-1000);
2636
}
2737
}
2838

2939
/* DEPRECATED: Remove in v1.0.0 */
3040
.hxAlert {
41+
background-color: $blue-100;
3142
background-color: var(--hxAlert-bgcolor, $blue-100);
43+
color: $gray-1000;
3244
color: var(--hxAlert-color, $gray-1000);
3345
display: flex;
3446
font-weight: 300;
@@ -40,16 +52,21 @@ hx-alert {
4052
}
4153

4254
&--error {
43-
background-color: var(--hxAlert-error-bgcolor, $red-900);
55+
background-color: $red-status-500;
56+
background-color: var(--hxAlert-error-bgcolor, $red-status-500);
57+
color: $gray-0;
4458
color: var(--hxAlert-error-color, $gray-0);
4559
}
4660

4761
&--warning {
62+
background-color: $yellow-500;
4863
background-color: var(--hxAlert-warning-bgcolor, $yellow-500);
4964
}
5065

5166
&--success {
67+
background-color: $green-500;
5268
background-color: var(--hxAlert-success-bgcolor, $green-500);
69+
color: $gray-0;
5370
color: var(--hxAlert-success-color, $gray-0);
5471
}
5572

src/scss/components/badge/index.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.hxBadge {
22
align-items: center;
3-
background-color: var(--hxBadge-bgcolor, $red-900);
3+
background-color: $red-status-500;
4+
background-color: var(--hxBadge-bgcolor, $red-status-500);
45
border-radius: 1em;
6+
color: $gray-0;
57
color: var(--hxBadge-color, $gray-0);
68
display: inline-flex;
79
height: 1.25em;

src/scss/components/form/_deprecated.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
}
3333

3434
&[invalid] {
35-
border: 2px solid $red-900;
35+
border: 2px solid $red-status-500;
3636
}
3737

3838
&[disabled] {

src/scss/components/selector-strip/_hxSelector.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
// invalid (unchecked)
8080
&[invalid] + span {
8181
background-color: $gray-0;
82-
border: 2px solid $red-900;
83-
color: $red-900;
82+
border: 2px solid $red-status-500;
83+
color: $red-status-500;
8484
}
8585

8686
// invalid (checked)
@@ -90,7 +90,7 @@
9090

9191
// invalid (focused)
9292
&[invalid]:focus + span {
93-
box-shadow: 0 0 4px 0 $red-900;
93+
box-shadow: 0 0 4px 0 $red-status-500;
9494
}
9595

9696
//invalid (pressed)

src/scss/components/switch/mixins/_hxSwitchControl.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,38 +55,38 @@
5555
box-shadow: $focus-glow-invalid;
5656

5757
&::-ms-check {
58-
border-color: $red-900;
58+
border-color: $red-status-500;
5959
}
6060
} @else if $pseudo-state == hover {
6161
&::-ms-check {
6262
background-color: $red-100;
6363
}
6464
} @else {
6565
@if $checkBox-state == checked {
66-
background-color: $red-900 !important;
67-
border: 0.125rem solid $red-900;
66+
background-color: $red-status-500 !important;
67+
border: 0.125rem solid $red-status-500;
6868

6969
&:after {
7070
color: $gray-0 !important;
7171
}
7272

7373
&:before {
7474
background-color: $gray-0;
75-
border: 0.125rem solid $red-900;
75+
border: 0.125rem solid $red-status-500;
7676
}
7777
} @else {
7878
background-color: $gray-0;
79-
border: 0.125rem solid $red-900 !important;
79+
border: 0.125rem solid $red-status-500 !important;
8080

8181
&::after {
82-
color: $red-900 !important;
82+
color: $red-status-500 !important;
8383
}
8484

8585
&::before {
8686
background-color: $gray-0;
87-
border: 0.125rem solid $red-900 !important;
87+
border: 0.125rem solid $red-status-500 !important;
8888
content: "\0021";// error state exclamation point
89-
color: $red-900;
89+
color: $red-status-500;
9090
font-size: 1.063rem;
9191
text-align: center;
9292
line-height: 1.813rem;

src/scss/components/toast/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ hx-toast {
4040

4141
&[type="error"] {
4242
&::after {
43-
border-left-color: $red-900;
43+
border-left-color: $red-status-500;
4444
}
4545
}
4646

0 commit comments

Comments
 (0)