@graupl/core 1.0.0-beta.15 → 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.
Files changed (124) hide show
  1. package/dist/css/base/button.css +1 -1
  2. package/dist/css/base/button.css.map +1 -1
  3. package/dist/css/base/form.css +1 -1
  4. package/dist/css/base/form.css.map +1 -1
  5. package/dist/css/base/link.css +1 -1
  6. package/dist/css/base/link.css.map +1 -1
  7. package/dist/css/base/table.css.map +1 -1
  8. package/dist/css/base.css +1 -1
  9. package/dist/css/base.css.map +1 -1
  10. package/dist/css/component/accordion.css +2 -2
  11. package/dist/css/component/accordion.css.map +1 -1
  12. package/dist/css/component/alert.css +1 -1
  13. package/dist/css/component/alert.css.map +1 -1
  14. package/dist/css/component/carousel.css +1 -1
  15. package/dist/css/component/carousel.css.map +1 -1
  16. package/dist/css/component.css +2 -2
  17. package/dist/css/component.css.map +1 -1
  18. package/dist/css/graupl.css +2 -2
  19. package/dist/css/graupl.css.map +1 -1
  20. package/dist/css/layout.css +2 -2
  21. package/dist/css/layout.css.map +1 -1
  22. package/dist/css/state/focus.css +1 -1
  23. package/dist/css/state/focus.css.map +1 -1
  24. package/dist/css/state.css +1 -1
  25. package/dist/css/state.css.map +1 -1
  26. package/dist/css/theme/color.css +1 -1
  27. package/dist/css/theme/color.css.map +1 -1
  28. package/dist/css/theme.css +1 -1
  29. package/dist/css/theme.css.map +1 -1
  30. package/dist/css/utilities/border.css +1 -1
  31. package/dist/css/utilities/border.css.map +1 -1
  32. package/dist/css/utilities/color.css +1 -1
  33. package/dist/css/utilities/color.css.map +1 -1
  34. package/dist/css/utilities/gradient.css +1 -1
  35. package/dist/css/utilities/gradient.css.map +1 -1
  36. package/dist/css/utilities/order.css.map +1 -1
  37. package/dist/css/utilities/typography.css +1 -1
  38. package/dist/css/utilities/typography.css.map +1 -1
  39. package/dist/css/utilities/visually-hidden.css.map +1 -1
  40. package/dist/css/utilities.css +1 -1
  41. package/dist/css/utilities.css.map +1 -1
  42. package/dist/js/accordion.js.map +1 -1
  43. package/dist/js/alert.js.map +1 -1
  44. package/dist/js/carousel.js.map +1 -1
  45. package/dist/js/component/accordion.cjs.js.map +1 -1
  46. package/dist/js/component/accordion.es.js.map +1 -1
  47. package/dist/js/component/accordion.iife.js.map +1 -1
  48. package/dist/js/component/alert.cjs.js.map +1 -1
  49. package/dist/js/component/alert.es.js.map +1 -1
  50. package/dist/js/component/alert.iife.js.map +1 -1
  51. package/dist/js/component/carousel.cjs.js.map +1 -1
  52. package/dist/js/component/carousel.es.js.map +1 -1
  53. package/dist/js/component/carousel.iife.js.map +1 -1
  54. package/dist/js/generator/accordion.cjs.js.map +1 -1
  55. package/dist/js/generator/accordion.es.js.map +1 -1
  56. package/dist/js/generator/accordion.iife.js.map +1 -1
  57. package/dist/js/generator/alert.cjs.js.map +1 -1
  58. package/dist/js/generator/alert.es.js.map +1 -1
  59. package/dist/js/generator/alert.iife.js.map +1 -1
  60. package/dist/js/generator/carousel.cjs.js.map +1 -1
  61. package/dist/js/generator/carousel.es.js.map +1 -1
  62. package/dist/js/generator/carousel.iife.js.map +1 -1
  63. package/dist/js/generator/navigation.cjs.js.map +1 -1
  64. package/dist/js/generator/navigation.es.js.map +1 -1
  65. package/dist/js/generator/navigation.iife.js.map +1 -1
  66. package/dist/js/graupl.js.map +1 -1
  67. package/dist/js/navigation.js.map +1 -1
  68. package/package.json +1 -1
  69. package/src/scss/_defaults.scss +147 -29
  70. package/src/scss/base/button/_defaults.scss +21 -5
  71. package/src/scss/base/button/_mixins.scss +1 -1
  72. package/src/scss/base/table/_defaults.scss +15 -2
  73. package/src/scss/base/table/_index.scss +4 -7
  74. package/src/scss/component/alert/_defaults.scss +22 -5
  75. package/src/scss/component/alert/_index.scss +1 -1
  76. package/src/scss/functions/_theme.scss +14 -2
  77. package/src/scss/theme/color/_defaults.scss +84 -14
  78. package/src/scss/theme/color/_index.scss +18 -3
  79. package/src/scss/theme/color/_variables.scss +63 -30
  80. package/src/scss/theme/typography/_defaults.scss +37 -7
  81. package/src/scss/utilities/_template/_defaults.scss +7 -6
  82. package/src/scss/utilities/_template/_index.scss +2 -2
  83. package/src/scss/utilities/alignment/_defaults.scss +53 -15
  84. package/src/scss/utilities/alignment/_index.scss +4 -6
  85. package/src/scss/utilities/background/_defaults.scss +117 -35
  86. package/src/scss/utilities/background/_index.scss +8 -14
  87. package/src/scss/utilities/border/_defaults.scss +77 -15
  88. package/src/scss/utilities/border/_index.scss +73 -75
  89. package/src/scss/utilities/color/_defaults.scss +55 -7
  90. package/src/scss/utilities/color/_index.scss +143 -144
  91. package/src/scss/utilities/container/_defaults.scss +21 -5
  92. package/src/scss/utilities/container/_index.scss +2 -2
  93. package/src/scss/utilities/display/_defaults.scss +18 -5
  94. package/src/scss/utilities/display/_index.scss +2 -2
  95. package/src/scss/utilities/flex/_defaults.scss +88 -25
  96. package/src/scss/utilities/flex/_index.scss +6 -10
  97. package/src/scss/utilities/gradient/_defaults.scss +64 -9
  98. package/src/scss/utilities/gradient/_index.scss +127 -129
  99. package/src/scss/utilities/height/_defaults.scss +27 -2
  100. package/src/scss/utilities/height/_index.scss +169 -163
  101. package/src/scss/utilities/inset/_defaults.scss +25 -4
  102. package/src/scss/utilities/inset/_index.scss +3 -4
  103. package/src/scss/utilities/justification/_defaults.scss +53 -15
  104. package/src/scss/utilities/justification/_index.scss +4 -6
  105. package/src/scss/utilities/list/_defaults.scss +37 -10
  106. package/src/scss/utilities/list/_index.scss +3 -4
  107. package/src/scss/utilities/order/_defaults.scss +33 -2
  108. package/src/scss/utilities/order/_index.scss +55 -67
  109. package/src/scss/utilities/position/_defaults.scss +18 -5
  110. package/src/scss/utilities/position/_index.scss +2 -2
  111. package/src/scss/utilities/ratio/_defaults.scss +15 -2
  112. package/src/scss/utilities/ratio/_index.scss +2 -2
  113. package/src/scss/utilities/spacing/_defaults.scss +18 -5
  114. package/src/scss/utilities/spacing/_index.scss +2 -2
  115. package/src/scss/utilities/typography/_defaults.scss +146 -12
  116. package/src/scss/utilities/typography/_index.scss +854 -704
  117. package/src/scss/utilities/visibility/_defaults.scss +20 -5
  118. package/src/scss/utilities/visibility/_index.scss +2 -2
  119. package/src/scss/utilities/visually-hidden/_defaults.scss +1 -0
  120. package/src/scss/utilities/visually-hidden/_index.scss +1 -0
  121. package/src/scss/utilities/width/_defaults.scss +27 -2
  122. package/src/scss/utilities/width/_index.scss +163 -163
  123. package/src/scss/utilities/z-index/_defaults.scss +17 -5
  124. package/src/scss/utilities/z-index/_index.scss +2 -2
