]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fixes #4653: add hover states to stateful table rows
authorMark Otto <markotto@twitter.com>
Tue, 28 Aug 2012 04:06:21 +0000 (21:06 -0700)
committerMark Otto <markotto@twitter.com>
Tue, 28 Aug 2012 04:06:21 +0000 (21:06 -0700)
docs/assets/css/bootstrap.css
less/tables.less

index 7603b7a1c7fbfd6e975e2884feafe02c66cc4af3..11db5415fefb8258b6a5877230442c2c5f3a1021 100644 (file)
@@ -2102,6 +2102,22 @@ table .span24 {
   background-color: #d9edf7;
 }
 
+.table-hover tbody tr.success:hover td {
+  background-color: #d0e9c6;
+}
+
+.table-hover tbody tr.error:hover td {
+  background-color: #ebcccc;
+}
+
+.table-hover tbody tr.warning:hover td {
+  background-color: #faf2cc;
+}
+
+.table-hover tbody tr.info:hover td {
+  background-color: #c4e3f3;
+}
+
 [class^="icon-"],
 [class*=" icon-"] {
   display: inline-block;
index 181ad3645f1d297835282713454b3bdd8d08fde2..9816d8973826f194b5bce6e65d0c7edf9e2f2356 100644 (file)
@@ -208,21 +208,38 @@ table {
 }
 
 
+
 // TABLE BACKGROUNDS
 // -----------------
 // Exact selectors below required to override .table-striped
 
-.table {
-  tbody tr.success td {
+.table tbody tr {
+  &.success td {
     background-color: @successBackground;
   }
-  tbody tr.error td {
+  &.error td {
     background-color: @errorBackground;
   }
-  tbody tr.warning td {
+  &.warning td {
     background-color: @warningBackground;
   }
-  tbody tr.info td {
+  &.info td {
     background-color: @infoBackground;
   }
 }
+
+// Hover states for .table-hover
+.table-hover tbody tr {
+  &.success:hover td {
+    background-color: darken(@successBackground, 5%);
+  }
+  &.error:hover td {
+    background-color: darken(@errorBackground, 5%);
+  }
+  &.warning:hover td {
+    background-color: darken(@warningBackground, 5%);
+  }
+  &.info:hover td {
+    background-color: darken(@infoBackground, 5%);
+  }
+}