From 2c81701396f990bbf8d40541f9c8c1b156cbdbf5 Mon Sep 17 00:00:00 2001 From: louismaximepiton Date: Fri, 17 Dec 2021 09:57:12 +0100 Subject: [PATCH 1/4] docs: Fix CSS variables sections --- site/content/docs/5.1/content/reboot.md | 38 +++++++++++-------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/site/content/docs/5.1/content/reboot.md b/site/content/docs/5.1/content/reboot.md index 63f892de27c0..a652f0154b47 100644 --- a/site/content/docs/5.1/content/reboot.md +++ b/site/content/docs/5.1/content/reboot.md @@ -22,7 +22,23 @@ Here are our guidelines and reasons for choosing what to override in Reboot: Added in v5.1.1 -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. +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]({{< docsref "/customize/css-variables" >}}) added over time, in order to provide more real-time customization without the need to always recompile Sass. Our approach is to take our source Sass variables and transform them into CSS variables. That way, even if you don't use CSS variables, you still have all the power of Sass. **This is still in-progress and will take time to fully implement.** + +For example, consider these `:root` CSS variables for common `` styles: + +{{< scss-docs name="root-body-variables" file="scss/_root.scss" >}} + +In practice, those variables are then applied in Reboot like so: + +{{< scss-docs name="reboot-body-rules" file="scss/_reboot.scss" >}} + +Which allows you to make real-time customizations however you like: + +```html + + + +``` ## Page defaults @@ -62,26 +78,6 @@ Note that because the font stack includes emoji fonts, many common symbol/dingba This `font-family` is applied to the `` and automatically inherited globally throughout Bootstrap. To switch the global `font-family`, update `$font-family-base` and recompile Bootstrap. -## CSS variables - -As Bootstrap 5 continues to mature, more and more styles will be built with [CSS variables]({{< docsref "/customize/css-variables" >}}) as a means to provide more real-time customization without the need to always recompile Sass. Our approach is to take our source Sass variables and transform them into CSS variables. That way, even if you don't use CSS variables, you still have all the power of Sass. **This is still in-progress and will take time to fully implement.** - -For example, consider these `:root` CSS variables for common `` styles: - -{{< scss-docs name="root-body-variables" file="scss/_root.scss" >}} - -In practice, those variables are then applied in Reboot like so: - -{{< scss-docs name="reboot-body-rules" file="scss/_reboot.scss" >}} - -Which allows you to make real-time customizations however you like: - -```html - - - -``` - ## Headings and paragraphs All heading elements—e.g., `

`—and `

` are reset to have their `margin-top` removed. Headings have `margin-bottom: .5rem` added and paragraphs `margin-bottom: 1rem` for easy spacing. From e98756b835e89bda230ff081f2709f107e529793 Mon Sep 17 00:00:00 2001 From: louismaximepiton Date: Fri, 17 Dec 2021 11:17:28 +0100 Subject: [PATCH 2/4] Minor fix for dropdowns --- site/content/docs/5.1/components/dropdowns.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/site/content/docs/5.1/components/dropdowns.md b/site/content/docs/5.1/components/dropdowns.md index 2750ce540ab0..7f2e2d42ded1 100644 --- a/site/content/docs/5.1/components/dropdowns.md +++ b/site/content/docs/5.1/components/dropdowns.md @@ -459,14 +459,14 @@ Trigger dropdown menus above elements by adding `.dropup` to the parent element. ``` -### Dropright +### Dropend Trigger dropdown menus at the right of the elements by adding `.dropend` to the parent element.