@@ -6,9 +6,13 @@
6
6
  // They should not be used to define direct property values (i.e. font-size, color, etc.).
7
7
  // Those should be defined as custom properties in the `_variables.scss` file.
8
8
 
9
+ @use "../../defaults" as root-defaults;
9
10
  @use "sass:map";
10
11
  @use "sass:list";
12
+ @use "sass:meta";
11
13
 
14
+ $generate-base-colors: root-defaults.$generate-base-colors !default;
15
+ $generate-base-themes: root-defaults.$generate-base-themes !default;
12
16
  $theme-selector-prefix: "." !default;
13
17
  $theme-selector-suffix: "-mode" !default;
14
18
 
@@ -27,8 +31,9 @@ $theme-selector-suffix: "-mode" !default;
27
31
  // Users can override any part of this giant map, allowing for fine-tuned control of theme colours.
28
32
 
29
33
  // Colours.
30
- $default-colors: (
34
+ $-colors: (
31
35
  primary: (
36
+ _default: hsl(219deg 75% 50%),
32
37
  100: hsl(219deg 100% 95%),
33
38
  200: hsl(219deg 90% 80%),
34
39
  300: hsl(219deg 80% 65%),
@@ -40,6 +45,7 @@ $default-colors: (
40
45
  900: hsl(219deg 100% 10%),
41
46
  ),
42
47
  secondary: (
48
+ _default: hsl(235deg 15% 50%),
43
49
  100: hsl(235deg 40% 95%),
44
50
  200: hsl(235deg 30% 80%),
45
51
  300: hsl(235deg 20% 65%),
@@ -51,6 +57,7 @@ $default-colors: (
51
57
  900: hsl(235deg 40% 10%),
52
58
  ),
53
59
  tertiary: (
60
+ _default: hsl(340deg 60% 50%),
54
61
  100: hsl(340deg 85% 95%),
55
62
  200: hsl(340deg 75% 80%),
56
63
  300: hsl(340deg 65% 65%),
@@ -63,16 +70,51 @@ $default-colors: (
63
70
  ),
64
71
  );
65
72
  $custom-colors: () !default;
66
- $colors: map.deep-merge($default-colors, $custom-colors);
73
+ $colors: () !default;
74
+
75
+ // Loop through the customized colors and convert them to a map structure.
76
+ // This allows users to more easlily add 1-off custom colours without having to define the entire color map structure.
77
+ @each $color, $value in $colors {
78
+ @if meta.type-of($value) == "color" {
79
+ $colors: map.merge(
80
+ $colors,
81
+ (
82
+ $color: (
83
+ _default: $value,
84
+ ),
85
+ )
86
+ );
87
+ }
88
+ }
89
+
90
+ // @todo remove this once $custom-colors is removed
91
+ @if $custom-colors != () {
92
+ @warn "`$custom-colors` is deprecated and will be removed in a future release of Graupl. Use `$colors` instead.";
93
+
94
+ $colors: map.deep-merge($colors, $custom-colors);
95
+ }
96
+
97
+ // Merge the custom colors with the default ones.
98
+ @if $generate-base-colors {
99
+ $colors: map.deep-merge($-colors, $colors);
100
+ }
67
101
 
68
102
  // Themes.
69
- $default-themes: (light, dark);
103
+ $-themes: (light, dark);
70
104
  $custom-themes: () !default;
71
- $themes: list.join($default-themes, $custom-themes);
105
+ $themes: () !default;
106
+
107
+ // @todo remove this once $custom-themes is removed
108
+ @if $custom-themes != () {
109
+ @warn "`$custom-themes` is deprecated and will be removed in a future release of Graupl. Use `$themes` instead.";
110
+
111
+ $themes: list.join($themes, $custom-themes);
112
+ }
113
+
72
114
  $default-theme: light !default;
73
115
 
74
116
  // Theme mappings.
75
- $default-theme-mappings: (
117
+ $-theme-mappings: (
76
118
  light: (
77
119
  100: 100,
78
120
  200: 200,
@@ -97,13 +139,23 @@ $default-theme-mappings: (
97
139
  ),
98
140
  );
99
141
  $custom-theme-mappings: () !default;
100
- $theme-mappings: map.deep-merge(
101
- $default-theme-mappings,
102
- $custom-theme-mappings
103
- );
142
+ $theme-mappings: () !default;
143
+
144
+ // @todo remove this once $custom-theme-mappings is removed
145
+ @if $custom-theme-mappings != () {
146
+ @warn "`$custom-theme-mappings` is deprecated and will be removed in a future release of Graupl. Use `$theme-mappings` instead.";
147
+
148
+ $theme-mappings: map.deep-merge($theme-mappings, $custom-theme-mappings);
149
+ }
150
+
151
+ // Merge the custom themes with the default ones.
152
+ @if $generate-base-themes {
153
+ $themes: list.join($-themes, $themes);
154
+ $theme-mappings: map.deep-merge($-theme-mappings, $theme-mappings);
155
+ }
104
156
 
105
157
  // Theme map.
106
- $default-theme-map: ();
158
+ $-theme-map: ();
107
159
 
108
160
  @each $theme in $themes {
109
161
  $theme-map: ();
@@ -112,12 +164,21 @@ $default-theme-map: ();
112
164
  $color-theme-map: ();
113
165
 
114
166
  @each $shade, $value in $color-map {
167
+ $color-property: null;
168
+
169
+ // Handle _default shade vs proper shade mappings.
170
+ @if map.has-key($theme-mappings, $theme, $shade) {
171
+ $color-property: map.get($theme-mappings, $theme, $shade);
172
+ } @else if $shade == "_default" {
173
+ $color-property: $shade;
174
+ }
175
+
115
176
  $color-theme-map: map.merge(
116
177
  $color-theme-map,
117
178
  (
118
179
  $shade: (
119
180
  color: $color-name,
120
- shade: map.get($theme-mappings, $theme, $shade),
181
+ shade: $color-property,
121
182
  ),
122
183
  )
123
184
  );
@@ -131,8 +192,8 @@ $default-theme-map: ();
131
192
  );
132
193
  }
133
194
 
134
- $default-theme-map: map.merge(
135
- $default-theme-map,
195
+ $-theme-map: map.merge(
196
+ $-theme-map,
136
197
  (
137
198
  $theme: $theme-map,
138
199
  )
@@ -140,4 +201,13 @@ $default-theme-map: ();
140
201
  }
141
202
 
142
203
  $custom-theme-map: () !default;
143
- $theme-map: map.deep-merge($default-theme-map, $custom-theme-map);
204
+ $theme-map: () !default;
205
+
206
+ // @todo remove this once $custom-theme-map is removed
207
+ @if $custom-theme-map != () {
208
+ @warn "`$custom-theme-map` is deprecated and will be removed in a future release of Graupl. Use `$theme-map` instead.";
209
+
210
+ $theme-map: map.deep-merge($theme-map, $custom-theme-map);
211
+ }
212
+
213
+ $theme-map: map.deep-merge($-theme-map, $theme-map);
@@ -15,14 +15,24 @@
15
15
  // Generate the default colour properties.
16
16
  @each $color, $map in defaults.$colors {
17
17
  @each $shade, $value in $map {
18
- --#{root-defaults.$prefix}#{$color}--#{$shade}: #{$value};
18
+ // Handle _default shade vs proper shade mappings.
19
+ @if $shade == "_default" {
20
+ --#{root-defaults.$prefix}#{$color}: #{$value};
21
+ } @else {
22
+ --#{root-defaults.$prefix}#{$color}--#{$shade}: #{$value};
23
+ }
19
24
  }
20
25
  }
21
26
 
22
27
  // Generate the active theme properties.
23
28
  @each $color, $map in map.get($themes, defaults.$default-theme) {
24
29
  @each $shade, $value in $map {
25
- --#{root-defaults.$prefix}theme-active--#{$color}--#{$shade}: #{$value};
30
+ // Handle _default shade vs proper shade mappings.
31
+ @if $shade == "_default" {
32
+ --#{root-defaults.$prefix}theme-active--#{$color}: #{$value};
33
+ } @else {
34
+ --#{root-defaults.$prefix}theme-active--#{$color}--#{$shade}: #{$value};
35
+ }
26
36
  }
27
37
  }
28
38
  }
@@ -32,7 +42,12 @@
32
42
  @include theme.theme($theme-name) {
33
43
  @each $color, $map in $theme {
34
44
  @each $shade, $value in $map {
35
- --#{root-defaults.$prefix}theme-active--#{$color}--#{$shade}: #{$value};
45
+ // Handle _default shade vs proper shade mappings.
46
+ @if $shade == "_default" {
47
+ --#{root-defaults.$prefix}theme-active--#{$color}: #{$value};
48
+ } @else {
49
+ --#{root-defaults.$prefix}theme-active--#{$color}--#{$shade}: #{$value};
50
+ }
36
51
  }
37
52
  }
38
53
 
@@ -16,11 +16,18 @@ $colors: ();
16
16
  $color-map: ();
17
17
 
18
18
  @each $shade, $value in $map {
19
+ $color-property: "";
20
+
19
21
  // Set the custom prop name and fallback value.
20
- $color-property: var(
21
- --#{root-defaults.$prefix}#{$color}--#{$shade},
22
- $value
23
- );
22
+ // Handle _default shade vs proper shade mappings.
23
+ @if $shade == "_default" {
24
+ $color-property: var(--#{root-defaults.$prefix}#{$color}, $value);
25
+ } @else {
26
+ $color-property: var(
27
+ --#{root-defaults.$prefix}#{$color}--#{$shade},
28
+ $value
29
+ );
30
+ }
24
31
 
25
32
  // Add the custom prop to the map.
26
33
  $color-map: map.merge(
@@ -52,10 +59,22 @@ $themes: (
52
59
  $color-map: ();
53
60
 
54
61
  @each $shade, $value in $map {
55
- $color-property: var(
56
- --#{root-defaults.$prefix}theme-#{$theme-name}--#{$color-name}--#{$shade},
57
- #{map.get($colors, map.get($value, color), map.get($value, shade))}
58
- );
62
+ $color-property: "";
63
+
64
+ // Set the custom prop name and fallback value.
65
+ // Handle _default shade vs proper shade mappings.
66
+ @if $shade == "_default" {
67
+ $color-property: var(
68
+ --#{root-defaults.$prefix}theme--#{$theme-name}--#{$color-name},
69
+ #{map.get($colors, map.get($value, color), map.get($value, shade))}
70
+ );
71
+ } @else {
72
+ $color-property: var(
73
+ --#{root-defaults.$prefix}theme-#{$theme-name}--#{$color-name}--#{$shade},
74
+ #{map.get($colors, map.get($value, color), map.get($value, shade))}
75
+ );
76
+ }
77
+
59
78
  $color-map: map.merge(
60
79
  $color-map,
61
80
  (
@@ -81,33 +100,47 @@ $themes: (
81
100
  }
82
101
 
83
102
  // Generate the active theme properties.
84
- @each $color-name, $map in map.get($themes, defaults.$default-theme) {
85
- $color-map: ();
103
+ @if map.has-key($themes, defaults.$default-theme) {
104
+ @each $color-name, $map in map.get($themes, defaults.$default-theme) {
105
+ $color-map: ();
86
106
 
87
- @each $shade, $value in $map {
88
- $color-property: var(
89
- --#{root-defaults.$prefix}theme-active--#{$color-name}--#{$shade},
90
- #{$value}
91
- );
92
- $color-map: map.merge(
93
- $color-map,
107
+ @each $shade, $value in $map {
108
+ $color-property: "";
109
+
110
+ // Set the custom prop name and fallback value.
111
+ // Handle _default shade vs proper shade mappings.
112
+ @if $shade == "_default" {
113
+ $color-property: var(
114
+ --#{root-defaults.$prefix}theme-active--#{$color-name},
115
+ #{$value}
116
+ );
117
+ } @else {
118
+ $color-property: var(
119
+ --#{root-defaults.$prefix}theme-active--#{$color-name}--#{$shade},
120
+ #{$value}
121
+ );
122
+ }
123
+
124
+ $color-map: map.merge(
125
+ $color-map,
126
+ (
127
+ $shade: $color-property,
128
+ )
129
+ );
130
+ }
131
+
132
+ $themes: map.merge(
133
+ $themes,
94
134
  (
95
- $shade: $color-property,
135
+ active: map.merge(
136
+ map.get($themes, active),
137
+ (
138
+ $color-name: $color-map,
139
+ )
140
+ ),
96
141
  )
97
142
  );
98
143
  }
99
-
100
- $themes: map.merge(
101
- $themes,
102
- (
103
- active: map.merge(
104
- map.get($themes, active),
105
- (
106
- $color-name: $color-map,
107
- )
108
- ),
109
- )
110
- );
111
144
  }
112
145
 
113
146
  // Colour properties.
@@ -6,9 +6,12 @@
6
6
  // They should not be used to define direct property values (i.e. font-size, color, etc.).
7
7
  // Those should be defined as custom properties in the `_variables.scss` file.
8
8
 
9
+ @use "../../defaults" as root-defaults;
9
10
  @use "sass:map";
10
11
 
11
12
  // font properties.
13
+ $generate-base-font-sizes: root-defaults.$generate-base-font-sizes !default;
14
+ $generate-base-font-weights: root-defaults.$generate-base-font-weights !default;
12
15
  $font-size-base: 1rem !default;
13
16
  $root-font-size: clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem) !default;
14
17
  $line-height: 1.2em !default;
@@ -16,7 +19,7 @@ $line-height: 1.2em !default;
16
19
  // Multipliers for font sizes.
17
20
  // This uses a minor third scale.
18
21
  // See: https://typescale.com/?size=16&scale=1.250&text=A%20Visual%20Type%20Scale&font=Lato&fontweight=400&bodyfont=body_font_default&bodyfontweight=400&lineheight=1.75&backgroundcolor=%23ffffff&fontcolor=%23000000
19
- $base-font-size-multipliers: (
22
+ $-font-size-multipliers: (
20
23
  xs: 0.694,
21
24
  sm: 0.833,
22
25
  base: 1,
@@ -28,19 +31,46 @@ $base-font-size-multipliers: (
28
31
  5xl: 2.986,
29
32
  );
30
33
  $custom-font-size-multipliers: () !default;
31
- $font-size-multipliers: map.merge(
32
- $base-font-size-multipliers,
33
- $custom-font-size-multipliers
34
- );
34
+ $font-size-multipliers: () !default;
35
+
36
+ // @todo remove this once $custom-font-size-multipliers is removed
37
+ @if $custom-font-size-multipliers != () {
38
+ @warn "`$custom-font-size-multipliers` is deprecated and will be removed in a future release of Graupl. Use `$font-size-multipliers` instead.";
39
+
40
+ $font-size-multipliers: map.merge(
41
+ $font-size-multipliers,
42
+ $custom-font-size-multipliers
43
+ );
44
+ }
45
+
46
+ // Merge the font size multipliers with the default ones.
47
+ @if $generate-base-font-sizes {
48
+ $font-size-multipliers: map.merge(
49
+ $-font-size-multipliers,
50
+ $font-size-multipliers
51
+ );
52
+ }
35
53
 
36
54
  // Weights.
37
- $base-font-weights: (
55
+ $-font-weights: (
38
56
  light: 300,
39
57
  normal: 400,
40
58
  bold: 700,
41
59
  );
42
60
  $custom-font-weights: () !default;
43
- $font-weights: map.merge($base-font-weights, $custom-font-weights);
61
+ $font-weights: () !default;
62
+
63
+ // @todo remove this once $custom-font-weights is removed
64
+ @if $custom-font-weights != () {
65
+ @warn "`$custom-font-weights` is deprecated and will be removed in a future release of Graupl. Use `$font-weights` instead.";
66
+
67
+ $font-weights: map.merge($font-weights, $custom-font-weights);
68
+ }
69
+
70
+ // Merge the custom font weights with the default ones.
71
+ @if $generate-base-font-weights {
72
+ $font-weights: map.merge($-font-weights, $font-weights);
73
+ }
44
74
 
45
75
  /* stylelint-disable-next-line scss/dollar-variable-colon-space-after */
46
76
  $root-font-family:
@@ -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;
@@ -33,9 +34,9 @@ $container-aware-selector-prefix: root-defaults.$utility-container-aware-selecto
33
34
  // Remember to replace references like [_template], or other placeholder content with appropriate descriptions!
34
35
 
35
36
  $template-selector-prefix: "template-" !default;
36
- $base-template-properties: ();
37
- $custom-template-properties: () !default;
38
- $template-properties: map.merge(
39
- $base-template-properties,
40
- $custom-template-properties
41
- );
37
+ $-template-properties: ();
38
+ $template-properties: () !default;
39
+
40
+ @if $generate-base-utilities {
41
+ $template-properties: map.merge($-template-properties, $template-properties);
42
+ }
@@ -11,6 +11,7 @@
11
11
  // The following variables control the generated classes:
12
12
  // - `$selector-base`: The base selector for the utility classes.
13
13
  // - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
14
+ // - `$generate-base-utilities`: A flag to determine if the base utility classes should be generated.
14
15
  // - `$screen-aware`: A flag to generate screen-aware utility classes.
15
16
  // - `$theme-aware`: A flag to generate theme-aware utility classes.
16
17
  // - `$state-aware`: A flag to generate state-aware utility classes.
@@ -24,8 +25,7 @@
24
25
  // - `$state-aware-selector-prefix`: The prefix for state-aware utility classes.
25
26
  // - `$container-aware-selector-prefix`: The prefix for container-aware utility classes.
26
27
  // - `$template-selector-prefix`: The prefix for the utility classes.
27
- // - `$base-template-properties`: The base properties and values for the template utility classes.
28
- // - `$custom-template-properties`: The custom properties and values for the template utility classes.
28
+ // - `$custom-template-properties`: [DEPRECATED] The custom properties and values for the template utility classes.
29
29
  // - `$template-properties`: The merged properties and values for the template utility classes.
30
30
  //
31
31
  // Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.
@@ -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,7 +28,7 @@ $container-aware-selector-prefix: root-defaults.$utility-container-aware-selecto
27
28
 
28
29
  // Align content properties.
29
30
  $align-content-selector-prefix: "align-content-" !default;
30
- $base-align-content-properties: (
31
+ $-align-content-properties: (
31
32
  normal: normal,
32
33
  start: flex-start,
33
34
  end: flex-end,
@@ -39,14 +40,21 @@ $base-align-content-properties: (
39
40
  stretch: stretch,
40
41
  );
41
42
  $custom-align-content-properties: () !default;
42
- $align-content-properties: map.merge(
43
- $base-align-content-properties,
44
- $custom-align-content-properties
45
- );
43
+ $align-content-properties: () !default;
44
+
45
+ // @todo remove this once $custom-align-content-properties is removed
46
+ @if $custom-align-content-properties != () {
47
+ @warn "`$custom-align-content-properties` is deprecated and will be removed in a future release of Graupl. Use `$align-content-properties` instead.";
48
+
49
+ $align-content-properties: map.merge(
50
+ $align-content-properties,
51
+ $custom-align-content-properties
52
+ );
53
+ }
46
54
 
47
55
  // Align items properties.
48
56
  $align-items-selector-prefix: "align-items-" !default;
49
- $base-align-items-properties: (
57
+ $-align-items-properties: (
50
58
  start: start,
51
59
  end: end,
52
60
  center: center,
@@ -54,14 +62,21 @@ $base-align-items-properties: (
54
62
  stretch: stretch,
55
63
  );
56
64
  $custom-align-items-properties: () !default;
57
- $align-items-properties: map.merge(
58
- $base-align-items-properties,
59
- $custom-align-items-properties
60
- );
65
+ $align-items-properties: () !default;
66
+
67
+ // @todo remove this once $custom-align-items-properties is removed
68
+ @if $custom-align-items-properties != () {
69
+ @warn "`$custom-align-items-properties` is deprecated and will be removed in a future release of Graupl. Use `$align-items-properties` instead.";
70
+
71
+ $align-items-properties: map.merge(
72
+ $align-items-properties,
73
+ $custom-align-items-properties
74
+ );
75
+ }
61
76
 
62
77
  // Align self properties.
63
78
  $align-self-selector-prefix: "align-self-" !default;
64
- $base-align-self-properties: (
79
+ $-align-self-properties: (
65
80
  auto: auto,
66
81
  start: start,
67
82
  end: end,
@@ -70,7 +85,30 @@ $base-align-self-properties: (
70
85
  stretch: stretch,
71
86
  );
72
87
  $custom-align-self-properties: () !default;
73
- $align-self-properties: map.merge(
74
- $base-align-self-properties,
75
- $custom-align-self-properties
76
- );
88
+ $align-self-properties: () !default;
89
+
90
+ // @todo remove this once $custom-align-self-properties is removed
91
+ @if $custom-align-self-properties != () {
92
+ @warn "`$custom-align-self-properties` is deprecated and will be removed in a future release of Graupl. Use `$align-self-properties` instead.";
93
+
94
+ $align-self-properties: map.merge(
95
+ $align-self-properties,
96
+ $custom-align-self-properties
97
+ );
98
+ }
99
+
100
+ // Merge custom properties with base properties if generating base utilities.
101
+ @if $generate-base-utilities {
102
+ $align-content-properties: map.merge(
103
+ $-align-content-properties,
104
+ $align-content-properties
105
+ );
106
+ $align-items-properties: map.merge(
107
+ $-align-items-properties,
108
+ $align-items-properties
109
+ );
110
+ $align-self-properties: map.merge(
111
+ $-align-self-properties,
112
+ $align-self-properties
113
+ );
114
+ }
@@ -30,6 +30,7 @@
30
30
  // The following variables control the generated classes:
31
31
  // - `$selector-base`: The base selector for the utility classes.
32
32
  // - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
33
+ // - `$generate-base-utilities`: A flag to determine if the base utility classes should be generated.
33
34
  // - `$screen-aware`: A flag to generate screen-aware utility classes.
34
35
  // - `$theme-aware`: A flag to generate theme-aware utility classes.
35
36
  // - `$state-aware`: A flag to generate state-aware utility classes.
@@ -43,16 +44,13 @@
43
44
  // - `$state-aware-selector-prefix`: The prefix for state-aware utility classes.
44
45
  // - `$container-aware-selector-prefix`: The prefix for container-aware utility classes.
45
46
  // - `$align-content-selector-prefix`: The prefix for the align content utility classes.
46
- // - `$base-align-content-properties`: The base properties and values for the align content utility classes.
47
- // - `$custom-align-content-properties`: The custom properties and values for the align content utility classes.
47
+ // - `$custom-align-content-properties`: [DEPRECATED] The custom properties and values for the align content utility classes.
48
48
  // - `$align-content-properties`: The combined properties and values for the align content utility classes.
49
49
  // - `$align-items-selector-prefix`: The prefix for the align items utility classes.
50
- // - `$base-align-items-properties`: The base properties and values for the align items utility classes.
51
- // - `$custom-align-items-properties`: The custom properties and values for the align items utility classes.
50
+ // - `$custom-align-items-properties`: [DEPRECATED] The custom properties and values for the align items utility classes.
52
51
  // - `$align-items-properties`: The combined properties and values for the align items utility classes.
53
52
  // - `$align-self-selector-prefix`: The prefix for the align self utility classes.
54
- // - `$base-align-self-properties`: The base properties and values for the align self utility classes.
55
- // - `$custom-align-self-properties`: The custom properties and values for the align self utility classes.
53
+ // - `$custom-align-self-properties`: [DEPRECATED] The custom properties and values for the align self utility classes.
56
54
  // - `$align-self-properties`: The combined properties and values for the align self utility classes.
57
55
  //
58
56
  // Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.