From 549338dc50cc69e4a9be1126f875b9e1b998ea45 Mon Sep 17 00:00:00 2001 From: Thomas Ip Date: Thu, 20 Jun 2019 17:49:14 +0800 Subject: [PATCH] refactor: Use variables for repeated colors in alerts.scss. --- static/styles/alerts.scss | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/static/styles/alerts.scss b/static/styles/alerts.scss index dea20925d0..d9a2088cde 100644 --- a/static/styles/alerts.scss +++ b/static/styles/alerts.scss @@ -1,3 +1,6 @@ +$alert-red: hsl(16, 60%, 45%); +$alert-error-red: hsl(0, 80%, 40%); + .alert-display { display: none; @@ -62,9 +65,9 @@ text-shadow: none; - color: hsl(16, 60%, 45%); - border: 1px solid hsl(16, 60%, 45%); - box-shadow: 0 0 2px hsl(16, 60%, 45%); + color: $alert-red; + border: 1px solid $alert-red; + box-shadow: 0 0 2px $alert-red; &::before { position: absolute; @@ -79,12 +82,12 @@ } &.alert-error { - color: hsl(0, 80%, 40%); - border: 1px solid hsl(0, 80%, 40%); - box-shadow: 0 0 2px hsl(0, 80%, 40%); + color: $alert-error-red; + border: 1px solid $alert-error-red; + box-shadow: 0 0 2px $alert-error-red; &::before { - color: hsl(0, 80%, 40%); + color: $alert-error-red; } }