diff options
| author | XhmikosR <[email protected]> | 2020-04-02 22:27:17 +0300 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2020-04-13 13:55:34 -0700 |
| commit | 5f932ff734b787e334940c660a66cfa3835191b1 (patch) | |
| tree | 9d38b0883d23144281647aad88353408437c18a2 | |
| parent | e2efa2b7644fc89331e9e3beb2434cbe30dd3415 (diff) | |
| download | bootstrap-5f932ff734b787e334940c660a66cfa3835191b1.tar.xz bootstrap-5f932ff734b787e334940c660a66cfa3835191b1.zip | |
layout/z-index.md: retrieve z-index variables on build time
| -rw-r--r-- | site/content/docs/4.3/layout/z-index.md | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/site/content/docs/4.3/layout/z-index.md b/site/content/docs/4.3/layout/z-index.md index d1820a4e3..2c732d5f1 100644 --- a/site/content/docs/4.3/layout/z-index.md +++ b/site/content/docs/4.3/layout/z-index.md @@ -12,13 +12,19 @@ These higher values start at an arbitrary number, high and specific enough to id We don't encourage customization of these individual values; should you change one, you likely need to change them all. {{< highlight scss >}} -$zindex-dropdown: 1000 !default; -$zindex-sticky: 1020 !default; -$zindex-fixed: 1030 !default; -$zindex-modal-backdrop: 1040 !default; -$zindex-modal: 1050 !default; -$zindex-popover: 1060 !default; -$zindex-tooltip: 1070 !default; +{{< zindex.inline >}} +{{- $file := readFile "scss/_variables.scss" -}} +{{- $matches := findRE `\$zindex\-.+;` $file -}} + +{{- if (eq (len $matches) 0) -}} +{{- errorf "Got no matches for $zindex- in %q!" $.Page.Path -}} +{{- end -}} + +{{- range $matches }} +{{ . | replaceRE "\\s{13}" " " }} +{{- end -}} + +{{< /zindex.inline >}} {{< /highlight >}} To handle overlapping borders within components (e.g., buttons and inputs in input groups), we use low single digit `z-index` values of `1`, `2`, and `3` for default, hover, and active states. On hover/focus/active, we bring a particular element to the forefront with a higher `z-index` value to show their border over the sibling elements. |
