1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 08:39:56 +02:00

Convert .badge to CSS variables

This commit is contained in:
Mark Otto
2021-11-16 19:01:30 -08:00
committed by Mark Otto
parent d3babf7d7f
commit 7e71fe7bae
2 changed files with 24 additions and 6 deletions

View File

@@ -86,8 +86,16 @@ Use the `.rounded-pill` utility class to make badges more rounded with a larger
{{< /badge.inline >}}
{{< /example >}}
## Sass
## CSS
### Variables
<small class="d-inline-flex px-2 py-1 font-monospace text-muted border rounded-3">Added in v5.3.0</small>
As part of Bootstrap's evolving CSS variables approach, buttons now use local CSS variables on `.badge` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too.
{{< scss-docs name="badge-css-vars" file="scss/_badge.scss" >}}
### Sass variables
{{< scss-docs name="badge-variables" file="scss/_variables.scss" >}}