aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-08-27 21:06:21 -0700
committerMark Otto <[email protected]>2012-08-27 21:06:21 -0700
commit1eaf1cf418c4b3595898346aeb32e0a1e5b31ea1 (patch)
tree82b783f707d34848abb318f02fec7d56266e182c
parent17d8c78e520c3207765d4c077336a589cf64a698 (diff)
downloadbootstrap-1eaf1cf418c4b3595898346aeb32e0a1e5b31ea1.tar.xz
bootstrap-1eaf1cf418c4b3595898346aeb32e0a1e5b31ea1.zip
fixes #4653: add hover states to stateful table rows
-rw-r--r--docs/assets/css/bootstrap.css16
-rw-r--r--less/tables.less27
2 files changed, 38 insertions, 5 deletions
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css
index 7603b7a1c..11db5415f 100644
--- a/docs/assets/css/bootstrap.css
+++ b/docs/assets/css/bootstrap.css
@@ -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;
diff --git a/less/tables.less b/less/tables.less
index 181ad3645..9816d8973 100644
--- a/less/tables.less
+++ b/less/tables.less
@@ -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%);
+ }
+}