0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00

Fixes #32557: Add functions and variables to the utilities API docs imports (#32684)

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
Mark Otto 2021-01-05 12:11:56 -08:00 committed by GitHub
parent fd48a8732f
commit dfe1b156d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,9 +244,11 @@ Now that you're familiar with how the utilities API works, learn how to add your
### Add utilities ### Add utilities
New utilities can be added to the default `$utilities` map with a `map-merge`. Make sure our `_utilities.scss` is imported first, then use the `map-merge` to add your additional utilities. For example, here's how to add a responsive `cursor` utility with three values. New utilities can be added to the default `$utilities` map with a `map-merge`. Make sure our required Sass files and `_utilities.scss` are imported first, then use the `map-merge` to add your additional utilities. For example, here's how to add a responsive `cursor` utility with three values.
```scss ```scss
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/utilities"; @import "bootstrap/scss/utilities";
$utilities: map-merge( $utilities: map-merge(
@ -267,6 +269,8 @@ $utilities: map-merge(
Modify existing utilities in the default `$utilities` map with `map-get` and `map-merge` functions. In the example below, we're adding an additional value to the `width` utilities. Start with an initial `map-merge` and then specify which utility you want to modify. From there, fetch the nested `"width"` map with `map-get` to access and modify the utility's options and values. Modify existing utilities in the default `$utilities` map with `map-get` and `map-merge` functions. In the example below, we're adding an additional value to the `width` utilities. Start with an initial `map-merge` and then specify which utility you want to modify. From there, fetch the nested `"width"` map with `map-get` to access and modify the utility's options and values.
```scss ```scss
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/utilities"; @import "bootstrap/scss/utilities";
$utilities: map-merge( $utilities: map-merge(
@ -290,6 +294,8 @@ $utilities: map-merge(
Remove any of the default utilities by setting the group key to `null`. For example, to remove all our `width` utilities, create a `$utilities` `map-merge` and add `"width": null` within. Remove any of the default utilities by setting the group key to `null`. For example, to remove all our `width` utilities, create a `$utilities` `map-merge` and add `"width": null` within.
```scss ```scss
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/utilities"; @import "bootstrap/scss/utilities";
$utilities: map-merge( $utilities: map-merge(