mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-28 15:50:01 +02:00
Clean up line heights & add line height utilities (#29271)
This commit is contained in:
committed by
XhmikosR
parent
ae249e8f55
commit
007ea0d8d0
@@ -161,7 +161,7 @@ While not shown above, feel free to use `<b>` and `<i>` in HTML5. `<b>` is meant
|
||||
|
||||
## Text utilities
|
||||
|
||||
Change text alignment, transform, style, weight, and color with our [text utilities]({{< docsref "/utilities/text" >}}) and [color utilities]({{< docsref "/utilities/colors" >}}).
|
||||
Change text alignment, transform, style, weight, line-height and color with our [text utilities]({{< docsref "/utilities/text" >}}) and [color utilities]({{< docsref "/utilities/colors" >}}).
|
||||
|
||||
## Abbreviations
|
||||
|
||||
|
@@ -36,6 +36,7 @@ Changes to our source Sass files and compiled CSS.
|
||||
- Removed print styles and `$enable-print-styles` variable. Print display classes, however, have remained intact. [See #28339](https://github.com/twbs/bootstrap/pull/28339).
|
||||
- Dropped `color()`, `theme-color()` & `gray()` functions in favor of variables. [See #29083](https://github.com/twbs/bootstrap/pull/29083)
|
||||
- The `theme-color-level()` function is renamed to `color-level()` and now accepts any color you want instead of only `$theme-color` colors. [See #29083](https://github.com/twbs/bootstrap/pull/29083)
|
||||
- Line heights are dropped from several components to simplify our codebase. The `button-size()` and `pagination-size()` do not accept line height parameters anymore. [See #29271](https://github.com/twbs/bootstrap/pull/29271)
|
||||
|
||||
## JavaScript
|
||||
|
||||
@@ -132,6 +133,7 @@ Badges were overhauled to better differentiate themselves from buttons and to be
|
||||
|
||||
- Renamed `.text-monospace` to `.font-monospace`
|
||||
- Decreased the number of responsive order utilities per breakpoint. The highest order utility with a number now is `.order-5` instead of `.order-12`. [See #28874](https://github.com/twbs/bootstrap/pull/28874).
|
||||
- New `line-height` utilities: `.lh-1`, `.lh-sm`, `.lh-base` and `.lh-lg`. See [here]({{< docsref "/utilities/text#line-height" >}}).
|
||||
- **Todo:** Drop `.text-hide` as it's an antiquated method for hiding text that shouldn't be used anymore
|
||||
- **Todo:** Split utilities into property-value utility classes and helpers
|
||||
|
||||
|
@@ -78,6 +78,17 @@ Quickly change the weight (boldness) of text or italicize text.
|
||||
<p class="font-italic">Italic text.</p>
|
||||
{{< /example >}}
|
||||
|
||||
## Line height
|
||||
|
||||
Change the line height with `.lh-*` utilities.
|
||||
|
||||
{{< example >}}
|
||||
<p class="lh-1">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec sed odio dui. Cras mattis pannenkoek purus sit amet fermentum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam id dolor id nibh ultricies vehicula ut id elit. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||
<p class="lh-sm">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec sed odio dui. Cras mattis pannenkoek purus sit amet fermentum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam id dolor id nibh ultricies vehicula ut id elit. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||
<p class="lh-base">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec sed odio dui. Cras mattis pannenkoek purus sit amet fermentum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam id dolor id nibh ultricies vehicula ut id elit. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||
<p class="lh-lg">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec sed odio dui. Cras mattis pannenkoek purus sit amet fermentum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam id dolor id nibh ultricies vehicula ut id elit. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||
{{< /example >}}
|
||||
|
||||
## Monospace
|
||||
|
||||
Change a selection to our monospace font stack with `.font-monospace`.
|
||||
|
Reference in New Issue
Block a user