0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

finetune buttons flattened colors

This commit is contained in:
Mark Otto 2013-01-12 17:51:57 -08:00
parent ff02043bbc
commit a9a66e9c34
4 changed files with 151 additions and 78 deletions

View File

@ -219,12 +219,12 @@ textarea {
} }
a { a {
color: #0088cc; color: #428bca;
text-decoration: none; text-decoration: none;
} }
a:hover { a:hover {
color: #005580; color: #2a6496;
text-decoration: underline; text-decoration: underline;
} }
@ -2260,29 +2260,29 @@ table th[class*="span"] {
.dropdown-menu li > a:focus { .dropdown-menu li > a:focus {
color: #ffffff; color: #ffffff;
text-decoration: none; text-decoration: none;
background-color: #0077b3; background-color: #357ebd;
background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -moz-linear-gradient(top, #428bca, #357ebd);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#428bca), to(#357ebd));
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-linear-gradient(top, #428bca, #357ebd);
background-image: -o-linear-gradient(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #428bca, #357ebd);
background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-image: linear-gradient(to bottom, #428bca, #357ebd);
background-repeat: repeat-x; background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
} }
.dropdown-menu > .active > a, .dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover { .dropdown-menu > .active > a:hover {
color: #ffffff; color: #ffffff;
text-decoration: none; text-decoration: none;
background-color: #0077b3; background-color: #357ebd;
background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -moz-linear-gradient(top, #428bca, #357ebd);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#428bca), to(#357ebd));
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-linear-gradient(top, #428bca, #357ebd);
background-image: -o-linear-gradient(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #428bca, #357ebd);
background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-image: linear-gradient(to bottom, #428bca, #357ebd);
background-repeat: repeat-x; background-repeat: repeat-x;
outline: 0; outline: 0;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
} }
.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a,
@ -2411,15 +2411,16 @@ button.close {
.btn { .btn {
display: inline-block; display: inline-block;
padding: 7px 13px; padding: 6px 12px;
margin-bottom: 0; margin-bottom: 0;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
line-height: 20px; line-height: 20px;
text-align: center; text-align: center;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
border: 0; border: 1px solid #a7a9aa;
border-radius: 4px; border-radius: 4px;
} }
@ -2437,8 +2438,8 @@ button.close {
.btn.active { .btn.active {
background-image: none; background-image: none;
outline: 0; outline: 0;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 1px 0 rgba(255, 255, 255, 0.1); -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 1px 0 rgba(255, 255, 255, 0.1); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
} }
.btn.disabled, .btn.disabled,
@ -2505,23 +2506,63 @@ input[type="button"].btn-block {
.btn { .btn {
color: #fff; color: #fff;
background-color: #ccc; background-color: #a7a9aa;
border-color: #a7a9aa;
}
.btn:hover,
.btn:focus,
.btn:active {
background-color: #9a9c9d;
border-color: #8d9091;
} }
.btn-primary { .btn-primary {
background-color: #0088cc; background-color: #428bca;
border-color: #428bca;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
background-color: #357ebd;
border-color: #3071a9;
} }
.btn-warning { .btn-warning {
background-color: #fbb450; background-color: #f0ad4e;
border-color: #f0ad4e;
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
background-color: #eea236;
border-color: #ec971f;
} }
.btn-danger { .btn-danger {
background-color: #ee5f5b; background-color: #d9534f;
border-color: #d9534f;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
background-color: #d43f3a;
border-color: #c9302c;
} }
.btn-success { .btn-success {
background-color: #62c462; background-color: #5cb85c;
border-color: #5cb85c;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
background-color: #4cae4c;
border-color: #449d44;
} }
.btn-link, .btn-link,
@ -2535,14 +2576,15 @@ fieldset[disabled] .btn-link {
} }
.btn-link { .btn-link {
color: #0088cc; font-weight: normal;
color: #428bca;
cursor: pointer; cursor: pointer;
border-color: transparent; border-color: transparent;
border-radius: 0; border-radius: 0;
} }
.btn-link:hover { .btn-link:hover {
color: #005580; color: #2a6496;
text-decoration: underline; text-decoration: underline;
background-color: transparent; background-color: transparent;
} }
@ -2649,32 +2691,32 @@ fieldset[disabled] .btn-link:hover {
padding-left: 12px; padding-left: 12px;
} }
.btn-group.open {
/* .btn.dropdown-toggle {
background-color: @btn-background-highlight;
}
.btn-primary.dropdown-toggle {
background-color: @btn-background-primary-highlight;
}
.btn-warning.dropdown-toggle {
background-color: @btn-background-warning-highlight;
}
.btn-danger.dropdown-toggle {
background-color: @btn-background-danger-highlight;
}
.btn-success.dropdown-toggle {
background-color: @btn-background-success-highlight;
}
*/
}
.btn-group.open .dropdown-toggle { .btn-group.open .dropdown-toggle {
background-image: none; background-image: none;
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
} }
.btn-group.open .btn.dropdown-toggle {
background-color: #eaeaea;
}
.btn-group.open .btn-primary.dropdown-toggle {
background-color: #006699;
}
.btn-group.open .btn-warning.dropdown-toggle {
background-color: #f89406;
}
.btn-group.open .btn-danger.dropdown-toggle {
background-color: #bd362f;
}
.btn-group.open .btn-success.dropdown-toggle {
background-color: #51a351;
}
.btn .caret { .btn .caret {
margin-top: 8px; margin-top: 8px;
margin-left: 0; margin-left: 0;
@ -2908,7 +2950,7 @@ fieldset[disabled] .btn-link:hover {
.nav-pills > .active > a, .nav-pills > .active > a,
.nav-pills > .active > a:hover { .nav-pills > .active > a:hover {
color: #fff; color: #fff;
background-color: #0088cc; background-color: #428bca;
} }
.nav-stacked > li { .nav-stacked > li {
@ -2966,7 +3008,7 @@ fieldset[disabled] .btn-link:hover {
padding: 9px 15px; padding: 9px 15px;
color: #fff; color: #fff;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
background-color: #0088cc; background-color: #428bca;
border-width: 0; border-width: 0;
-webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.1), inset -1px 0 0 rgba(0, 0, 0, 0.1); -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.1), inset -1px 0 0 rgba(0, 0, 0, 0.1);
box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.1), inset -1px 0 0 rgba(0, 0, 0, 0.1); box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.1), inset -1px 0 0 rgba(0, 0, 0, 0.1);
@ -2979,13 +3021,13 @@ fieldset[disabled] .btn-link:hover {
.nav .dropdown-toggle .caret { .nav .dropdown-toggle .caret {
margin-top: 8px; margin-top: 8px;
border-top-color: #0088cc; border-top-color: #428bca;
border-bottom-color: #0088cc; border-bottom-color: #428bca;
} }
.nav .dropdown-toggle:hover .caret { .nav .dropdown-toggle:hover .caret {
border-top-color: #005580; border-top-color: #2a6496;
border-bottom-color: #005580; border-bottom-color: #2a6496;
} }
.nav .active .dropdown-toggle .caret { .nav .active .dropdown-toggle .caret {
@ -4072,7 +4114,7 @@ fieldset[disabled] .navbar-inverse .btn-navbar {
} }
a.thumbnail:hover { a.thumbnail:hover {
border-color: #0088cc; border-color: #428bca;
-webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
} }

View File

@ -107,7 +107,7 @@
} }
// Keep the hover's background when dropdown is open // Keep the hover's background when dropdown is open
.btn.dropdown-toggle { /* .btn.dropdown-toggle {
background-color: @btn-background-highlight; background-color: @btn-background-highlight;
} }
.btn-primary.dropdown-toggle { .btn-primary.dropdown-toggle {
@ -122,7 +122,7 @@
.btn-success.dropdown-toggle { .btn-success.dropdown-toggle {
background-color: @btn-background-success-highlight; background-color: @btn-background-success-highlight;
} }
} */}
// Reposition the caret // Reposition the caret

View File

@ -9,17 +9,17 @@
// Core styles // Core styles
.btn { .btn {
display: inline-block; display: inline-block;
padding: 7px 13px; padding: 6px 12px;
margin-bottom: 0; // For input.btn margin-bottom: 0; // For input.btn
font-size: @font-size-base; font-size: @font-size-base;
font-weight: bold; font-weight: bold;
line-height: @line-height-base; line-height: @line-height-base;
text-align: center; text-align: center;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
border: 0; border: 1px solid @btn-border;
border-radius: @border-radius-base; border-radius: @border-radius-base;
//.box-shadow(inset 0 1px 0 rgba(255,255,255,.25));
&:focus { &:focus {
.tab-focus(); .tab-focus();
@ -33,7 +33,7 @@
&.active { &.active {
outline: 0; outline: 0;
background-image: none; background-image: none;
.box-shadow(~"inset 0 3px 5px rgba(0,0,0,.125), 0 1px 0 rgba(255,255,255,.1)"); .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
} }
&.disabled, &.disabled,
@ -116,28 +116,58 @@ input[type="button"] {
.btn { .btn {
color: #fff; color: #fff;
background-color: #ccc; background-color: @btn-background;
//.buttonBackground(@btn-background, @btn-background-highlight, @gray, 0 1px 0 rgba(255,255,255,.75)); border-color: @btn-border;
&:hover,
&:focus,
&:active {
background-color: darken(@btn-background, 5%);
border-color: darken(@btn-border, 10%);
}
} }
// Primary appears as blue // Primary appears as blue
.btn-primary { .btn-primary {
background-color: @btn-background-primary; background-color: @btn-background-primary;
//.buttonBackground(@btn-background-primary, @btn-background-primary-highlight); border-color: @btn-border-primary;
&:hover,
&:focus,
&:active {
background-color: darken(@btn-background-primary, 5%);
border-color: darken(@btn-border-primary, 10%);
}
} }
// Warning appears are orange // Warning appears are orange
.btn-warning { .btn-warning {
background-color: @btn-background-warning; background-color: @btn-background-warning;
//.buttonBackground(@btn-background-warning, @btn-background-warning-highlight); border-color: @btn-border-warning;
&:hover,
&:focus,
&:active {
background-color: darken(@btn-background-warning, 5%);
border-color: darken(@btn-border-warning, 10%);
}
} }
// Danger and error appear as red // Danger and error appear as red
.btn-danger { .btn-danger {
background-color: @btn-background-danger; background-color: @btn-background-danger;
//.buttonBackground(@btn-background-danger, @btn-background-danger-highlight); border-color: @btn-border-danger;
&:hover,
&:focus,
&:active {
background-color: darken(@btn-background-danger, 5%);
border-color: darken(@btn-border-danger, 10%);
}
} }
// Success appears as green // Success appears as green
.btn-success { .btn-success {
background-color: @btn-background-success; background-color: @btn-background-success;
//.buttonBackground(@btn-background-success, @btn-background-success-highlight); border-color: @btn-border-success;
&:hover,
&:focus,
&:active {
background-color: darken(@btn-background-success, 5%);
border-color: darken(@btn-border-success, 10%);
}
} }
@ -154,9 +184,10 @@ fieldset[disabled] .btn-link {
.box-shadow(none); .box-shadow(none);
} }
.btn-link { .btn-link {
border-color: transparent;
cursor: pointer;
color: @link-color; color: @link-color;
font-weight: normal;
cursor: pointer;
border-color: transparent;
border-radius: 0; border-radius: 0;
} }
.btn-link:hover { .btn-link:hover {

View File

@ -26,7 +26,7 @@
// Links // Links
// ------------------------- // -------------------------
@link-color: #08c; @link-color: #428bca;
@link-color-hover: darken(@link-color, 15%); @link-color-hover: darken(@link-color, 15%);
@ -75,20 +75,20 @@
// Buttons // Buttons
// ------------------------- // -------------------------
@btn-background: #fff; @btn-background: #a7a9aa;
@btn-background-highlight: #eaeaea; @btn-border: @btn-background;
@btn-background-primary: @link-color; @btn-background-primary: @link-color;
@btn-background-primary-highlight: darken(@link-color, 10%); @btn-border-primary: @btn-background-primary;
@btn-background-success: #62c462; @btn-background-success: #5cb85c;
@btn-background-success-highlight: #51a351; @btn-border-success: @btn-background-success;
@btn-background-warning: lighten(#f89406, 15%); @btn-background-warning: #f0ad4e;
@btn-background-warning-highlight: #f89406; @btn-border-warning: @btn-background-warning;
@btn-background-danger: #ee5f5b; @btn-background-danger: #d9534f;
@btn-background-danger-highlight: #bd362f; @btn-border-danger: @btn-background-danger;
// Forms // Forms