refactor: Use variables for repeated colors in alerts.scss.

This commit is contained in:
Thomas Ip 2019-06-20 17:49:14 +08:00 committed by Tim Abbott
parent 1fa82b9dea
commit 549338dc50
1 changed files with 10 additions and 7 deletions

View File

@ -1,3 +1,6 @@
$alert-red: hsl(16, 60%, 45%);
$alert-error-red: hsl(0, 80%, 40%);
.alert-display { .alert-display {
display: none; display: none;
@ -62,9 +65,9 @@
text-shadow: none; text-shadow: none;
color: hsl(16, 60%, 45%); color: $alert-red;
border: 1px solid hsl(16, 60%, 45%); border: 1px solid $alert-red;
box-shadow: 0 0 2px hsl(16, 60%, 45%); box-shadow: 0 0 2px $alert-red;
&::before { &::before {
position: absolute; position: absolute;
@ -79,12 +82,12 @@
} }
&.alert-error { &.alert-error {
color: hsl(0, 80%, 40%); color: $alert-error-red;
border: 1px solid hsl(0, 80%, 40%); border: 1px solid $alert-error-red;
box-shadow: 0 0 2px hsl(0, 80%, 40%); box-shadow: 0 0 2px $alert-error-red;
&::before { &::before {
color: hsl(0, 80%, 40%); color: $alert-error-red;
} }
} }