]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Include root.scss in all dist builds (#34773)
authorMark Otto <markd.otto@gmail.com>
Thu, 2 Sep 2021 05:41:58 +0000 (22:41 -0700)
committerGitHub <noreply@github.com>
Thu, 2 Sep 2021 05:41:58 +0000 (08:41 +0300)
* Remove the font-family-* override vars from Reboot build

* Update Reboot docs to mention CSS variables

.bundlewatch.config.json
scss/bootstrap-grid.scss
scss/bootstrap-reboot.scss
site/content/docs/5.1/content/reboot.md

index e641382b80b1690b60899414089042c4e7dbca00..0b51da0baf7c9f876a0efd8605941415a4dbf303 100644 (file)
     },
     {
       "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",
index 2c68fbbf7cc9b2ced5e654b2bc8c3e2429669019..72796d165ed081a71c139d0ee269326d6a4e3a7b 100644 (file)
@@ -18,6 +18,8 @@ $include-column-box-sizing: true !default;
 
 @import "vendor/rfs";
 
+@import "root";
+
 @import "containers";
 @import "grid";
 
index 0c4bbe589badde1790ae5d7f5bfcaff4b1d0a7ae..0b83043a4214392f7c072d0beab5659b3a007311 100644 (file)
@@ -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";
index 73286c21ebda85e41d570548d8a2e7c94448286a..f726a6635c836a4dc3ddcd8de3c56263bc283ae2 100644 (file)
@@ -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: