mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
*really* refactor the buttons and update them all over the docs
This commit is contained in:
@@ -130,10 +130,10 @@
|
||||
|
||||
|
||||
// Account for other colors
|
||||
.primary,
|
||||
.danger,
|
||||
.info,
|
||||
.success {
|
||||
.btn-primary,
|
||||
.btn-danger,
|
||||
.btn-info,
|
||||
.btn-success {
|
||||
.caret {
|
||||
border-top-color: @white;
|
||||
.opacity(75);
|
||||
@@ -141,7 +141,7 @@
|
||||
}
|
||||
|
||||
// Small button dropdowns
|
||||
.btn.small .caret {
|
||||
.btn-small .caret {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
|
||||
+26
-26
@@ -44,7 +44,7 @@
|
||||
}
|
||||
|
||||
// Active state
|
||||
.btn.active,
|
||||
.btn-active,
|
||||
.btn:active {
|
||||
background-image: none;
|
||||
@shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
|
||||
@@ -56,7 +56,7 @@
|
||||
}
|
||||
|
||||
// Disabled state
|
||||
.btn.disabled,
|
||||
.btn-disabled,
|
||||
.btn[disabled] {
|
||||
cursor: default;
|
||||
background-image: none;
|
||||
@@ -70,23 +70,23 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
// Large
|
||||
.btn.large {
|
||||
.btn-large {
|
||||
padding: 9px 14px;
|
||||
font-size: @baseFontSize + 2px;
|
||||
line-height: normal;
|
||||
.border-radius(5px);
|
||||
}
|
||||
.btn.large .icon {
|
||||
.btn-large .icon {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
// Small
|
||||
.btn.small {
|
||||
.btn-small {
|
||||
padding: 5px 9px;
|
||||
font-size: @baseFontSize - 2px;
|
||||
line-height: @baseLineHeight - 2px;
|
||||
}
|
||||
.btn.small .icon {
|
||||
.btn-small .icon {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
@@ -96,47 +96,47 @@
|
||||
|
||||
// Set text color
|
||||
// -------------------------
|
||||
.btn.primary,
|
||||
.btn.primary:hover,
|
||||
.btn.warning,
|
||||
.btn.warning:hover,
|
||||
.btn.danger,
|
||||
.btn.danger:hover,
|
||||
.btn.success,
|
||||
.btn.success:hover,
|
||||
.btn.info,
|
||||
.btn.info:hover {
|
||||
.btn-primary,
|
||||
.btn-primary:hover,
|
||||
.btn-warning,
|
||||
.btn-warning:hover,
|
||||
.btn-danger,
|
||||
.btn-danger:hover,
|
||||
.btn-success,
|
||||
.btn-success:hover,
|
||||
.btn-info,
|
||||
.btn-info:hover {
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
||||
color: @white
|
||||
}
|
||||
// Provide *some* extra contrast for those who can get it
|
||||
.btn.primary.active,
|
||||
.btn.warning.active,
|
||||
.btn.danger.active,
|
||||
.btn.success.active,
|
||||
.btn.info.active {
|
||||
.btn-primary.active,
|
||||
.btn-warning.active,
|
||||
.btn-danger.active,
|
||||
.btn-success.active,
|
||||
.btn-info.active {
|
||||
color: rgba(255,255,255,.75);
|
||||
}
|
||||
|
||||
// Set the backgrounds
|
||||
// -------------------------
|
||||
.btn.primary {
|
||||
.btn-primary {
|
||||
.buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20));
|
||||
}
|
||||
// Warning appears are orange
|
||||
.btn.warning {
|
||||
.btn-warning {
|
||||
.buttonBackground(lighten(@orange, 15%), @orange);
|
||||
}
|
||||
// Danger and error appear as red
|
||||
.btn.danger {
|
||||
.btn-danger {
|
||||
.buttonBackground(#ee5f5b, #bd362f);
|
||||
}
|
||||
// Success appears as green
|
||||
.btn.success {
|
||||
.btn-success {
|
||||
.buttonBackground(#62c462, #51a351);
|
||||
}
|
||||
// Info appears as a neutral blue
|
||||
.btn.info {
|
||||
.btn-info {
|
||||
.buttonBackground(#5bc0de, #2f96b4);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user