1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-18 11:21:23 +02:00

Use escape-svg() function (#29077)

* Use escape-svg() function

* Update theming.md
This commit is contained in:
Martijn Cuppens
2019-07-20 03:57:12 +02:00
committed by Mark Otto
parent 28dfa54083
commit f6694b7440
9 changed files with 51 additions and 31 deletions

View File

@@ -195,7 +195,7 @@ Additional functions could be added in the future or your own custom Sass to cre
### Color contrast
One additional function we include in Bootstrap is the color contrast function, `color-yiq`. It utilizes the [YIQ color space](https://en.wikipedia.org/wiki/YIQ) to automatically return a light (`#fff`) or dark (`#111`) contrast color based on the specified base color. This function is especially useful for mixins or loops where you're generating multiple classes.
An additional function we include in Bootstrap is the color contrast function, `color-yiq`. It utilizes the [YIQ color space](https://en.wikipedia.org/wiki/YIQ) to automatically return a light (`#fff`) or dark (`#111`) contrast color based on the specified base color. This function is especially useful for mixins or loops where you're generating multiple classes.
For example, to generate color swatches from our `$theme-colors` map:
@@ -223,6 +223,10 @@ You can also specify a base color with our color map functions:
}
{{< /highlight >}}
## Escape SVG
We use the `escape-svg` function to escape the `<`, `>` and `#` characters for SVG background images. These characters need to be escaped to properly render the background images in IE.
## Sass options
Customize Bootstrap 4 with our built-in custom variables file and easily toggle global CSS preferences with new `$enable-*` Sass variables. Override a variable's value and recompile with `npm run test` as needed.