From c8a4d9dd745e0529e8868aef4551dc2a493745a3 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 24 Jul 2018 19:23:17 -0500 Subject: add 'lighter' and 'bolder' font weight classes (#26580) * add 'lighter' and 'bolder' font weight classes these are 2 special values for font weight, that will give their content a font-weight value of 100 more or less than their inherited font-weight. probably doesn't fully fulfill this issue, https://github.com/twbs/bootstrap/issues/23969, but it's a start * Update .stylelintrc * add 'lighter' and 'bolder' variables per @mdo 's request. --- scss/_variables.scss | 2 ++ scss/utilities/_text.scss | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'scss') diff --git a/scss/_variables.scss b/scss/_variables.scss index 5cf118f03..b5ef7a45a 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -257,9 +257,11 @@ $font-size-base: 1rem !default; // Assumes the browser default, typ $font-size-lg: ($font-size-base * 1.25) !default; $font-size-sm: ($font-size-base * .875) !default; +$font-weight-lighter: lighter !default; $font-weight-light: 300 !default; $font-weight-normal: 400 !default; $font-weight-bold: 700 !default; +$font-weight-bolder: bolder !default; $font-weight-base: $font-weight-normal !default; $line-height-base: 1.5 !default; diff --git a/scss/utilities/_text.scss b/scss/utilities/_text.scss index 9d96c4656..9140910c5 100644 --- a/scss/utilities/_text.scss +++ b/scss/utilities/_text.scss @@ -32,10 +32,12 @@ // Weight and italics -.font-weight-light { font-weight: $font-weight-light !important; } -.font-weight-normal { font-weight: $font-weight-normal !important; } -.font-weight-bold { font-weight: $font-weight-bold !important; } -.font-italic { font-style: italic !important; } +.font-weight-light { font-weight: $font-weight-light !important; } +.font-weight-lighter { font-weight: $font-weight-lighter !important; } +.font-weight-normal { font-weight: $font-weight-normal !important; } +.font-weight-bold { font-weight: $font-weight-bold !important; } +.font-weight-bolder { font-weight: $font-weight-bolder !important; } +.font-italic { font-style: italic !important; } // Contextual colors -- cgit v1.2.3