diff --git a/docs/4.0/content/tables.md b/docs/4.0/content/tables.md index 32089f435c..3284c8a46e 100644 --- a/docs/4.0/content/tables.md +++ b/docs/4.0/content/tables.md @@ -553,7 +553,7 @@ Regular table background variants are not available with the dark table, however {% capture callout-include %}{% include callout-warning-color-assistive-technologies.md %}{% endcapture %} {{ callout-include | markdownify }} -Create responsive tables by adding `.table-responsive{-sm|-md|-lg|-xl}` to any `.table` to make them scroll horizontally at each `max-width` breakpoint of 575.99px, 767.99px, 991.99px, and 1119.99px, respectively. +Create responsive tables by wrapping any `.table` with `.table-responsive{-sm|-md|-lg|-xl}`, making the table scroll horizontally at each `max-width` breakpoint of 575.99px, 767.99px, 991.99px, and 1119.99px, respectively. {% capture callout-include %}{% include callout-info-mediaqueries-breakpoints.md %}{% endcapture %} {{ callout-include | markdownify }} @@ -598,120 +598,83 @@ A `` functions like a heading for a table. It helps users with screen r ## Responsive tables -Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by adding `.table-responsive` class on `.table`. Or, pick a maximum breakpoint with which to have a responsive table up to by adding `.table-responsive{-sm|-md|-lg|-xl}`. +Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a `.table` with `.table-responsive`. Or, pick a maximum breakpoint with which to have a responsive table up to by using `.table-responsive{-sm|-md|-lg|-xl}`. {% callout warning %} -#### Vertical clipping/truncation +##### Vertical clipping/truncation Responsive tables make use of `overflow-y: hidden`, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets. {% endcallout %} ### Always responsive -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Table headingTable headingTable headingTable headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cellTable cellTable cellTable cell
+Across every breakpoint, use `.table-responsive` for horizontally scrolling tables. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Table headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#HeadingHeadingHeadingHeadingHeadingHeadingHeadingHeadingHeading
1CellCellCellCellCellCellCellCellCell
2CellCellCellCellCellCellCellCellCell
3CellCellCellCellCellCellCellCellCell
+
{% highlight html %} - - ... -
+
+ + ... +
+
{% endhighlight %} ### Breakpoint specific @@ -720,51 +683,55 @@ Use `.table-responsive{-sm|-md|-lg|-xl}` as needed to create responsive tables u
{% for bp in site.data.breakpoints %}{% unless bp.breakpoint == "xs" %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Table headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cell
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#HeadingHeadingHeadingHeadingHeading
1CellCellCellCellCell
2CellCellCellCellCell
3CellCellCellCellCell
+
{% endunless %}{% endfor %}
{% highlight html %} {% for bp in site.data.breakpoints %}{% unless bp.breakpoint == "xs" %} - - ... -
+
+ + ... +
+
{% endunless %}{% endfor %} {% endhighlight %} diff --git a/scss/_tables.scss b/scss/_tables.scss index 6bd0b91a43..0e3b1198e3 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -171,7 +171,7 @@ -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 { + > .table-bordered { border: 0; } }