diff options
| author | Mark Otto <[email protected]> | 2021-09-01 22:41:58 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-02 08:41:58 +0300 |
| commit | d91480e3c769e3cce5aca4ab83604e6cfaeb1b06 (patch) | |
| tree | 525ab8ef41df90074455ebcf2c2c90399ba63ce6 | |
| parent | 283cbd902669732943885e94115a0e29a952baf6 (diff) | |
| download | bootstrap-d91480e3c769e3cce5aca4ab83604e6cfaeb1b06.tar.xz bootstrap-d91480e3c769e3cce5aca4ab83604e6cfaeb1b06.zip | |
Include root.scss in all dist builds (#34773)
* Remove the font-family-* override vars from Reboot build
* Update Reboot docs to mention CSS variables
| -rw-r--r-- | .bundlewatch.config.json | 4 | ||||
| -rw-r--r-- | scss/bootstrap-grid.scss | 2 | ||||
| -rw-r--r-- | scss/bootstrap-reboot.scss | 4 | ||||
| -rw-r--r-- | site/content/docs/5.1/content/reboot.md | 6 |
4 files changed, 11 insertions, 5 deletions
diff --git a/.bundlewatch.config.json b/.bundlewatch.config.json index e641382b8..0b51da0ba 100644 --- a/.bundlewatch.config.json +++ b/.bundlewatch.config.json @@ -10,11 +10,11 @@ }, { "path": "./dist/css/bootstrap-reboot.css", - "maxSize": "2 kB" + "maxSize": "2.5 kB" }, { "path": "./dist/css/bootstrap-reboot.min.css", - "maxSize": "2 kB" + "maxSize": "2.35 kB" }, { "path": "./dist/css/bootstrap-utilities.css", diff --git a/scss/bootstrap-grid.scss b/scss/bootstrap-grid.scss index 2c68fbbf7..72796d165 100644 --- a/scss/bootstrap-grid.scss +++ b/scss/bootstrap-grid.scss @@ -18,6 +18,8 @@ $include-column-box-sizing: true !default; @import "vendor/rfs"; +@import "root"; + @import "containers"; @import "grid"; diff --git a/scss/bootstrap-reboot.scss b/scss/bootstrap-reboot.scss index 0c4bbe589..0b83043a4 100644 --- a/scss/bootstrap-reboot.scss +++ b/scss/bootstrap-reboot.scss @@ -8,8 +8,6 @@ @import "functions"; @import "variables"; -// Prevent the usage of custom properties since we don't add them to `:root` in reboot -$font-family-base: $font-family-sans-serif; // stylelint-disable-line scss/dollar-variable-default -$font-family-code: $font-family-monospace; // stylelint-disable-line scss/dollar-variable-default @import "mixins"; +@import "root"; @import "reboot"; diff --git a/site/content/docs/5.1/content/reboot.md b/site/content/docs/5.1/content/reboot.md index 73286c21e..f726a6635 100644 --- a/site/content/docs/5.1/content/reboot.md +++ b/site/content/docs/5.1/content/reboot.md @@ -18,6 +18,12 @@ Here are our guidelines and reasons for choosing what to override in Reboot: - For easier scaling across device sizes, block elements should use `rem`s for `margin`s. - Keep declarations of `font`-related properties to a minimum, using `inherit` whenever possible. +## CSS variables + +<small class="d-inline-flex px-2 py-1 font-monospace text-muted border rounded-3">Added in v5.1.1</small> + +With v5.1.1, we standardized our required `@import`s across all our CSS bundles (including `bootstrap.css`, `bootstrap-reboot.css`, and `bootstrap-grid.css` to include `_root.scss` . This adds `:root` level CSS variables to all bundles, regardless of how many of them are used in that bundle. Ultimately Bootstrap 5 will continue to see more CSS variables added over time. + ## Page defaults The `<html>` and `<body>` elements are updated to provide better page-wide defaults. More specifically: |
