From 09c99fe6e79ad397fdef262017d7b2bc49377b15 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Tue, 30 Apr 2019 10:00:34 +0200 Subject: Reboot & Type cleanup (#28698) - Line height & font family from html were directly overridden by body, so they were redundant thus removed - The remaining properties are moved to body - Shim for IE10 tags removed - hr cleanup - Combined styles from reboot & type - Changed from borders to background - This allows us to keep the color inherited. - Opacity can be used to change the intensity - Size attribute will not change the height instead of making the hr look like an input field - Better variable names - headings cleanup - Moved all element styling to reboot - Type will now extend the element styling. This way we will save some redundant code - small & mark are also moved to reboot. type does not contain any element styling anymore - font weight removed from small, this did not really made sense --- scss/_type.scss | 57 +++++++++++++++++++++++---------------------------------- 1 file changed, 23 insertions(+), 34 deletions(-) (limited to 'scss/_type.scss') diff --git a/scss/_type.scss b/scss/_type.scss index f8ed09065..bc8249f43 100644 --- a/scss/_type.scss +++ b/scss/_type.scss @@ -3,22 +3,30 @@ // // Headings // +.h1 { + @extend h1; +} + +.h2 { + @extend h2; +} + +.h3 { + @extend h3; +} + +.h4 { + @extend h4; +} + +.h5 { + @extend h5; +} -h1, h2, h3, h4, h5, h6, -.h1, .h2, .h3, .h4, .h5, .h6 { - margin-bottom: $headings-margin-bottom; - font-family: $headings-font-family; - font-weight: $headings-font-weight; - line-height: $headings-line-height; - color: $headings-color; +.h6 { + @extend h6; } -h1, .h1 { @include font-size($h1-font-size); } -h2, .h2 { @include font-size($h2-font-size); } -h3, .h3 { @include font-size($h3-font-size); } -h4, .h4 { @include font-size($h4-font-size); } -h5, .h5 { @include font-size($h5-font-size); } -h6, .h6 { @include font-size($h6-font-size); } .lead { @include font-size($lead-font-size); @@ -47,36 +55,17 @@ h6, .h6 { @include font-size($h6-font-size); } line-height: $display-line-height; } - -// -// Horizontal rules -// - -hr { - margin-top: $hr-margin-y; - margin-bottom: $hr-margin-y; - border: 0; - border-top: $hr-border-width solid $hr-border-color; -} - - // // Emphasis // - -small, .small { - @include font-size($small-font-size); - font-weight: $font-weight-normal; + @extend small; } -mark, .mark { - padding: $mark-padding; - background-color: $mark-bg; + @extend mark; } - // // Lists // -- cgit v1.2.3