Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <code@chrisrebert.com>2015-10-24 03:03:32 +0300
committerChris Rebert <code@chrisrebert.com>2015-10-24 03:03:33 +0300
commitdeeb74e321f8ba676dce8f13809c2aace0e0c537 (patch)
tree8853fbdf424bd9182fd3bc03a4dd9135f0649da9 /scss/_type.scss
parenta30a5bb9b5129a012e7668ce1340ad86d18af822 (diff)
Make heading class styles trump heading element styles; fixes #16947
[skip sauce] [skip validator]
Diffstat (limited to 'scss/_type.scss')
-rw-r--r--scss/_type.scss22
1 files changed, 16 insertions, 6 deletions
diff --git a/scss/_type.scss b/scss/_type.scss
index 6fc9b86ced..4a007020d6 100644
--- a/scss/_type.scss
+++ b/scss/_type.scss
@@ -21,12 +21,22 @@ h6, .h6 {
margin-bottom: $headings-margin-bottom;
}
-h1, .h1 { font-size: $font-size-h1; }
-h2, .h2 { font-size: $font-size-h2; }
-h3, .h3 { font-size: $font-size-h3; }
-h4, .h4 { font-size: $font-size-h4; }
-h5, .h5 { font-size: $font-size-h5; }
-h6, .h6 { font-size: $font-size-h6; }
+h1 { font-size: $font-size-h1; }
+h2 { font-size: $font-size-h2; }
+h3 { font-size: $font-size-h3; }
+h4 { font-size: $font-size-h4; }
+h5 { font-size: $font-size-h5; }
+h6 { font-size: $font-size-h6; }
+
+// These declarations are kept separate from and placed after
+// the previous tag-based declarations so that the classes beat the tags in
+// the CSS cascade, and thus <h1 class="h2"> will be styled like an h2.
+.h1 { font-size: $font-size-h1; }
+.h2 { font-size: $font-size-h2; }
+.h3 { font-size: $font-size-h3; }
+.h4 { font-size: $font-size-h4; }
+.h5 { font-size: $font-size-h5; }
+.h6 { font-size: $font-size-h6; }
.lead {
font-size: $lead-font-size;