mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-19 16:54:24 +01:00
More button tweaks
This commit is contained in:
parent
afef81c0d7
commit
9b4e5746a4
170
docs/assets/css/bootstrap.css
vendored
170
docs/assets/css/bootstrap.css
vendored
@ -180,6 +180,27 @@ textarea {
|
||||
}
|
||||
}
|
||||
|
||||
/*.buttonBackground(@startColor, @endColor, @text-color: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
|
||||
color: @text-color;
|
||||
text-shadow: @textShadow;
|
||||
#gradient > .vertical(@startColor, @endColor);
|
||||
border-color: @endColor @endColor darken(@endColor, 15%);
|
||||
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
|
||||
.reset-filter();
|
||||
|
||||
// in these cases the gradient won't cover the background, so we override
|
||||
&:hover, &:active, &.active, &.disabled, &[disabled] {
|
||||
color: @text-color;
|
||||
background-color: @endColor;
|
||||
}
|
||||
|
||||
// IE8 can't handle box-shadow to show active, so we darken a bit ourselves
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: darken(@endColor, 10%) e("\9");
|
||||
}
|
||||
}*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
color: #333333;
|
||||
@ -2541,22 +2562,27 @@ button.close {
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 7px 13px;
|
||||
padding: 6px 13px;
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
line-height: 20px;
|
||||
color: #555555;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background-color: #eee;
|
||||
border: 0;
|
||||
background-color: #f0f0f0;
|
||||
background-image: -moz-linear-gradient(top, #fafafa, #e1e1e1);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#e1e1e1));
|
||||
background-image: -webkit-linear-gradient(top, #fafafa, #e1e1e1);
|
||||
background-image: -o-linear-gradient(top, #fafafa, #e1e1e1);
|
||||
background-image: linear-gradient(to bottom, #fafafa, #e1e1e1);
|
||||
background-repeat: repeat-x;
|
||||
border: 1px solid #c7c7c7;
|
||||
border-radius: 4px;
|
||||
-webkit-transition: all 0.075s ease-in-out;
|
||||
-moz-transition: all 0.075s ease-in-out;
|
||||
-o-transition: all 0.075s ease-in-out;
|
||||
transition: all 0.075s ease-in-out;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
.btn:focus {
|
||||
@ -2567,14 +2593,14 @@ button.close {
|
||||
|
||||
.btn:hover {
|
||||
text-decoration: none;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.btn:active,
|
||||
.btn.active {
|
||||
background-image: none;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.btn.disabled,
|
||||
@ -2640,50 +2666,110 @@ input[type="button"].btn-block {
|
||||
|
||||
.btn-primary {
|
||||
color: #ffffff;
|
||||
background-color: #0088cc;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #003bb3;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-primary:hover,
|
||||
.btn-primary:active,
|
||||
.btn-primary.active {
|
||||
color: #ffffff;
|
||||
background-color: #006699;
|
||||
background-color: #0044cc;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-primary:active,
|
||||
.btn-primary.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
color: #ffffff;
|
||||
background-color: #fbb450;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #faa732;
|
||||
background-image: -moz-linear-gradient(top, #fbb450, #f89406);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
|
||||
background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
|
||||
background-image: -o-linear-gradient(top, #fbb450, #f89406);
|
||||
background-image: linear-gradient(to bottom, #fbb450, #f89406);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #df8505;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-warning:hover,
|
||||
.btn-warning:active,
|
||||
.btn-warning.active {
|
||||
color: #ffffff;
|
||||
background-color: #fa9f1e;
|
||||
background-color: #f89406;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-warning:active,
|
||||
.btn-warning.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
color: #ffffff;
|
||||
background-color: #ee5f5b;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #da4f49;
|
||||
background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
|
||||
background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
|
||||
background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
|
||||
background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #a9302a;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-danger:hover,
|
||||
.btn-danger:active,
|
||||
.btn-danger.active {
|
||||
color: #ffffff;
|
||||
background-color: #e9322d;
|
||||
background-color: #bd362f;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-danger:active,
|
||||
.btn-danger.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
color: #ffffff;
|
||||
background-color: #62c462;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #5bb75b;
|
||||
background-image: -moz-linear-gradient(top, #62c462, #51a351);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
|
||||
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
|
||||
background-image: -o-linear-gradient(top, #62c462, #51a351);
|
||||
background-image: linear-gradient(to bottom, #62c462, #51a351);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #499249;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-success:hover,
|
||||
.btn-success:active,
|
||||
.btn-success.active {
|
||||
color: #ffffff;
|
||||
background-color: #42b142;
|
||||
background-color: #51a351;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-success:active,
|
||||
.btn-success.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
@ -3469,8 +3555,17 @@ input[type="button"].btn-block {
|
||||
padding: 7px 10px;
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
color: #e5e5e5;
|
||||
background-color: #f2f2f2;
|
||||
color: #ffffff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #ededed;
|
||||
background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
|
||||
background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
|
||||
background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
|
||||
background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #d9d9d9;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
|
||||
}
|
||||
@ -3478,8 +3573,14 @@ input[type="button"].btn-block {
|
||||
.navbar .btn-navbar:hover,
|
||||
.navbar .btn-navbar:active,
|
||||
.navbar .btn-navbar.active {
|
||||
color: #e5e5e5;
|
||||
background-color: #d9d9d9;
|
||||
color: #ffffff;
|
||||
background-color: #e5e5e5;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.navbar .btn-navbar:active,
|
||||
.navbar .btn-navbar.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.navbar .btn-navbar .icon-bar {
|
||||
@ -3703,15 +3804,30 @@ input[type="button"].btn-block {
|
||||
}
|
||||
|
||||
.navbar-inverse .btn-navbar {
|
||||
color: #040404;
|
||||
background-color: #151515;
|
||||
color: #ffffff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #0e0e0e;
|
||||
background-image: -moz-linear-gradient(top, #151515, #040404);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));
|
||||
background-image: -webkit-linear-gradient(top, #151515, #040404);
|
||||
background-image: -o-linear-gradient(top, #151515, #040404);
|
||||
background-image: linear-gradient(to bottom, #151515, #040404);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #000000;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);
|
||||
}
|
||||
|
||||
.navbar-inverse .btn-navbar:hover,
|
||||
.navbar-inverse .btn-navbar:active,
|
||||
.navbar-inverse .btn-navbar.active {
|
||||
color: #040404;
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
background-color: #040404;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.navbar-inverse .btn-navbar:active,
|
||||
.navbar-inverse .btn-navbar.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
|
@ -126,16 +126,16 @@
|
||||
background-color: @btn-background-highlight;
|
||||
}
|
||||
.btn-primary.dropdown-toggle {
|
||||
background-color: @btn-backround-primary-highlight;
|
||||
background-color: @btn-background-primary-highlight;
|
||||
}
|
||||
.btn-warning.dropdown-toggle {
|
||||
background-color: @btn-backround-warning-highlight;
|
||||
background-color: @btn-background-warning-highlight;
|
||||
}
|
||||
.btn-danger.dropdown-toggle {
|
||||
background-color: @btn-backround-danger-highlight;
|
||||
background-color: @btn-background-danger-highlight;
|
||||
}
|
||||
.btn-success.dropdown-toggle {
|
||||
background-color: @btn-backround-success-highlight;
|
||||
background-color: @btn-background-success-highlight;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,19 +9,19 @@
|
||||
// Core styles
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 7px 13px;
|
||||
padding: 6px 13px;
|
||||
margin-bottom: 0; // For input.btn
|
||||
font-size: @font-size-base;
|
||||
font-weight: bold;
|
||||
line-height: @line-height-base;
|
||||
text-align: center;
|
||||
color: @gray;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 rgba(255,255,255,.75);
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background-color: #eee;
|
||||
border: 0;
|
||||
#gradient > .vertical(@btn-background, @btn-background-highlight);
|
||||
border: 1px solid darken(@btn-background, 20%);
|
||||
border-radius: @border-radius-base;
|
||||
.transition(all .075s ease-in-out);
|
||||
.box-shadow(inset 0 1px 0 rgba(255,255,255,.25));
|
||||
|
||||
&:focus {
|
||||
.tab-focus();
|
||||
@ -29,13 +29,13 @@
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
outline: 0;
|
||||
.box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 0 rgba(255,255,255,.1)");
|
||||
background-image: none;
|
||||
.box-shadow(~"inset 0 3px 5px rgba(0,0,0,.15), 0 1px 0 rgba(255,255,255,.1)");
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
@ -116,19 +116,19 @@ input[type="button"] {
|
||||
// --------------------------------------------------
|
||||
|
||||
.btn-primary {
|
||||
.buttonBackground(@btn-backround-primary);
|
||||
.buttonBackground(@btn-background-primary, @btn-background-primary-highlight);
|
||||
}
|
||||
// Warning appears are orange
|
||||
.btn-warning {
|
||||
.buttonBackground(@btn-backround-warning);
|
||||
.buttonBackground(@btn-background-warning, @btn-background-warning-highlight);
|
||||
}
|
||||
// Danger and error appear as red
|
||||
.btn-danger {
|
||||
.buttonBackground(@btn-backround-danger);
|
||||
.buttonBackground(@btn-background-danger, @btn-background-danger-highlight);
|
||||
}
|
||||
// Success appears as green
|
||||
.btn-success {
|
||||
.buttonBackground(@btn-backround-success);
|
||||
.buttonBackground(@btn-background-success, @btn-background-success-highlight);
|
||||
}
|
||||
|
||||
|
||||
|
@ -405,17 +405,46 @@
|
||||
|
||||
// Button backgrounds
|
||||
// ------------------
|
||||
.buttonBackground(@background-color: #333, @text-color: #fff) {
|
||||
/*.buttonBackground(@startColor, @endColor, @text-color: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
|
||||
color: @text-color;
|
||||
background-color: @background-color;
|
||||
text-shadow: @textShadow;
|
||||
#gradient > .vertical(@startColor, @endColor);
|
||||
border-color: @endColor @endColor darken(@endColor, 15%);
|
||||
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
|
||||
.reset-filter();
|
||||
|
||||
// in these cases the gradient won't cover the background, so we override
|
||||
&:hover, &:active, &.active, &.disabled, &[disabled] {
|
||||
color: @text-color;
|
||||
background-color: @endColor;
|
||||
}
|
||||
|
||||
// IE8 can't handle box-shadow to show active, so we darken a bit ourselves
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: darken(@endColor, 10%) e("\9");
|
||||
}
|
||||
}*/
|
||||
|
||||
// Button backgrounds
|
||||
// ------------------
|
||||
.buttonBackground(@background-start, @background-end, @text-color: #fff, @text-shadow: 0 -1px 0 rgba(0,0,0,.25)) {
|
||||
color: @text-color;
|
||||
text-shadow: @text-shadow;
|
||||
#gradient > .vertical(@background-start, @background-end);
|
||||
border-color: darken(@background-end, 5%);
|
||||
|
||||
&:hover,
|
||||
&:active,
|
||||
&.active {
|
||||
color: @text-color;
|
||||
background-color: darken(@background-color, 10%);
|
||||
background-position: 0 -15px;
|
||||
background-color: @background-end;
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,19 +77,18 @@
|
||||
|
||||
@btn-background: #fafafa;
|
||||
@btn-background-highlight: darken(@btn-background, 10%);
|
||||
@btn-border: #bbb;
|
||||
|
||||
@btn-backround-primary: @link-color;
|
||||
@btn-backround-primary-highlight: spin(@btn-backround-primary, 20%);
|
||||
@btn-background-primary: @link-color;
|
||||
@btn-background-primary-highlight: spin(@btn-background-primary, 20%);
|
||||
|
||||
@btn-backround-success: #62c462;
|
||||
@btn-backround-success-highlight: #51a351;
|
||||
@btn-background-success: #62c462;
|
||||
@btn-background-success-highlight: #51a351;
|
||||
|
||||
@btn-backround-warning: lighten(#f89406, 15%);
|
||||
@btn-backround-warning-highlight: #f89406;
|
||||
@btn-background-warning: lighten(#f89406, 15%);
|
||||
@btn-background-warning-highlight: #f89406;
|
||||
|
||||
@btn-backround-danger: #ee5f5b;
|
||||
@btn-backround-danger-highlight: #bd362f;
|
||||
@btn-background-danger: #ee5f5b;
|
||||
@btn-background-danger-highlight: #bd362f;
|
||||
|
||||
|
||||
// Forms
|
||||
|
Loading…
x
Reference in New Issue
Block a user