Files
2014-09-12 11:57:39 -07:00

77 lines
1.6 KiB
SCSS

// Tables
// -------------------------
@mixin table-row-variant($state, $background) {
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.
.table {
> thead,
> tbody,
> tfoot {
> tr > .#{$state},
> .#{$state} > td,
> .#{$state} > th {
background-color: $background;
}
}
}
// Hover states for `.table-hover`
// Note: this is not available for cells or rows within `thead` or `tfoot`.
.table-hover > tbody {
> tr > .#{$state}:hover,
> .#{$state}:hover > td,
> .#{$state}:hover > th {
background-color: darken($background, 5%);
}
}
}
// Button variants
// -------------------------
// Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons
@mixin button-variant($color, $background, $border) {
color: $color;
background-color: $background;
border-color: $border;
&:hover,
&:focus,
&:active,
&.active {
color: $color;
background-color: darken($background, 8%);
border-color: darken($border, 12%);
}
.open & { &.dropdown-toggle {
color: $color;
background-color: darken($background, 8%);
border-color: darken($border, 12%);
} }
&:active,
&.active {
background-image: none;
}
.open & { &.dropdown-toggle {
background-image: none;
} }
&.disabled,
&[disabled],
fieldset[disabled] & {
&,
&:hover,
&:focus,
&:active,
&.active {
background-color: $background;
border-color: $border;
}
}
.badge {
color: $background;
background-color: #fff;
}
}