diff options
author | Mario <mario@mariovavti.com> | 2021-10-08 12:24:19 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-10-08 12:24:19 +0000 |
commit | e6dac085cb1d601da1fc63bfd59d811612fa6ef4 (patch) | |
tree | f5b704b613c9c8d347857b4e7f8dd0b19cdd7df3 /vendor/twbs/bootstrap/site/content/docs/5.0/customize/css-variables.md | |
parent | f5f357060bf0ebcb0b8352519375953d993437e7 (diff) | |
download | volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.tar.gz volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.tar.bz2 volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.zip |
update composer libs
Diffstat (limited to 'vendor/twbs/bootstrap/site/content/docs/5.0/customize/css-variables.md')
-rw-r--r-- | vendor/twbs/bootstrap/site/content/docs/5.0/customize/css-variables.md | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/customize/css-variables.md b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/css-variables.md deleted file mode 100644 index a2d0f33b7..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/5.0/customize/css-variables.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -layout: docs -title: CSS variables -description: Use Bootstrap's CSS custom properties for fast and forward-looking design and development. -group: customize -toc: true ---- - -Bootstrap includes around two dozen [CSS custom properties (variables)](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) in its compiled CSS, with dozens more on the way for improved customization on a per-component basis. These provide easy access to commonly used values like our theme colors, breakpoints, and primary font stacks when working in your browser's inspector, a code sandbox, or general prototyping. - -**All our custom properties are prefixed with `bs-`** to avoid conflicts with third party CSS. - -## Root variables - -Here are the variables we include (note that the `:root` is required) that can be accessed anywhere Bootstrap's CSS is loaded. They're located in our `_root.scss` file and included in our compiled dist files. - -```css -{{< root.inline >}} -{{- $css := readFile "dist/css/bootstrap.css" -}} -{{- $match := findRE ":root {([^}]*)}" $css 1 -}} - -{{- if (eq (len $match) 0) -}} -{{- errorf "Got no matches for :root in %q!" $.Page.Path -}} -{{- end -}} - -{{- index $match 0 -}} - -{{< /root.inline >}} -``` - -## Component variables - -We're also beginning to make use of custom properties as local variables for various components. This way we can reduce our compiled CSS, ensure styles aren't inherited in places like nested tables, and allow some basic restyling and extending of Bootstrap components after Sass compilation. - -Have a look at our table documentation for some [insight into how we're using CSS variables]({{< docsref "/content/tables#how-do-the-variants-and-accented-tables-work" >}}). - -We're also using CSS variables across our grids—primarily for gutters—with more component usage coming in the future. - -## Examples - -CSS variables offer similar flexibility to Sass's variables, but without the need for compilation before being served to the browser. For example, here we're resetting our page's font and link styles with CSS variables. - -```css -body { - font: 1rem/1.5 var(--bs-font-sans-serif); -} -a { - color: var(--bs-blue); -} -``` |