Merge and cleanup more CSS rules

This commit is contained in:
djmaze 2021-02-08 17:37:21 +01:00
parent e3e0474be2
commit 004378ed8c
22 changed files with 136 additions and 273 deletions

View file

@ -8,6 +8,8 @@
// Core
.btn {
border-radius: 3px;
display: inline-block;
padding: 4px 13px;
margin-bottom: 0; // For input.btn
@ -16,21 +18,16 @@
text-align: center;
vertical-align: middle;
cursor: pointer;
.buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75));
border: 1px solid @btnBorder;
border-color: rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25);
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
color: @grayDark;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
background-color: @btnBackground;
// Hover state
&:hover {
color: @grayDark;
text-decoration: none;
background-color: darken(@white, 10%);
background-position: 0 -15px;
// transition is only when going to hover, otherwise the background
// behind the gradient (there for IE<=9 fallback) gets mismatched
transition: background-position .1s linear;
opacity: 0.9;
}
// Focus state for keyboard and accessibility
@ -41,8 +38,7 @@
// Active state
&.active,
&:active {
background-color: darken(@white, 10%);
background-image: none;
opacity: 0.9;
outline: 0;
box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
}
@ -51,9 +47,7 @@
&.disabled,
&[disabled] {
cursor: default;
background-color: darken(@white, 10%);
background-image: none;
opacity: 0.8;
opacity: 0.7;
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
}
@ -67,7 +61,7 @@
// Large
.btn-large {
padding: 9px 14px;
font-size: @baseFontSize + 2px;
font-size: @baseFontSize + 3px;
line-height: normal;
border-radius: 5px;
}
@ -112,18 +106,21 @@
// -------------------------
.btn {
// reset here as of 2.0.3 due to Recess property order
border-color: #c5c5c5;
border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25);
}
// Warning appears are orange
.btn-warning {
.buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight);
color: #fff;
background-color: @btnWarningBackground;
}
// Danger and error appear as red
.btn-danger {
.buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
color: #fff;
background-color: @btnDangerBackground;
}
// Success appears as green
.btn-success {
.buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight);
background-color: @btnSuccessBackground;
color: #fff;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
}