//
// Rows contain your columns.
-:root {
+:root,
+:host {
@each $name, $value in $grid-breakpoints {
--#{$prefix}breakpoint-#{$name}: #{$value};
}
// Ability to the value of the root font sizes, affecting the value of `rem`.
// null by default, thus nothing is generated.
-:root {
+:root,
+:host {
@if $font-size-root != null {
@include font-size(var(--#{$prefix}root-font-size));
}
:root,
+:host,
[data-bs-theme="light"] {
// Note: Custom variable values only support SassScript inside `#{}`.
$enable-dark-mode: true !default;
$color-mode-type: data !default; // `data` or `media-query`
-// Prefix for :root CSS variables
+// Prefix for ':root, :host' CSS variables
$variable-prefix: bs- !default; // Deprecated in v5.2.0 for the shorter `$prefix`
$prefix: $variable-prefix !default;
@if $color-mode-type == "media-query" {
@if $root == true {
@media (prefers-color-scheme: $mode) {
- :root {
+ :root, :host {
@content;
}
}
```css
{{< root.inline >}}
{{- $css := readFile "dist/css/bootstrap.css" -}}
-{{- $match := findRE `:root,\n\[data-bs-theme=light\] {([^}]*)}` $css 1 -}}
+{{- $match := findRE `:root,\n:host,\n\[data-bs-theme=light\] {([^}]*)}` $css 1 -}}
{{- if (eq (len $match) 0) -}}
{{- errorf "Got no matches for :root in %q!" $.Page.Path -}}