aboutsummaryrefslogtreecommitdiff
path: root/scss
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2017-06-17 21:19:36 -0700
committerMark Otto <[email protected]>2017-08-10 22:43:50 -0700
commit09019a8ecdccf61b52681dec3376a88509b4e6a3 (patch)
tree8f77473ec60915a927f4a1606edc2e2c7a7638cd /scss
parentcaa7117e231b27e5359a9aa822bcff60defa0393 (diff)
downloadbootstrap-09019a8ecdccf61b52681dec3376a88509b4e6a3.tar.xz
bootstrap-09019a8ecdccf61b52681dec3376a88509b4e6a3.zip
Set explicit text-align on <body> element so we can use inherit to override the default <th> text-align value
Diffstat (limited to 'scss')
-rw-r--r--scss/_reboot.scss8
1 files changed, 6 insertions, 2 deletions
diff --git a/scss/_reboot.scss b/scss/_reboot.scss
index 33fc2d660..2adedda60 100644
--- a/scss/_reboot.scss
+++ b/scss/_reboot.scss
@@ -48,6 +48,8 @@ article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, s
//
// 1. Remove the margin in all browsers.
// 2. As a best practice, apply a default `background-color`.
+// 3. Set an explicit initial text-align value so that we can later use the
+// the `inherit` value on things like `<th>` elements.
body {
margin: 0; // 1
@@ -56,6 +58,7 @@ body {
font-weight: $font-weight-base;
line-height: $line-height-base;
color: $body-color;
+ text-align: left; // 3
background-color: $body-bg; // 2
}
@@ -304,8 +307,9 @@ caption {
}
th {
- // Matches default `<td>` alignment
- text-align: left;
+ // Matches default `<td>` alignment by inheriting from the `<body>`, or the
+ // closest parent with a set `text-align`.
+ text-align: inherit;
}