2012-01-05 19:01:42 +01:00
|
|
|
// BUTTON STYLES
|
|
|
|
// -------------
|
|
|
|
|
2012-01-26 20:10:07 +01:00
|
|
|
|
|
|
|
// Colors
|
|
|
|
// ------
|
|
|
|
|
2012-01-15 01:18:15 +01:00
|
|
|
.btn {
|
2012-01-05 19:01:42 +01:00
|
|
|
// Set text color
|
2012-01-26 19:01:03 +01:00
|
|
|
&.primary,
|
|
|
|
&.primary:hover,
|
2012-01-05 19:01:42 +01:00
|
|
|
&.danger,
|
|
|
|
&.danger:hover,
|
|
|
|
&.success,
|
|
|
|
&.success:hover,
|
|
|
|
&.info,
|
|
|
|
&.info:hover {
|
2012-01-06 00:43:07 +01:00
|
|
|
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
2012-01-05 19:01:42 +01:00
|
|
|
color: @white
|
|
|
|
}
|
2012-01-28 06:08:04 +01:00
|
|
|
&.primary.active,
|
|
|
|
&.danger.active,
|
|
|
|
&.success.active,
|
|
|
|
&.info.active {
|
|
|
|
color: rgba(255,255,255,.75);
|
|
|
|
}
|
2012-01-26 19:01:03 +01:00
|
|
|
&.primary {
|
2012-01-28 21:43:19 +01:00
|
|
|
.buttonBackground(@primaryButtonBackground, spin(@primaryButtonBackground, 20));
|
2012-01-26 19:01:03 +01:00
|
|
|
}
|
2012-01-05 19:01:42 +01:00
|
|
|
// Danger and error appear as red
|
2012-01-15 01:18:15 +01:00
|
|
|
&.danger {
|
2012-01-28 21:43:19 +01:00
|
|
|
.buttonBackground(#ee5f5b, #bd362f);
|
2012-01-05 19:01:42 +01:00
|
|
|
}
|
|
|
|
// Success appears as green
|
|
|
|
&.success {
|
2012-01-28 21:43:19 +01:00
|
|
|
.buttonBackground(#62c462, #51a351);
|
2012-01-05 19:01:42 +01:00
|
|
|
}
|
|
|
|
// Info appears as a neutral blue
|
|
|
|
&.info {
|
2012-01-28 21:43:19 +01:00
|
|
|
.buttonBackground(#5bc0de, #2f96b4);
|
2012-01-26 19:01:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-01-26 20:10:07 +01:00
|
|
|
// Base styles
|
|
|
|
// -----------
|
|
|
|
|
2012-01-05 19:01:42 +01:00
|
|
|
.btn {
|
|
|
|
// Button Base
|
|
|
|
display: inline-block;
|
2012-01-26 22:02:27 +01:00
|
|
|
padding: 4px 10px 4px;
|
2012-01-05 19:01:42 +01:00
|
|
|
font-size: @baseFontSize;
|
2012-01-26 22:02:27 +01:00
|
|
|
line-height: @baseLineHeight;
|
2012-01-22 00:24:06 +01:00
|
|
|
color: @grayDark;
|
2012-01-27 22:36:08 +01:00
|
|
|
text-align: center;
|
2012-01-05 19:01:42 +01:00
|
|
|
text-shadow: 0 1px 1px rgba(255,255,255,.75);
|
2012-01-22 00:24:06 +01:00
|
|
|
#gradient > .vertical-three-colors(@white, @white, 25%, darken(@white, 10%)); // Don't use .gradientbar() here since it does a three-color gradient
|
2012-01-05 19:01:42 +01:00
|
|
|
border: 1px solid #ccc;
|
|
|
|
border-bottom-color: #bbb;
|
|
|
|
.border-radius(4px);
|
|
|
|
@shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
|
|
|
.box-shadow(@shadow);
|
|
|
|
cursor: pointer;
|
|
|
|
|
2012-01-28 01:40:14 +01:00
|
|
|
.ie7-restore-left-whitespace();
|
2012-01-27 20:17:06 +01:00
|
|
|
|
2012-01-05 19:01:42 +01:00
|
|
|
&:hover {
|
|
|
|
color: @grayDark;
|
|
|
|
text-decoration: none;
|
2012-01-26 19:01:03 +01:00
|
|
|
background-color: darken(@white, 10%);
|
2012-01-05 19:01:42 +01:00
|
|
|
background-position: 0 -15px;
|
2012-01-26 19:01:03 +01:00
|
|
|
|
|
|
|
// 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);
|
2012-01-05 19:01:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Focus state for keyboard and accessibility
|
|
|
|
&:focus {
|
2012-01-28 03:33:25 +01:00
|
|
|
.tab-focus();
|
2012-01-05 19:01:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Active and Disabled states
|
|
|
|
&.active,
|
|
|
|
&:active {
|
2012-01-18 09:30:49 +01:00
|
|
|
background-image: none;
|
|
|
|
@shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
|
2012-01-05 19:01:42 +01:00
|
|
|
.box-shadow(@shadow);
|
2012-01-26 19:01:03 +01:00
|
|
|
background-color: darken(@white, 10%);
|
|
|
|
background-color: darken(@white, 15%) e("\9");
|
2012-01-28 06:08:04 +01:00
|
|
|
color: rgba(0,0,0,.5);
|
2012-01-28 20:21:39 +01:00
|
|
|
outline: 0;
|
2012-01-05 19:01:42 +01:00
|
|
|
}
|
2012-01-28 03:44:17 +01:00
|
|
|
&.disabled,
|
2012-01-05 19:01:42 +01:00
|
|
|
&[disabled] {
|
|
|
|
cursor: default;
|
|
|
|
background-image: none;
|
2012-01-26 19:51:03 +01:00
|
|
|
background-color: darken(@white, 10%);
|
2012-01-05 19:01:42 +01:00
|
|
|
.opacity(65);
|
|
|
|
.box-shadow(none);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Button Sizes
|
|
|
|
&.large {
|
2012-01-27 20:17:06 +01:00
|
|
|
padding: 9px 14px;
|
2012-01-05 19:01:42 +01:00
|
|
|
font-size: @baseFontSize + 2px;
|
|
|
|
line-height: normal;
|
2012-01-09 06:48:07 +01:00
|
|
|
.border-radius(5px);
|
2012-01-05 19:01:42 +01:00
|
|
|
}
|
2012-01-26 23:36:30 +01:00
|
|
|
&.large .icon {
|
|
|
|
margin-top: 1px;
|
|
|
|
}
|
2012-01-05 19:01:42 +01:00
|
|
|
&.small {
|
2012-01-27 20:17:06 +01:00
|
|
|
padding: 5px 9px;
|
2012-01-05 19:01:42 +01:00
|
|
|
font-size: @baseFontSize - 2px;
|
2012-01-26 22:02:27 +01:00
|
|
|
line-height: @baseLineHeight - 2px;
|
2012-01-05 19:01:42 +01:00
|
|
|
}
|
2012-01-26 22:51:12 +01:00
|
|
|
&.small .icon {
|
2012-01-28 04:57:53 +01:00
|
|
|
margin-top: -1px;
|
2012-01-26 22:51:12 +01:00
|
|
|
}
|
2012-01-05 19:01:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Help Firefox not be a jerk about adding extra padding to buttons
|
|
|
|
button.btn,
|
2012-01-28 05:05:03 +01:00
|
|
|
input[type="submit"].btn {
|
2012-01-05 19:01:42 +01:00
|
|
|
&::-moz-focus-inner {
|
|
|
|
padding: 0;
|
|
|
|
border: 0;
|
|
|
|
}
|
2012-01-27 20:17:06 +01:00
|
|
|
|
|
|
|
// IE7 has some default padding on button controls
|
|
|
|
*padding-top: 2px;
|
|
|
|
*padding-bottom: 2px;
|
|
|
|
&.large {
|
|
|
|
*padding-top: 7px;
|
|
|
|
*padding-bottom: 7px;
|
|
|
|
}
|
|
|
|
&.small {
|
|
|
|
*padding-top: 3px;
|
|
|
|
*padding-bottom: 3px;
|
|
|
|
}
|
2012-01-26 19:01:03 +01:00
|
|
|
}
|