]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Generate series of `.table-responsive-*` classes to accomodate overflowing tables...
authorPatrick Yeo <patrick.yeo@liferay.com>
Fri, 9 Jun 2017 00:58:31 +0000 (17:58 -0700)
committerMark Otto <markd.otto@gmail.com>
Tue, 22 Aug 2017 17:47:52 +0000 (10:47 -0700)
scss/_tables.scss

index 0ef107a7b794114bb1ae62cab0eae9858672d95f..7804db620fdd63e6381bb8788728eaf2c132dc5d 100644 (file)
 
 // Responsive tables
 //
-// Add `.table-responsive` to `.table`s and we'll make them mobile friendly by
-// enabling horizontal scrolling. Only applies <768px. Everything above that
-// will display normally.
+// Generate series of `.table-responsive-*` classes for configuring the screen
+// size of where your table will overflow.
 
 .table-responsive {
-  @include media-breakpoint-down(md) {
-    display: block;
-    width: 100%;
-    overflow-x: auto;
-    -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
-
-    // Prevent double border on horizontal scroll due to use of `display: block;`
-    &.table-bordered {
-      border: 0;
+  @each $breakpoint in map-keys($grid-breakpoints) {
+    $next: breakpoint-next($breakpoint, $grid-breakpoints);
+    $infix: breakpoint-infix($next, $grid-breakpoints);
+
+    &#{$infix} {
+      @include media-breakpoint-down($breakpoint) {
+        display: block;
+        width: 100%;
+        overflow-x: auto;
+        -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
+
+        // Prevent double border on horizontal scroll due to use of `display: block;`
+        &.table-bordered {
+          border: 0;
+        }
+      }
     }
   }
 }