1 | // Re-assigned maps
|
---|
2 | //
|
---|
3 | // Placed here so that others can override the default Sass maps and see automatic updates to utilities and more.
|
---|
4 |
|
---|
5 | // scss-docs-start theme-colors-rgb
|
---|
6 | $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value") !default;
|
---|
7 | // scss-docs-end theme-colors-rgb
|
---|
8 |
|
---|
9 | // scss-docs-start theme-text-map
|
---|
10 | $theme-colors-text: (
|
---|
11 | "primary": $primary-text-emphasis,
|
---|
12 | "secondary": $secondary-text-emphasis,
|
---|
13 | "success": $success-text-emphasis,
|
---|
14 | "info": $info-text-emphasis,
|
---|
15 | "warning": $warning-text-emphasis,
|
---|
16 | "danger": $danger-text-emphasis,
|
---|
17 | "light": $light-text-emphasis,
|
---|
18 | "dark": $dark-text-emphasis,
|
---|
19 | ) !default;
|
---|
20 | // scss-docs-end theme-text-map
|
---|
21 |
|
---|
22 | // scss-docs-start theme-bg-subtle-map
|
---|
23 | $theme-colors-bg-subtle: (
|
---|
24 | "primary": $primary-bg-subtle,
|
---|
25 | "secondary": $secondary-bg-subtle,
|
---|
26 | "success": $success-bg-subtle,
|
---|
27 | "info": $info-bg-subtle,
|
---|
28 | "warning": $warning-bg-subtle,
|
---|
29 | "danger": $danger-bg-subtle,
|
---|
30 | "light": $light-bg-subtle,
|
---|
31 | "dark": $dark-bg-subtle,
|
---|
32 | ) !default;
|
---|
33 | // scss-docs-end theme-bg-subtle-map
|
---|
34 |
|
---|
35 | // scss-docs-start theme-border-subtle-map
|
---|
36 | $theme-colors-border-subtle: (
|
---|
37 | "primary": $primary-border-subtle,
|
---|
38 | "secondary": $secondary-border-subtle,
|
---|
39 | "success": $success-border-subtle,
|
---|
40 | "info": $info-border-subtle,
|
---|
41 | "warning": $warning-border-subtle,
|
---|
42 | "danger": $danger-border-subtle,
|
---|
43 | "light": $light-border-subtle,
|
---|
44 | "dark": $dark-border-subtle,
|
---|
45 | ) !default;
|
---|
46 | // scss-docs-end theme-border-subtle-map
|
---|
47 |
|
---|
48 | $theme-colors-text-dark: null !default;
|
---|
49 | $theme-colors-bg-subtle-dark: null !default;
|
---|
50 | $theme-colors-border-subtle-dark: null !default;
|
---|
51 |
|
---|
52 | @if $enable-dark-mode {
|
---|
53 | // scss-docs-start theme-text-dark-map
|
---|
54 | $theme-colors-text-dark: (
|
---|
55 | "primary": $primary-text-emphasis-dark,
|
---|
56 | "secondary": $secondary-text-emphasis-dark,
|
---|
57 | "success": $success-text-emphasis-dark,
|
---|
58 | "info": $info-text-emphasis-dark,
|
---|
59 | "warning": $warning-text-emphasis-dark,
|
---|
60 | "danger": $danger-text-emphasis-dark,
|
---|
61 | "light": $light-text-emphasis-dark,
|
---|
62 | "dark": $dark-text-emphasis-dark,
|
---|
63 | ) !default;
|
---|
64 | // scss-docs-end theme-text-dark-map
|
---|
65 |
|
---|
66 | // scss-docs-start theme-bg-subtle-dark-map
|
---|
67 | $theme-colors-bg-subtle-dark: (
|
---|
68 | "primary": $primary-bg-subtle-dark,
|
---|
69 | "secondary": $secondary-bg-subtle-dark,
|
---|
70 | "success": $success-bg-subtle-dark,
|
---|
71 | "info": $info-bg-subtle-dark,
|
---|
72 | "warning": $warning-bg-subtle-dark,
|
---|
73 | "danger": $danger-bg-subtle-dark,
|
---|
74 | "light": $light-bg-subtle-dark,
|
---|
75 | "dark": $dark-bg-subtle-dark,
|
---|
76 | ) !default;
|
---|
77 | // scss-docs-end theme-bg-subtle-dark-map
|
---|
78 |
|
---|
79 | // scss-docs-start theme-border-subtle-dark-map
|
---|
80 | $theme-colors-border-subtle-dark: (
|
---|
81 | "primary": $primary-border-subtle-dark,
|
---|
82 | "secondary": $secondary-border-subtle-dark,
|
---|
83 | "success": $success-border-subtle-dark,
|
---|
84 | "info": $info-border-subtle-dark,
|
---|
85 | "warning": $warning-border-subtle-dark,
|
---|
86 | "danger": $danger-border-subtle-dark,
|
---|
87 | "light": $light-border-subtle-dark,
|
---|
88 | "dark": $dark-border-subtle-dark,
|
---|
89 | ) !default;
|
---|
90 | // scss-docs-end theme-border-subtle-dark-map
|
---|
91 | }
|
---|
92 |
|
---|
93 | // Utilities maps
|
---|
94 | //
|
---|
95 | // Extends the default `$theme-colors` maps to help create our utilities.
|
---|
96 |
|
---|
97 | // Come v6, we'll de-dupe these variables. Until then, for backward compatibility, we keep them to reassign.
|
---|
98 | // scss-docs-start utilities-colors
|
---|
99 | $utilities-colors: $theme-colors-rgb !default;
|
---|
100 | // scss-docs-end utilities-colors
|
---|
101 |
|
---|
102 | // scss-docs-start utilities-text-colors
|
---|
103 | $utilities-text: map-merge(
|
---|
104 | $utilities-colors,
|
---|
105 | (
|
---|
106 | "black": to-rgb($black),
|
---|
107 | "white": to-rgb($white),
|
---|
108 | "body": to-rgb($body-color)
|
---|
109 | )
|
---|
110 | ) !default;
|
---|
111 | $utilities-text-colors: map-loop($utilities-text, rgba-css-var, "$key", "text") !default;
|
---|
112 |
|
---|
113 | $utilities-text-emphasis-colors: (
|
---|
114 | "primary-emphasis": var(--#{$prefix}primary-text-emphasis),
|
---|
115 | "secondary-emphasis": var(--#{$prefix}secondary-text-emphasis),
|
---|
116 | "success-emphasis": var(--#{$prefix}success-text-emphasis),
|
---|
117 | "info-emphasis": var(--#{$prefix}info-text-emphasis),
|
---|
118 | "warning-emphasis": var(--#{$prefix}warning-text-emphasis),
|
---|
119 | "danger-emphasis": var(--#{$prefix}danger-text-emphasis),
|
---|
120 | "light-emphasis": var(--#{$prefix}light-text-emphasis),
|
---|
121 | "dark-emphasis": var(--#{$prefix}dark-text-emphasis)
|
---|
122 | ) !default;
|
---|
123 | // scss-docs-end utilities-text-colors
|
---|
124 |
|
---|
125 | // scss-docs-start utilities-bg-colors
|
---|
126 | $utilities-bg: map-merge(
|
---|
127 | $utilities-colors,
|
---|
128 | (
|
---|
129 | "black": to-rgb($black),
|
---|
130 | "white": to-rgb($white),
|
---|
131 | "body": to-rgb($body-bg)
|
---|
132 | )
|
---|
133 | ) !default;
|
---|
134 | $utilities-bg-colors: map-loop($utilities-bg, rgba-css-var, "$key", "bg") !default;
|
---|
135 |
|
---|
136 | $utilities-bg-subtle: (
|
---|
137 | "primary-subtle": var(--#{$prefix}primary-bg-subtle),
|
---|
138 | "secondary-subtle": var(--#{$prefix}secondary-bg-subtle),
|
---|
139 | "success-subtle": var(--#{$prefix}success-bg-subtle),
|
---|
140 | "info-subtle": var(--#{$prefix}info-bg-subtle),
|
---|
141 | "warning-subtle": var(--#{$prefix}warning-bg-subtle),
|
---|
142 | "danger-subtle": var(--#{$prefix}danger-bg-subtle),
|
---|
143 | "light-subtle": var(--#{$prefix}light-bg-subtle),
|
---|
144 | "dark-subtle": var(--#{$prefix}dark-bg-subtle)
|
---|
145 | ) !default;
|
---|
146 | // scss-docs-end utilities-bg-colors
|
---|
147 |
|
---|
148 | // scss-docs-start utilities-border-colors
|
---|
149 | $utilities-border: map-merge(
|
---|
150 | $utilities-colors,
|
---|
151 | (
|
---|
152 | "black": to-rgb($black),
|
---|
153 | "white": to-rgb($white)
|
---|
154 | )
|
---|
155 | ) !default;
|
---|
156 | $utilities-border-colors: map-loop($utilities-border, rgba-css-var, "$key", "border") !default;
|
---|
157 |
|
---|
158 | $utilities-border-subtle: (
|
---|
159 | "primary-subtle": var(--#{$prefix}primary-border-subtle),
|
---|
160 | "secondary-subtle": var(--#{$prefix}secondary-border-subtle),
|
---|
161 | "success-subtle": var(--#{$prefix}success-border-subtle),
|
---|
162 | "info-subtle": var(--#{$prefix}info-border-subtle),
|
---|
163 | "warning-subtle": var(--#{$prefix}warning-border-subtle),
|
---|
164 | "danger-subtle": var(--#{$prefix}danger-border-subtle),
|
---|
165 | "light-subtle": var(--#{$prefix}light-border-subtle),
|
---|
166 | "dark-subtle": var(--#{$prefix}dark-border-subtle)
|
---|
167 | ) !default;
|
---|
168 | // scss-docs-end utilities-border-colors
|
---|
169 |
|
---|
170 | $utilities-links-underline: map-loop($utilities-colors, rgba-css-var, "$key", "link-underline") !default;
|
---|
171 |
|
---|
172 | $negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
|
---|
173 |
|
---|
174 | $gutters: $spacers !default;
|
---|