aboutsummaryrefslogtreecommitdiff
path: root/less/mixins.less
diff options
context:
space:
mode:
authorggam <[email protected]>2013-08-14 21:16:45 +0200
committerggam <[email protected]>2013-08-14 21:16:45 +0200
commit72a2efb3db4721c8ffac9f092165ee03ef732840 (patch)
treef553c9bbda3fa89788a8a10a0cbd25b513bb49bd /less/mixins.less
parent3890ab3987a4fb0027fbfcafe1d6e3f31c9fcf4a (diff)
downloadbootstrap-72a2efb3db4721c8ffac9f092165ee03ef732840.tar.xz
bootstrap-72a2efb3db4721c8ffac9f092165ee03ef732840.zip
Added table-row-variant mixin
Diffstat (limited to 'less/mixins.less')
-rw-r--r--less/mixins.less31
1 files changed, 31 insertions, 0 deletions
diff --git a/less/mixins.less b/less/mixins.less
index 701ed2cc3..d0a65597e 100644
--- a/less/mixins.less
+++ b/less/mixins.less
@@ -360,6 +360,37 @@
}
}
+// Tables
+// -------------------------
+.table-row-variant(@state; @background; @border) {
+ // Exact selectors below required to override `.table-striped` and prevent
+ // inheritance to nested tables.
+ .table > thead > tr,
+ .table > tbody > tr,
+ .table > tfoot > tr {
+ > td.@{state},
+ > th.@{state},
+ &.@{state} > td,
+ &.@{state} > th {
+ background-color: @background;
+ border-color: @border;
+ }
+ }
+
+ // Hover states for `.table-hover`
+ // Note: this is not available for cells or rows within `thead` or `tfoot`.
+ .table-hover > tbody > tr {
+ > td.@{state}:hover,
+ > th.@{state}:hover,
+ &.@{state}:hover > td {
+ background-color: darken(@background, 5%);
+ border-color: darken(@border, 5%);
+ //background-color: darken(@background, 5%);
+ //border-color: darken(@border, 5%);
+ }
+ }
+}
+
// Button variants
// -------------------------
// Easily pump out default styles, as well as :hover, :focus, :active,