1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-29 08:10:47 +02:00

Document the possibility of extending the $spacers map

It's very handy to add another spacer size (e.g. `4`) which can easily be done by extending the map.
Example:
```
$spacers: (
  0: (
    x:   0,
    y:   0
  ),
  1: (
    x:   $spacer-x,
    y:   $spacer-y
  ),
  2: (
    x:   ($spacer-x * 1.5),
    y:   ($spacer-y * 1.5)
  ),
  3: (
    x:   ($spacer-x * 3),
    y:   ($spacer-y * 3)
  ),
  4: (
    x:   ($spacer-x * 5),
    y:   ($spacer-y * 5)
  )
);
```

Closes #18706
[skip sauce]
This commit is contained in:
Tobias
2015-12-27 19:20:39 +01:00
committed by Chris Rebert
parent e0dfe0d24d
commit bf73425277
2 changed files with 3 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ $enable-print-styles: true !default;
//
// Control the default styling of most Bootstrap elements by modifying these
// variables. Mostly focused on spacing.
// You can add more entries to the $spacers map, should you need more variation.
$spacer: 1rem !default;
$spacer-x: $spacer !default;