diff --git a/less/tables.less b/less/tables.less
index 55d5aa0e186a19c2ddddbd8c03268898ae2394c2..4c4284cb1d52a2607a3f238f0c820086c1f73ae5 100644
--- a/less/tables.less
+++ b/less/tables.less
@@ -152,14 +152,18 @@ table {
 // Exact selectors below required to override `.table-striped` and prevent
 // inheritance to nested tables.
 
-.table > thead > tr,
-.table > tbody > tr,
-.table > tfoot > tr {
-  > td.active,
-  > th.active,
-  &.active > td,
-  &.active > th  {
-    background-color: @table-bg-active;
+.table {
+  > thead,
+  > tbody,
+  > tfoot {
+    > tr {
+      > td.active,
+      > th.active,
+      &.active > td,
+      &.active > th  {
+        background-color: @table-bg-active;
+      }
+    }
   }
 }