From 1d0621951bcf880f97d9b82206c4d4ff3cca114b Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sun, 5 Jun 2016 09:23:36 +0930 Subject: [PATCH] Make alert control color consistent on focus --- framework/core/less/lib/Alert.less | 31 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/framework/core/less/lib/Alert.less b/framework/core/less/lib/Alert.less index 7f493fcac..05495106f 100755 --- a/framework/core/less/lib/Alert.less +++ b/framework/core/less/lib/Alert.less @@ -1,30 +1,35 @@ .Alert { padding: 12px 16px; border-radius: @border-radius; - background: @alert-bg; line-height: 1.5; - &, .Button, .Button:hover { - color: @alert-color; - } + .Alert--color(@alert-color, @alert-bg); } .Alert--error { - background: @alert-error-bg; - - &, a, a:hover, .Button, .Button:hover { - color: @alert-error-color; - } + .Alert--color(@alert-error-color, @alert-error-bg); } .Alert--success { - background: @alert-success-bg; + .Alert--color(@alert-success-color, @alert-success-bg); - &, a, a:hover, .Button, .Button:hover { - color: @alert-success-color; - } a, a:hover { text-decoration: underline; } } +.Alert--color(@color; @background) { + background: @background; + + &, + a, + a:hover, + .Button, + .Button:hover, + .Button:active, + .Button.active, + .Button:focus, + .Button.focus { + color: @color; + } +} .Alert-controls { list-style-type: none; padding: 0;