2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

Rely on border-width for <hr> size (#35491)

* fix(reboot): revert hr styles to v4 implementation

* docs(cheatsheet): add a hr example

* fix(reboot): currentColor is the initial border-color value

* Document hr element in Reboot docs

* Update migration guide

* Update scss/_variables.scss

Co-authored-by: Mark Otto <markd.otto@gmail.com>
This commit is contained in:
Gaël Poupard
2022-02-22 09:02:47 +01:00
committed by GitHub
parent 0804c0043f
commit 37f3977e6d
7 changed files with 34 additions and 12 deletions
+15
View File
@@ -129,6 +129,21 @@ All heading elements—e.g., `<h1>`—and `<p>` are reset to have their `margin-
</tbody>
</table>
## Horizontal rules
The `<hr>` element has been simplified. Similar to browser defaults, `<hr>`s are styled via `border-top`, have a default `opacity: .25`, and automatically inherit their `border-color` via `color`, including when `color` is set via the parent. They can be modified with text, border, and opacity utilities.
{{< example >}}
<hr>
<div class="text-success">
<hr>
</div>
<hr class="text-danger border-2 opacity-50">
<hr class="border-primary border-3 opacity-75">
{{< /example >}}
## Lists
All lists—`<ul>`, `<ol>`, and `<dl>`—have their `margin-top` removed and a `margin-bottom: 1rem`. Nested lists have no `margin-bottom`. We've also reset the `padding-left` on `<ul>` and `<ol>` elements.