@graupl/core 1.0.0-beta.14 → 1.0.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/base/button.css +1 -1
- package/dist/css/base/button.css.map +1 -1
- package/dist/css/base/form.css +1 -1
- package/dist/css/base/form.css.map +1 -1
- package/dist/css/base/link.css +1 -1
- package/dist/css/base/link.css.map +1 -1
- package/dist/css/base/table.css.map +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/base.css.map +1 -1
- package/dist/css/component/accordion.css +2 -2
- package/dist/css/component/accordion.css.map +1 -1
- package/dist/css/component/alert.css +1 -1
- package/dist/css/component/alert.css.map +1 -1
- package/dist/css/component/carousel.css +1 -1
- package/dist/css/component/carousel.css.map +1 -1
- package/dist/css/component.css +2 -2
- package/dist/css/component.css.map +1 -1
- package/dist/css/graupl.css +2 -2
- package/dist/css/graupl.css.map +1 -1
- package/dist/css/layout.css +2 -2
- package/dist/css/layout.css.map +1 -1
- package/dist/css/state/focus.css +1 -1
- package/dist/css/state/focus.css.map +1 -1
- package/dist/css/state.css +1 -1
- package/dist/css/state.css.map +1 -1
- package/dist/css/theme/color.css +1 -1
- package/dist/css/theme/color.css.map +1 -1
- package/dist/css/theme.css +1 -1
- package/dist/css/theme.css.map +1 -1
- package/dist/css/utilities/border.css +1 -1
- package/dist/css/utilities/border.css.map +1 -1
- package/dist/css/utilities/color.css +1 -1
- package/dist/css/utilities/color.css.map +1 -1
- package/dist/css/utilities/gradient.css +1 -1
- package/dist/css/utilities/gradient.css.map +1 -1
- package/dist/css/utilities/order.css.map +1 -1
- package/dist/css/utilities/typography.css +1 -1
- package/dist/css/utilities/typography.css.map +1 -1
- package/dist/css/utilities/visually-hidden.css.map +1 -1
- package/dist/css/utilities.css +1 -1
- package/dist/css/utilities.css.map +1 -1
- package/dist/js/accordion.js.map +1 -1
- package/dist/js/alert.js.map +1 -1
- package/dist/js/carousel.js.map +1 -1
- package/dist/js/component/accordion.cjs.js.map +1 -1
- package/dist/js/component/accordion.es.js.map +1 -1
- package/dist/js/component/accordion.iife.js.map +1 -1
- package/dist/js/component/alert.cjs.js.map +1 -1
- package/dist/js/component/alert.es.js.map +1 -1
- package/dist/js/component/alert.iife.js.map +1 -1
- package/dist/js/component/carousel.cjs.js.map +1 -1
- package/dist/js/component/carousel.es.js.map +1 -1
- package/dist/js/component/carousel.iife.js.map +1 -1
- package/dist/js/generator/accordion.cjs.js.map +1 -1
- package/dist/js/generator/accordion.es.js.map +1 -1
- package/dist/js/generator/accordion.iife.js.map +1 -1
- package/dist/js/generator/alert.cjs.js.map +1 -1
- package/dist/js/generator/alert.es.js.map +1 -1
- package/dist/js/generator/alert.iife.js.map +1 -1
- package/dist/js/generator/carousel.cjs.js.map +1 -1
- package/dist/js/generator/carousel.es.js.map +1 -1
- package/dist/js/generator/carousel.iife.js.map +1 -1
- package/dist/js/generator/navigation.cjs.js.map +1 -1
- package/dist/js/generator/navigation.es.js.map +1 -1
- package/dist/js/generator/navigation.iife.js.map +1 -1
- package/dist/js/graupl.js.map +1 -1
- package/dist/js/navigation.js.map +1 -1
- package/package.json +1 -1
- package/src/js/domHelpers.js +5 -10
- package/src/scss/_defaults.scss +147 -29
- package/src/scss/base/button/_defaults.scss +21 -5
- package/src/scss/base/button/_mixins.scss +1 -1
- package/src/scss/base/table/_defaults.scss +15 -2
- package/src/scss/base/table/_index.scss +4 -7
- package/src/scss/component/alert/_defaults.scss +22 -5
- package/src/scss/component/alert/_index.scss +1 -1
- package/src/scss/functions/_theme.scss +14 -2
- package/src/scss/theme/color/_defaults.scss +84 -14
- package/src/scss/theme/color/_index.scss +18 -3
- package/src/scss/theme/color/_variables.scss +63 -30
- package/src/scss/theme/typography/_defaults.scss +37 -7
- package/src/scss/utilities/_template/_defaults.scss +7 -6
- package/src/scss/utilities/_template/_index.scss +2 -2
- package/src/scss/utilities/alignment/_defaults.scss +53 -15
- package/src/scss/utilities/alignment/_index.scss +4 -6
- package/src/scss/utilities/background/_defaults.scss +117 -35
- package/src/scss/utilities/background/_index.scss +8 -14
- package/src/scss/utilities/border/_defaults.scss +77 -15
- package/src/scss/utilities/border/_index.scss +73 -75
- package/src/scss/utilities/color/_defaults.scss +55 -7
- package/src/scss/utilities/color/_index.scss +143 -144
- package/src/scss/utilities/container/_defaults.scss +21 -5
- package/src/scss/utilities/container/_index.scss +2 -2
- package/src/scss/utilities/display/_defaults.scss +18 -5
- package/src/scss/utilities/display/_index.scss +2 -2
- package/src/scss/utilities/flex/_defaults.scss +88 -25
- package/src/scss/utilities/flex/_index.scss +6 -10
- package/src/scss/utilities/gradient/_defaults.scss +64 -9
- package/src/scss/utilities/gradient/_index.scss +127 -129
- package/src/scss/utilities/height/_defaults.scss +27 -2
- package/src/scss/utilities/height/_index.scss +169 -163
- package/src/scss/utilities/inset/_defaults.scss +25 -4
- package/src/scss/utilities/inset/_index.scss +3 -4
- package/src/scss/utilities/justification/_defaults.scss +53 -15
- package/src/scss/utilities/justification/_index.scss +4 -6
- package/src/scss/utilities/list/_defaults.scss +37 -10
- package/src/scss/utilities/list/_index.scss +3 -4
- package/src/scss/utilities/order/_defaults.scss +33 -2
- package/src/scss/utilities/order/_index.scss +55 -67
- package/src/scss/utilities/position/_defaults.scss +18 -5
- package/src/scss/utilities/position/_index.scss +2 -2
- package/src/scss/utilities/ratio/_defaults.scss +15 -2
- package/src/scss/utilities/ratio/_index.scss +2 -2
- package/src/scss/utilities/spacing/_defaults.scss +18 -5
- package/src/scss/utilities/spacing/_index.scss +2 -2
- package/src/scss/utilities/typography/_defaults.scss +146 -12
- package/src/scss/utilities/typography/_index.scss +854 -704
- package/src/scss/utilities/visibility/_defaults.scss +20 -5
- package/src/scss/utilities/visibility/_index.scss +2 -2
- package/src/scss/utilities/visually-hidden/_defaults.scss +1 -0
- package/src/scss/utilities/visually-hidden/_index.scss +1 -0
- package/src/scss/utilities/width/_defaults.scss +27 -2
- package/src/scss/utilities/width/_index.scss +163 -163
- package/src/scss/utilities/z-index/_defaults.scss +17 -5
- package/src/scss/utilities/z-index/_index.scss +2 -2
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
// Utility modifiers.
|
|
13
13
|
$selector-base: root-defaults.$utility-selector-base !default;
|
|
14
14
|
$use-important: root-defaults.$use-important !default;
|
|
15
|
+
$generate-base-utilities: root-defaults.$generate-base-utilities !default;
|
|
15
16
|
$screen-aware: false !default;
|
|
16
17
|
$theme-aware: false !default;
|
|
17
18
|
$state-aware: false !default;
|
|
@@ -27,58 +28,93 @@ $container-aware-selector-prefix: root-defaults.$utility-container-aware-selecto
|
|
|
27
28
|
|
|
28
29
|
// Flex direction properties.
|
|
29
30
|
$flex-direction-selector-prefix: "flex-" !default;
|
|
30
|
-
|
|
31
|
+
$-flex-direction-properties: (
|
|
31
32
|
row: row,
|
|
32
33
|
row-reverse: row-reverse,
|
|
33
34
|
col: column,
|
|
34
35
|
col-reverse: column-reverse,
|
|
35
36
|
);
|
|
36
37
|
$custom-flex-direction-properties: () !default;
|
|
37
|
-
$flex-direction-properties:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
38
|
+
$flex-direction-properties: () !default;
|
|
39
|
+
|
|
40
|
+
// @todo remove this once $custom-flex-direction-properties is removed
|
|
41
|
+
@if $custom-flex-direction-properties != () {
|
|
42
|
+
@warn "`$custom-flex-direction-properties` is deprecated and will be removed in a future release of Graupl. Use `$flex-direction-properties` instead.";
|
|
43
|
+
|
|
44
|
+
$flex-direction-properties: map.merge(
|
|
45
|
+
$flex-direction-properties,
|
|
46
|
+
$custom-flex-direction-properties
|
|
47
|
+
);
|
|
48
|
+
}
|
|
41
49
|
|
|
42
50
|
// Flex wrap properties.
|
|
43
51
|
$flex-wrap-selector-prefix: "flex-" !default;
|
|
44
|
-
|
|
52
|
+
$-flex-wrap-properties: (
|
|
45
53
|
wrap: wrap,
|
|
46
54
|
wrap-reverse: wrap-reverse,
|
|
47
55
|
nowrap: nowrap,
|
|
48
56
|
);
|
|
49
57
|
$custom-flex-wrap-properties: () !default;
|
|
50
|
-
$flex-wrap-properties:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
58
|
+
$flex-wrap-properties: () !default;
|
|
59
|
+
|
|
60
|
+
// @todo remove this once $custom-flex-wrap-properties is removed
|
|
61
|
+
@if $custom-flex-wrap-properties != () {
|
|
62
|
+
@warn "`$custom-flex-wrap-properties` is deprecated and will be removed in a future release of Graupl. Use `$flex-wrap-properties` instead.";
|
|
63
|
+
|
|
64
|
+
$flex-wrap-properties: map.merge(
|
|
65
|
+
$flex-wrap-properties,
|
|
66
|
+
$custom-flex-wrap-properties
|
|
67
|
+
);
|
|
68
|
+
}
|
|
54
69
|
|
|
55
70
|
// Flex grow properties.
|
|
56
71
|
$flex-grow-selector-prefix: "flex-" !default;
|
|
57
|
-
|
|
72
|
+
$-flex-grow-properties: (
|
|
58
73
|
grow: 1,
|
|
59
74
|
no-grow: 0,
|
|
60
75
|
);
|
|
61
76
|
$custom-flex-grow-properties: () !default;
|
|
62
|
-
$flex-grow-properties:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
)
|
|
77
|
+
$flex-grow-properties: () !default;
|
|
78
|
+
|
|
79
|
+
// @todo remove this once $custom-flex-grow-properties is removed
|
|
80
|
+
@if $custom-flex-grow-properties != () {
|
|
81
|
+
@warn "`$custom-flex-grow-properties` is deprecated and will be removed in a future release of Graupl. Use `$flex-grow-properties` instead.";
|
|
82
|
+
|
|
83
|
+
$flex-grow-properties: map.merge(
|
|
84
|
+
$flex-grow-properties,
|
|
85
|
+
$custom-flex-grow-properties
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@if $generate-base-utilities {
|
|
90
|
+
$flex-grow-properties: map.merge(
|
|
91
|
+
$-flex-grow-properties,
|
|
92
|
+
$flex-grow-properties
|
|
93
|
+
);
|
|
94
|
+
}
|
|
66
95
|
|
|
67
96
|
// Flex shrink properties.
|
|
68
97
|
$flex-shrink-selector-prefix: "flex-" !default;
|
|
69
|
-
|
|
98
|
+
$-flex-shrink-properties: (
|
|
70
99
|
shrink: 1,
|
|
71
100
|
no-shrink: 0,
|
|
72
101
|
);
|
|
73
102
|
$custom-flex-shrink-properties: () !default;
|
|
74
|
-
$flex-shrink-properties:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
)
|
|
103
|
+
$flex-shrink-properties: () !default;
|
|
104
|
+
|
|
105
|
+
// @todo remove this once $custom-flex-shrink-properties is removed
|
|
106
|
+
@if $custom-flex-shrink-properties != () {
|
|
107
|
+
@warn "`$custom-flex-shrink-properties` is deprecated and will be removed in a future release of Graupl. Use `$flex-shrink-properties` instead.";
|
|
108
|
+
|
|
109
|
+
$flex-shrink-properties: map.merge(
|
|
110
|
+
$flex-shrink-properties,
|
|
111
|
+
$custom-flex-shrink-properties
|
|
112
|
+
);
|
|
113
|
+
}
|
|
78
114
|
|
|
79
115
|
// Flex basis properties.
|
|
80
116
|
$flex-basis-selector-prefix: "flex-" !default;
|
|
81
|
-
|
|
117
|
+
$-flex-basis-properties: (
|
|
82
118
|
auto: auto,
|
|
83
119
|
fit-content: fit-content,
|
|
84
120
|
max-content: max-content,
|
|
@@ -93,7 +129,34 @@ $base-flex-basis-properties: (
|
|
|
93
129
|
two-thirds: calc(100% / 1.5),
|
|
94
130
|
);
|
|
95
131
|
$custom-flex-basis-properties: () !default;
|
|
96
|
-
$flex-basis-properties:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
)
|
|
132
|
+
$flex-basis-properties: () !default;
|
|
133
|
+
|
|
134
|
+
// @todo remove this once $custom-flex-basis-properties is removed
|
|
135
|
+
@if $custom-flex-basis-properties != () {
|
|
136
|
+
@warn "`$custom-flex-basis-properties` is deprecated and will be removed in a future release of Graupl. Use `$flex-basis-properties` instead.";
|
|
137
|
+
|
|
138
|
+
$flex-basis-properties: map.merge(
|
|
139
|
+
$flex-basis-properties,
|
|
140
|
+
$custom-flex-basis-properties
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Merge custom properties with base properties if generating base utilities.
|
|
145
|
+
@if $generate-base-utilities {
|
|
146
|
+
$flex-direction-properties: map.merge(
|
|
147
|
+
$-flex-direction-properties,
|
|
148
|
+
$flex-direction-properties
|
|
149
|
+
);
|
|
150
|
+
$flex-wrap-properties: map.merge(
|
|
151
|
+
$-flex-wrap-properties,
|
|
152
|
+
$flex-wrap-properties
|
|
153
|
+
);
|
|
154
|
+
$flex-shrink-properties: map.merge(
|
|
155
|
+
$-flex-shrink-properties,
|
|
156
|
+
$flex-shrink-properties
|
|
157
|
+
);
|
|
158
|
+
$flex-basis-properties: map.merge(
|
|
159
|
+
$-flex-basis-properties,
|
|
160
|
+
$flex-basis-properties
|
|
161
|
+
);
|
|
162
|
+
}
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
// The following variables control the generated classes:
|
|
34
34
|
// - `$selector-base`: The base selector for the utility classes.
|
|
35
35
|
// - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
|
|
36
|
+
// - `$generate-base-utilities`: A flag to determine if the base utility classes should be generated.
|
|
36
37
|
// - `$screen-aware`: A flag to generate screen-aware utility classes.
|
|
37
38
|
// - `$theme-aware`: A flag to generate theme-aware utility classes.
|
|
38
39
|
// - `$state-aware`: A flag to generate state-aware utility classes.
|
|
@@ -46,24 +47,19 @@
|
|
|
46
47
|
// - `$state-aware-selector-prefix`: The prefix for state-aware utility classes.
|
|
47
48
|
// - `$container-aware-selector-prefix`: The prefix for container-aware utility classes.
|
|
48
49
|
// - `$flex-direction-selector-prefix`: The prefix for the flex direction utility classes.
|
|
49
|
-
// - `$
|
|
50
|
-
// - `$custom-flex-direction-properties`: The custom properties and values for the flex direction utility classes.
|
|
50
|
+
// - `$custom-flex-direction-properties`: [DEPRECATED] The custom properties and values for the flex direction utility classes.
|
|
51
51
|
// - `$flex-direction-properties`: The merged properties and values for the flex direction utility classes.
|
|
52
52
|
// - `$flex-wrap-selector-prefix`: The prefix for the flex wrap utility classes.
|
|
53
|
-
// - `$
|
|
54
|
-
// - `$custom-flex-wrap-properties`: The custom properties and values for the flex wrap utility classes.
|
|
53
|
+
// - `$custom-flex-wrap-properties`: [DEPRECATED] The custom properties and values for the flex wrap utility classes.
|
|
55
54
|
// - `$flex-wrap-properties`: The merged properties and values for the flex wrap utility classes.
|
|
56
55
|
// - `$flex-grow-selector-prefix`: The prefix for the flex grow utility classes.
|
|
57
|
-
// - `$
|
|
58
|
-
// - `$custom-flex-grow-properties`: The custom properties and values for the flex grow utility classes.
|
|
56
|
+
// - `$custom-flex-grow-properties`: [DEPRECATED] The custom properties and values for the flex grow utility classes.
|
|
59
57
|
// - `$flex-grow-properties`: The merged properties and values for the flex grow utility classes.
|
|
60
58
|
// - `$flex-shrink-selector-prefix`: The prefix for the flex shrink utility classes.
|
|
61
|
-
// - `$
|
|
62
|
-
// - `$custom-flex-shrink-properties`: The custom properties and values for the flex shrink utility classes.
|
|
59
|
+
// - `$custom-flex-shrink-properties`: [DEPRECATED] The custom properties and values for the flex shrink utility classes.
|
|
63
60
|
// - `$flex-shrink-properties`: The merged properties and values for the flex shrink utility classes.
|
|
64
61
|
// - `$flex-basis-selector-prefix`: The prefix for the flex basis utility classes.
|
|
65
|
-
// - `$
|
|
66
|
-
// - `$custom-flex-basis-properties`: The custom properties and values for the flex basis utility classes.
|
|
62
|
+
// - `$custom-flex-basis-properties`: [DEPRECATED] The custom properties and values for the flex basis utility classes.
|
|
67
63
|
// - `$flex-basis-properties`: The merged properties and values for the flex basis utility classes.
|
|
68
64
|
//
|
|
69
65
|
// Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.
|
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
8
8
|
|
|
9
9
|
@use "../../defaults" as root-defaults;
|
|
10
|
+
@use "../../functions/theme";
|
|
11
|
+
@use "../../theme/color/variables" as color;
|
|
10
12
|
@use "sass:map";
|
|
11
13
|
|
|
12
14
|
// Utility modifiers.
|
|
13
15
|
$selector-base: root-defaults.$utility-selector-base !default;
|
|
14
16
|
$use-important: root-defaults.$use-important !default;
|
|
17
|
+
$generate-base-utilities: root-defaults.$generate-base-utilities !default;
|
|
15
18
|
$screen-aware: false !default;
|
|
16
19
|
$theme-aware: false !default;
|
|
17
20
|
$state-aware: false !default;
|
|
@@ -32,13 +35,25 @@ $gradient-direction-selector-prefix: "" !default;
|
|
|
32
35
|
$gradient-color-selector-prefix: "" !default;
|
|
33
36
|
$gradient-color-from-selector-prefix: "from-" !default;
|
|
34
37
|
$gradient-color-to-selector-prefix: "to-" !default;
|
|
35
|
-
|
|
38
|
+
$-gradient-types: (
|
|
36
39
|
linear: linear-gradient,
|
|
37
40
|
radial: radial-gradient,
|
|
38
41
|
);
|
|
39
42
|
$custom-gradient-types: () !default;
|
|
40
|
-
$gradient-types:
|
|
41
|
-
|
|
43
|
+
$gradient-types: () !default;
|
|
44
|
+
|
|
45
|
+
// @todo remove this once $custom-gradient-types is removed
|
|
46
|
+
@if $custom-gradient-types != () {
|
|
47
|
+
@warn "`$custom-gradient-types` is deprecated and will be removed in a future release of Graupl. Use `$gradient-types` instead.";
|
|
48
|
+
|
|
49
|
+
$gradient-types: map.merge($gradient-types, $custom-gradient-types);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@if $generate-base-utilities {
|
|
53
|
+
$gradient-types: map.merge($-gradient-types, $gradient-types);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
$-gradient-directions: (
|
|
42
57
|
to-top: "to top",
|
|
43
58
|
to-right: "to right",
|
|
44
59
|
to-bottom: "to bottom",
|
|
@@ -59,12 +74,52 @@ $base-gradient-directions: (
|
|
|
59
74
|
farthest-corner: farthest-corner,
|
|
60
75
|
);
|
|
61
76
|
$custom-gradient-directions: () !default;
|
|
62
|
-
$gradient-directions:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
)
|
|
66
|
-
|
|
77
|
+
$gradient-directions: () !default;
|
|
78
|
+
|
|
79
|
+
// @todo remove this once $custom-gradient-directions is removed
|
|
80
|
+
@if $custom-gradient-directions != () {
|
|
81
|
+
@warn "`$custom-gradient-directions` is deprecated and will be removed in a future release of Graupl. Use `$gradient-directions` instead.";
|
|
82
|
+
|
|
83
|
+
$gradient-directions: map.merge(
|
|
84
|
+
$gradient-directions,
|
|
85
|
+
$custom-gradient-directions
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
$-gradient-colors: (
|
|
67
90
|
transparent: transparent,
|
|
68
91
|
);
|
|
92
|
+
|
|
93
|
+
// Add the active theme colors to the base gradient colors.
|
|
94
|
+
@each $color in theme.get-colors() {
|
|
95
|
+
$map: theme.get-color($color);
|
|
96
|
+
|
|
97
|
+
@each $shade, $value in $map {
|
|
98
|
+
$name: null;
|
|
99
|
+
|
|
100
|
+
// Handle _default shade vs proper shade mappings.
|
|
101
|
+
@if $shade == "_default" {
|
|
102
|
+
$name: #{$color};
|
|
103
|
+
} @else {
|
|
104
|
+
$name: #{$color}-#{$shade};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
$-gradient-colors: map.merge($-gradient-colors, (#{$name}: #{$value}));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
69
111
|
$custom-gradient-colors: () !default;
|
|
70
|
-
$gradient-colors:
|
|
112
|
+
$gradient-colors: () !default;
|
|
113
|
+
|
|
114
|
+
// @todo remove this once $custom-gradient-colors is removed
|
|
115
|
+
@if $custom-gradient-colors != () {
|
|
116
|
+
@warn "`$custom-gradient-colors` is deprecated and will be removed in a future release of Graupl. Use `$gradient-colors` instead.";
|
|
117
|
+
|
|
118
|
+
$gradient-colors: map.merge($gradient-colors, $custom-gradient-colors);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Merge custom properties with base properties if generating base utilities.
|
|
122
|
+
@if $generate-base-utilities {
|
|
123
|
+
$gradient-directions: map.merge($-gradient-directions, $gradient-directions);
|
|
124
|
+
$gradient-colors: map.merge($-gradient-colors, $gradient-colors);
|
|
125
|
+
}
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
// The following variables control the generated classes:
|
|
92
92
|
// - `$selector-base`: The base selector for the utility classes.
|
|
93
93
|
// - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
|
|
94
|
+
// - `$generate-base-utilities`: A flag to determine if the base utility classes should be generated.
|
|
94
95
|
// - `$screen-aware`: A flag to generate screen-aware utility classes.
|
|
95
96
|
// - `$theme-aware`: A flag to generate theme-aware utility classes.
|
|
96
97
|
// - `$state-aware`: A flag to generate state-aware utility classes.
|
|
@@ -109,14 +110,11 @@
|
|
|
109
110
|
// - `$gradient-color-selector-prefix`: The prefix for the gradient color utility classes.
|
|
110
111
|
// - `$gradient-color-from-selector-prefix`: The prefix for the gradient from color utility classes.
|
|
111
112
|
// - `$gradient-color-to-selector-prefix`: The prefix for the gradient to color utility classes.
|
|
112
|
-
// - `$
|
|
113
|
-
// - `$custom-gradient-types`: The custom properties and values for the gradient type utility classes.
|
|
113
|
+
// - `$custom-gradient-types`: [DEPRECATED] The custom properties and values for the gradient type utility classes.
|
|
114
114
|
// - `$gradient-types`: The combined properties and values for the gradient type utility classes.
|
|
115
|
-
// - `$
|
|
116
|
-
// - `$custom-gradient-directions`: The custom properties and values for the gradient direction utility classes.
|
|
115
|
+
// - `$custom-gradient-directions`: [DEPRECATED] The custom properties and values for the gradient direction utility classes.
|
|
117
116
|
// - `$gradient-directions`: The combined properties and values for the gradient direction utility classes.
|
|
118
|
-
// - `$
|
|
119
|
-
// - `$custom-gradient-colors`: The custom properties and values for the gradient color utility classes.
|
|
117
|
+
// - `$custom-gradient-colors`: [DEPRECATED] The custom properties and values for the gradient color utility classes.
|
|
120
118
|
// - `$gradient-colors`: The combined properties and values for the gradient color utility classes.
|
|
121
119
|
//
|
|
122
120
|
// Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.
|
|
@@ -228,29 +226,29 @@
|
|
|
228
226
|
}
|
|
229
227
|
|
|
230
228
|
// For each theme color, create a utility class for both to and from.
|
|
231
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
229
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
230
|
+
// @each $shade, $value in $map {
|
|
231
|
+
// // e.g. `.from-primary-500` or `.from-secondary-500`
|
|
232
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-from-selector-prefix}#{$color}-#{$shade};
|
|
233
|
+
|
|
234
|
+
// @include utility.create(
|
|
235
|
+
// $selector,
|
|
236
|
+
// --#{root-defaults.$prefix}gradient-from,
|
|
237
|
+
// $value,
|
|
238
|
+
// $important: defaults.$use-important
|
|
239
|
+
// );
|
|
240
|
+
|
|
241
|
+
// // e.g. `.to-primary-500` or `.to-secondary-500`
|
|
242
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-to-selector-prefix}#{$color}-#{$shade};
|
|
243
|
+
|
|
244
|
+
// @include utility.create(
|
|
245
|
+
// $selector,
|
|
246
|
+
// --#{root-defaults.$prefix}gradient-to,
|
|
247
|
+
// $value,
|
|
248
|
+
// $important: defaults.$use-important
|
|
249
|
+
// );
|
|
250
|
+
// }
|
|
251
|
+
// }
|
|
254
252
|
|
|
255
253
|
// Generate screen-aware utilities.
|
|
256
254
|
@if defaults.$screen-aware and root-defaults.$screen-aware-utilities {
|
|
@@ -334,31 +332,31 @@
|
|
|
334
332
|
}
|
|
335
333
|
|
|
336
334
|
// For each theme color, create a utility class for both to and from.
|
|
337
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
}
|
|
335
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
336
|
+
// @each $shade, $value in $map {
|
|
337
|
+
// // e.g. `.md:from-primary-500` or `.lg:from-secondary-500`
|
|
338
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-from-selector-prefix}#{$color}-#{$shade};
|
|
339
|
+
|
|
340
|
+
// @include utility.create(
|
|
341
|
+
// $selector,
|
|
342
|
+
// --#{root-defaults.$prefix}gradient-from,
|
|
343
|
+
// $value,
|
|
344
|
+
// $important: defaults.$use-important,
|
|
345
|
+
// $screen: $screen-name
|
|
346
|
+
// );
|
|
347
|
+
|
|
348
|
+
// // e.g. `.md:to-primary-500` or `.lg:to-secondary-500`
|
|
349
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-to-selector-prefix}#{$color}-#{$shade};
|
|
350
|
+
|
|
351
|
+
// @include utility.create(
|
|
352
|
+
// $selector,
|
|
353
|
+
// --#{root-defaults.$prefix}gradient-to,
|
|
354
|
+
// $value,
|
|
355
|
+
// $important: defaults.$use-important,
|
|
356
|
+
// $screen: $screen-name
|
|
357
|
+
// );
|
|
358
|
+
// }
|
|
359
|
+
// }
|
|
362
360
|
}
|
|
363
361
|
}
|
|
364
362
|
|
|
@@ -445,31 +443,31 @@
|
|
|
445
443
|
}
|
|
446
444
|
|
|
447
445
|
// For each theme color, create a utility class for both to and from.
|
|
448
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}
|
|
446
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
447
|
+
// @each $shade, $value in $map {
|
|
448
|
+
// // e.g. `.dark:from-primary-500` or `.light:from-secondary-500`
|
|
449
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-from-selector-prefix}#{$color}-#{$shade};
|
|
450
|
+
|
|
451
|
+
// @include utility.create(
|
|
452
|
+
// $selector,
|
|
453
|
+
// --#{root-defaults.$prefix}gradient-from,
|
|
454
|
+
// $value,
|
|
455
|
+
// $important: defaults.$use-important,
|
|
456
|
+
// $theme: $theme-name
|
|
457
|
+
// );
|
|
458
|
+
|
|
459
|
+
// // e.g. `.dark:to-primary-500` or `.light:to-secondary-500`
|
|
460
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-to-selector-prefix}#{$color}-#{$shade};
|
|
461
|
+
|
|
462
|
+
// @include utility.create(
|
|
463
|
+
// $selector,
|
|
464
|
+
// --#{root-defaults.$prefix}gradient-to,
|
|
465
|
+
// $value,
|
|
466
|
+
// $important: defaults.$use-important,
|
|
467
|
+
// $theme: $theme-name
|
|
468
|
+
// );
|
|
469
|
+
// }
|
|
470
|
+
// }
|
|
473
471
|
}
|
|
474
472
|
}
|
|
475
473
|
}
|
|
@@ -556,31 +554,31 @@
|
|
|
556
554
|
}
|
|
557
555
|
|
|
558
556
|
// For each theme color, create a utility class for both to and from.
|
|
559
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
}
|
|
557
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
558
|
+
// @each $shade, $value in $map {
|
|
559
|
+
// // e.g. `.hover:from-primary-500` or `.focus:from-secondary-500`
|
|
560
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-from-selector-prefix}#{$color}-#{$shade};
|
|
561
|
+
|
|
562
|
+
// @include utility.create(
|
|
563
|
+
// $selector,
|
|
564
|
+
// --#{root-defaults.$prefix}gradient-from,
|
|
565
|
+
// $value,
|
|
566
|
+
// $important: defaults.$use-important,
|
|
567
|
+
// $state: $state-name
|
|
568
|
+
// );
|
|
569
|
+
|
|
570
|
+
// // e.g. `.hover:to-primary-500` or `.focus:to-secondary-500`
|
|
571
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-to-selector-prefix}#{$color}-#{$shade};
|
|
572
|
+
|
|
573
|
+
// @include utility.create(
|
|
574
|
+
// $selector,
|
|
575
|
+
// --#{root-defaults.$prefix}gradient-to,
|
|
576
|
+
// $value,
|
|
577
|
+
// $important: defaults.$use-important,
|
|
578
|
+
// $state: $state-name
|
|
579
|
+
// );
|
|
580
|
+
// }
|
|
581
|
+
// }
|
|
584
582
|
}
|
|
585
583
|
}
|
|
586
584
|
|
|
@@ -666,31 +664,31 @@
|
|
|
666
664
|
}
|
|
667
665
|
|
|
668
666
|
// For each theme color, create a utility class for both to and from.
|
|
669
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
}
|
|
667
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
668
|
+
// @each $shade, $value in $map {
|
|
669
|
+
// // e.g. `.md:from-primary-500` or `.lg:from-secondary-500`
|
|
670
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-from-selector-prefix}#{$color}-#{$shade};
|
|
671
|
+
|
|
672
|
+
// @include utility.create(
|
|
673
|
+
// $selector,
|
|
674
|
+
// --#{root-defaults.$prefix}gradient-from,
|
|
675
|
+
// $value,
|
|
676
|
+
// $important: defaults.$use-important,
|
|
677
|
+
// $container: $container-name
|
|
678
|
+
// );
|
|
679
|
+
|
|
680
|
+
// // e.g. `.md:to-primary-500` or `.lg:to-secondary-500`
|
|
681
|
+
// $selector: #{$selector-prefix}#{defaults.$gradient-color-selector-prefix}#{defaults.$gradient-color-to-selector-prefix}#{$color}-#{$shade};
|
|
682
|
+
|
|
683
|
+
// @include utility.create(
|
|
684
|
+
// $selector,
|
|
685
|
+
// --#{root-defaults.$prefix}gradient-to,
|
|
686
|
+
// $value,
|
|
687
|
+
// $important: defaults.$use-important,
|
|
688
|
+
// $container: $container-name
|
|
689
|
+
// );
|
|
690
|
+
// }
|
|
691
|
+
// }
|
|
694
692
|
}
|
|
695
693
|
}
|
|
696
694
|
}
|
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
8
8
|
|
|
9
9
|
@use "../../defaults" as root-defaults;
|
|
10
|
+
@use "../../variables" as root-variables;
|
|
10
11
|
@use "sass:map";
|
|
11
12
|
|
|
12
13
|
// Utility modifiers.
|
|
13
14
|
$selector-base: root-defaults.$utility-selector-base !default;
|
|
14
15
|
$use-important: root-defaults.$use-important !default;
|
|
16
|
+
$generate-base-utilities: root-defaults.$generate-base-utilities !default;
|
|
15
17
|
$screen-aware: false !default;
|
|
16
18
|
$theme-aware: false !default;
|
|
17
19
|
$state-aware: false !default;
|
|
@@ -31,7 +33,7 @@ $max-height-selector-prefix: "max-h-" !default;
|
|
|
31
33
|
$min-height-selector-prefix: "min-h-" !default;
|
|
32
34
|
|
|
33
35
|
// Height values.
|
|
34
|
-
|
|
36
|
+
$-height-values: (
|
|
35
37
|
auto: auto,
|
|
36
38
|
fit-content: fit-content,
|
|
37
39
|
max-content: max-content,
|
|
@@ -50,5 +52,28 @@ $base-height-values: (
|
|
|
50
52
|
three-quarters-screen: 75vh,
|
|
51
53
|
full-screen: 100vh,
|
|
52
54
|
);
|
|
55
|
+
|
|
56
|
+
// Add the spacer values to the base height values.
|
|
57
|
+
@each $spacer, $value in root-variables.$spacers {
|
|
58
|
+
$-height-values: map.merge(
|
|
59
|
+
$-height-values,
|
|
60
|
+
(
|
|
61
|
+
$spacer: $value,
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
53
66
|
$custom-height-values: () !default;
|
|
54
|
-
$height-values:
|
|
67
|
+
$height-values: () !default;
|
|
68
|
+
|
|
69
|
+
// @todo remove this once $custom-height-values is removed
|
|
70
|
+
@if $custom-height-values != () {
|
|
71
|
+
@warn "`$custom-height-values` is deprecated and will be removed in a future release of Graupl. Use `$height-values` instead.";
|
|
72
|
+
|
|
73
|
+
$height-values: map.merge($height-values, $custom-height-values);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Merge custom properties with base properties if generating base utilities.
|
|
77
|
+
@if $generate-base-utilities {
|
|
78
|
+
$height-values: map.merge($-height-values, $height-values);
|
|
79
|
+
}
|