Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include root.scss in all dist builds #34773

Merged
merged 4 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .bundlewatch.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions scss/bootstrap-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ $include-column-box-sizing: true !default;

@import "vendor/rfs";

@import "root";

@import "containers";
@import "grid";

Expand Down
4 changes: 1 addition & 3 deletions scss/bootstrap-reboot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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";
6 changes: 6 additions & 0 deletions site/content/docs/5.1/content/reboot.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down