diff options
| author | Mark Otto <[email protected]> | 2020-10-26 16:42:07 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-26 16:42:07 -0700 |
| commit | e5fa7084910c3ad68232c4580f4e2dd5a4c3fad1 (patch) | |
| tree | a25e8bb141ef58d6446a4afdc49de58ef642db44 /scss | |
| parent | 6df0cfecd163a06d52bb91728cc474b2fae8a2eb (diff) | |
| download | bootstrap-e5fa7084910c3ad68232c4580f4e2dd5a4c3fad1.tar.xz bootstrap-e5fa7084910c3ad68232c4580f4e2dd5a4c3fad1.zip | |
v5: Add .fs-* utilities for font-size and rename font-weight/-style utilities (#30571)
* v5: Add .fs-* utilities for font-size
- Adds new font-sizes Sass map
- Generates six new classes for setting only font-size
- Updates docs to mention this, including a scss-docs reference
* Update font utilities
- Make .fs-* utils for font-size use RFS
- Rename .font-weight-* utils to .fw-*
- Rename .font-style-* utils to .f-*
- Update order of utilities a bit
- Update docs to match
* Update migration docs to make note of these changes
* Be more specific in font-size docs about scale
* Update font-style abbreviation to .fst
* Fix font-weight property
* Formatting & font style utility fix
* Move to Alpha 3 migration section
* Update migration guide for more details, splitting alpha 2 stuff back to the appropriate section in Migration guide
* Tweak language on example
Co-authored-by: Martijn Cuppens <[email protected]>
Diffstat (limited to 'scss')
| -rw-r--r-- | scss/_utilities.scss | 16 | ||||
| -rw-r--r-- | scss/_variables.scss | 11 |
2 files changed, 22 insertions, 5 deletions
diff --git a/scss/_utilities.scss b/scss/_utilities.scss index 226c9143a..21ff56066 100644 --- a/scss/_utilities.scss +++ b/scss/_utilities.scss @@ -387,6 +387,17 @@ $utilities: map-merge( values: $spacers ), // Text + "font-size": ( + rfs: true, + property: font-size, + class: fs, + values: $font-sizes + ), + "font-style": ( + property: font-style, + class: fst, + values: italic normal + ), "font-weight": ( property: font-weight, values: ( @@ -462,11 +473,6 @@ $utilities: map-merge( property: text-decoration, values: none underline line-through ), - "font-style": ( - property: font-style, - class: font, - values: italic normal - ), "word-wrap": ( property: word-wrap word-break, class: text, diff --git a/scss/_variables.scss b/scss/_variables.scss index c15ceb68a..6fba4d835 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -425,6 +425,17 @@ $h4-font-size: $font-size-base * 1.5 !default; $h5-font-size: $font-size-base * 1.25 !default; $h6-font-size: $font-size-base !default; +// scss-docs-start font-sizes +$font-sizes: ( + 1: $h1-font-size, + 2: $h2-font-size, + 3: $h3-font-size, + 4: $h4-font-size, + 5: $h5-font-size, + 6: $h6-font-size +) !default; +// scss-docs-end font-sizes + $headings-margin-bottom: $spacer / 2 !default; $headings-font-family: null !default; $headings-font-style: null !default; |
