From 22a535641b9f2f7d3fce291ab446f1a73ae23557 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Tue, 31 Mar 2020 10:33:05 +0200 Subject: [PATCH] Cleanup responsive tables (#30482) --- scss/_tables.scss | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/scss/_tables.scss b/scss/_tables.scss index cb5fc84215..253282c98d 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -174,23 +174,14 @@ // Generate series of `.table-responsive-*` classes for configuring the screen // size of where your table will overflow. -.table-responsive { - @each $breakpoint in map-keys($grid-breakpoints) { - $next: breakpoint-next($breakpoint, $grid-breakpoints); - $infix: breakpoint-infix($next, $grid-breakpoints); +@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; - -webkit-overflow-scrolling: touch; - - // Prevent double border on horizontal scroll due to use of `display: block;` - > .table-bordered { - border: 0; - } - } + @include media-breakpoint-down($breakpoint) { + .table-responsive#{$infix} { + overflow-x: auto; + -webkit-overflow-scrolling: touch; } } }