mirror of https://github.com/twbs/ratchet.git
Build mobile apps with simple HTML, CSS, and JS components.
http://goratchet.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
3.4 KiB
174 lines
3.4 KiB
// |
|
// Buttons |
|
// -------------------------------------------------- |
|
|
|
.btn { |
|
position: relative; |
|
display: inline-block; |
|
padding: 6px 8px 7px; |
|
margin-bottom: 0; // For input.btn |
|
font-size: $button-font-size; |
|
font-weight: $font-weight-light; |
|
line-height: 1; |
|
color: #333; |
|
text-align: center; |
|
white-space: nowrap; |
|
vertical-align: top; |
|
cursor: pointer; |
|
background-color: $chrome-color; |
|
border: 1px solid #ccc; |
|
border-radius: 3px; |
|
|
|
// Active & filled button styles |
|
&:active, |
|
&.active { |
|
color: inherit; // Overriding the gloabl style for all anchors. |
|
background-color: #ccc; |
|
} |
|
|
|
// Disabled styles & filled button active styles |
|
&:disabled, |
|
&.disabled { |
|
opacity: .6; |
|
} |
|
} |
|
|
|
|
|
// Other button types |
|
// -------------------------------------------------- |
|
|
|
// Primary button (Default color is blue) |
|
.btn-primary { |
|
color: #fff; |
|
background-color: $primary-color; |
|
border: 1px solid $primary-color; |
|
|
|
&:active, |
|
&.active { |
|
color: #fff; |
|
background-color: darken($primary-color, 10%); |
|
border: 1px solid darken($primary-color, 10%); |
|
} |
|
} |
|
|
|
// Positive button (Default color is green) |
|
.btn-positive { |
|
color: #fff; |
|
background-color: $positive-color; |
|
border: 1px solid $positive-color; |
|
|
|
&:active, |
|
&.active { |
|
color: #fff; |
|
background-color: darken($positive-color, 10%); |
|
border: 1px solid darken($positive-color, 10%); |
|
} |
|
} |
|
|
|
// Negative button (Default color is red) |
|
.btn-negative { |
|
color: #fff; |
|
background-color: $negative-color; |
|
border: 1px solid $negative-color; |
|
|
|
&:active, |
|
&.active { |
|
color: #fff; |
|
background-color: darken($negative-color, 10%); |
|
border: 1px solid darken($negative-color, 10%); |
|
} |
|
} |
|
|
|
// Outlined buttons |
|
.btn-outlined { |
|
background-color: transparent; |
|
|
|
&.btn-primary { |
|
color: $primary-color; |
|
} |
|
&.btn-positive { |
|
color: $positive-color; |
|
} |
|
&.btn-negative { |
|
color: $negative-color; |
|
} |
|
// Active states |
|
&.btn-primary:active, |
|
&.btn-positive:active, |
|
&.btn-negative:active { |
|
color: #fff; |
|
} |
|
} |
|
|
|
// Link button (Buttons that look like links) |
|
.btn-link { |
|
padding-top: 6px; |
|
padding-bottom: 6px; |
|
color: $primary-color; |
|
background-color: transparent; |
|
border: 0; |
|
|
|
&:active, |
|
&.active { |
|
color: darken($primary-color, 10%); |
|
background-color: transparent; |
|
} |
|
} |
|
|
|
// Block level buttons (full width buttons) |
|
.btn-block { |
|
display: block; |
|
width: 100%; |
|
padding: 15px 0; |
|
margin-bottom: 10px; |
|
font-size: 18px; |
|
} |
|
|
|
|
|
// Button overrides |
|
// -------------------------------------------------- |
|
|
|
input[type="submit"], |
|
input[type="reset"], |
|
input[type="button"] { |
|
width: 100%; |
|
} |
|
|
|
|
|
// Buttons with badges |
|
// -------------------------------------------------- |
|
|
|
// Generic styles for all badges within default buttons |
|
.btn .badge { |
|
margin: -2px -4px -2px 4px; |
|
font-size: 12px; |
|
background-color: rgba(0,0,0,.15); |
|
} |
|
|
|
// Buttons with inverted badges |
|
.btn .badge-inverted, |
|
.btn:active .badge-inverted { |
|
background-color: transparent; |
|
} |
|
.btn-primary:active .badge-inverted, |
|
.btn-positive:active .badge-inverted, |
|
.btn-negative:active .badge-inverted { |
|
color: #fff; |
|
} |
|
|
|
// Position badges within block level buttons |
|
// Note: These are absolutely positioned so that text of button isn't "pushed" by badge and always |
|
// stays at the center of button |
|
.btn-block .badge { |
|
position: absolute; |
|
right: 0; |
|
margin-right: 10px; |
|
} |
|
|
|
|
|
// Buttons with Ratchicons |
|
// -------------------------------------------------- |
|
|
|
.btn .icon { |
|
font-size: inherit; |
|
}
|
|
|