Make alert control color consistent on focus

This commit is contained in:
Toby Zerner 2016-06-05 09:23:36 +09:30
parent 6db27dff4f
commit 0b3cc0c18f

View File

@ -1,30 +1,35 @@
.Alert { .Alert {
padding: 12px 16px; padding: 12px 16px;
border-radius: @border-radius; border-radius: @border-radius;
background: @alert-bg;
line-height: 1.5; line-height: 1.5;
&, .Button, .Button:hover { .Alert--color(@alert-color, @alert-bg);
color: @alert-color;
}
} }
.Alert--error { .Alert--error {
background: @alert-error-bg; .Alert--color(@alert-error-color, @alert-error-bg);
&, a, a:hover, .Button, .Button:hover {
color: @alert-error-color;
}
} }
.Alert--success { .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 { a, a:hover {
text-decoration: underline; 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 { .Alert-controls {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;