From 44778465da5f6a13a8438d20e22c1ef6d823f8a1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 May 2016 14:15:34 -0700 Subject: [PATCH 1/2] Update table docs - Change some things around, add some copy - Include table variant styles for the inverse tables thanks to bg and color utils --- docs/content/tables.md | 87 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 7 deletions(-) diff --git a/docs/content/tables.md b/docs/content/tables.md index 00f794693e..0ab0b538d4 100644 --- a/docs/content/tables.md +++ b/docs/content/tables.md @@ -4,14 +4,16 @@ title: Tables group: content --- -Due to the widespread use of tables across third-party widgets like calendars and date pickers, we've designed our tables to be **opt-in**. Just add the base class `.table` to any ``. +Due to the widespread use of tables across third-party widgets like calendars and date pickers, we've designed our tables to be **opt-in**. Just add the base class `.table` to any `
`, then extend with custom styles or our various included modifier classes. ## Contents * Will be replaced with the ToC, excluding the "Contents" header {:toc} -## Basic example +## Examples + +Using the most basic table markup, here's how `.table`-based tables look in Bootstrap. {% example html %}
@@ -46,7 +48,7 @@ Due to the widespread use of tables across third-party widgets like calendars an
{% endexample %} -## Inverse table +You can also invert the colors—with light text on dark backgrounds—with `.table-inverse`. {% example html %} @@ -83,7 +85,7 @@ Due to the widespread use of tables across third-party widgets like calendars an ## Table head options -Use one of two modifier classes to make ``s appear light or dark gray. +Similar to default and inverse tables, use one of two modifier classes to make ``s appear light or dark gray. {% example html %}
@@ -420,9 +422,6 @@ Use contextual classes to color table rows or individual cells.
-{% capture callout-include %}{% include callout-warning-color-assistive-technologies.md %}{% endcapture %} -{{ callout-include | markdownify }} - {% highlight html %} ... @@ -441,6 +440,80 @@ Use contextual classes to color table rows or individual cells. {% endhighlight %} +Regular table background variants are not available with the inverse table, however, you may use [text or background utilities](/components/utilities/#contextual-colors-and-backgrounds) to achieve similar styles. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Column headingColumn headingColumn heading
1Column contentColumn contentColumn content
2Column contentColumn contentColumn content
3Column contentColumn contentColumn content
4Column contentColumn contentColumn content
5Column contentColumn contentColumn content
6Column contentColumn contentColumn content
7Column contentColumn contentColumn content
8Column contentColumn contentColumn content
9Column contentColumn contentColumn content
+
+ +{% capture callout-include %}{% include callout-warning-color-assistive-technologies.md %}{% endcapture %} +{{ callout-include | markdownify }} + ## Responsive tables Create responsive tables by wrapping any `.table` in `.table-responsive` to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables. From 7322c8dc750718e1f2aba3c69b9a9523912db8d3 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 May 2016 14:16:23 -0700 Subject: [PATCH 2/2] add code snippet --- docs/content/tables.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/content/tables.md b/docs/content/tables.md index 0ab0b538d4..fc6a6b19b2 100644 --- a/docs/content/tables.md +++ b/docs/content/tables.md @@ -511,6 +511,24 @@ Regular table background variants are not available with the inverse table, howe +{% highlight html %} + +... +... +... +... +... + + + + ... + ... + ... + ... + ... + +{% endhighlight %} + {% capture callout-include %}{% include callout-warning-color-assistive-technologies.md %}{% endcapture %} {{ callout-include | markdownify }}