@graupl/graupl 1.0.0-alpha.3 → 1.0.0-alpha.5

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 (36) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/base/form/form.css.map +1 -1
  3. package/dist/base/link/link.css.map +1 -1
  4. package/dist/component/button/button.css.map +1 -1
  5. package/dist/graupl.css +1 -1
  6. package/dist/graupl.css.map +1 -1
  7. package/dist/layout/columns/columns.css.map +1 -1
  8. package/dist/layout/container/container.css.map +1 -1
  9. package/dist/state/focus/focus.css.map +1 -1
  10. package/dist/theme/theme.css +1 -1
  11. package/dist/theme/theme.css.map +1 -1
  12. package/dist/utilities/colors/colors.css +1 -1
  13. package/dist/utilities/colors/colors.css.map +1 -1
  14. package/package.json +2 -2
  15. package/scss/base/form/_defaults.scss +0 -2
  16. package/scss/base/form/_variables.scss +49 -39
  17. package/scss/base/link/_defaults.scss +0 -2
  18. package/scss/base/link/_variables.scss +12 -8
  19. package/scss/component/button/_defaults.scss +0 -2
  20. package/scss/component/button/_index.scss +19 -7
  21. package/scss/component/button/_variables.scss +47 -43
  22. package/scss/layout/columns/_defaults.scss +0 -2
  23. package/scss/layout/columns/_index.scss +5 -5
  24. package/scss/layout/columns/_variables.scss +16 -7
  25. package/scss/layout/container/_defaults.scss +0 -2
  26. package/scss/layout/container/_index.scss +16 -12
  27. package/scss/layout/container/_variables.scss +12 -8
  28. package/scss/mixins/_layer.scss +2 -2
  29. package/scss/state/focus/_defaults.scss +0 -2
  30. package/scss/state/focus/_variables.scss +13 -9
  31. package/scss/theme/_defaults.scss +4 -5
  32. package/scss/theme/_index.scss +13 -7
  33. package/scss/theme/_variables.scss +26 -6
  34. package/scss/utilities/colors/_defaults.scss +0 -2
  35. package/scss/utilities/colors/_index.scss +2 -2
  36. package/dist/utilities/background/background.css +0 -1
@@ -1,28 +1,32 @@
1
1
  // Variables referencing custom properties.
2
2
 
3
- @use "../../variables" as base;
4
3
  @use "defaults";
4
+ @use "../../variables" as root-variables;
5
+ @use "../../defaults" as root-defaults;
5
6
  @use "../../functions/theme";
6
7
 
7
8
  // Link properties.
8
9
  $link-text-decoration: var(
9
- --#{defaults.$prefix}-link-text-decoration,
10
+ --#{root-defaults.$prefix}-link-text-decoration,
10
11
  #{defaults.$link-text-decoration}
11
12
  );
12
13
  $link-text-decoration-thickness: var(
13
- --#{defaults.$prefix}-link-text-decoration-thickness,
14
- #{base.$border-width}
14
+ --#{root-defaults.$prefix}-link-text-decoration-thickness,
15
+ #{root-variables.$border-width}
16
+ );
17
+ $link-color: var(
18
+ --#{root-defaults.$prefix}-link-color,
19
+ #{theme.get(primary, 700)}
15
20
  );
16
- $link-color: var(--#{defaults.$prefix}-link-color, #{theme.get(primary, 700)});
17
21
  $link-hover-color: var(
18
- --#{defaults.$prefix}-link-hover-color,
22
+ --#{root-defaults.$prefix}-link-hover-color,
19
23
  #{theme.get(tertiary, 700)}
20
24
  );
21
25
  $link-active-color: var(
22
- --#{defaults.$prefix}-link-active-color,
26
+ --#{root-defaults.$prefix}-link-active-color,
23
27
  #{theme.get(tertiary, 700)}
24
28
  );
25
29
  $link-visited-color: var(
26
- --#{defaults.$prefix}-link-visited-color,
30
+ --#{root-defaults.$prefix}-link-visited-color,
27
31
  #{theme.get(primary, 700)}
28
32
  );
@@ -4,8 +4,6 @@
4
4
  // They are mainly used to provide default fallbacks for custom properties
5
5
  // which can be found in the `variables.scss` file.
6
6
 
7
- @forward "../../defaults";
8
-
9
7
  $button-hover-transform: none !default;
10
8
  $button-hover-transform-reduced-motion: none !default;
11
9
  $button-active-transform: scale(0.95) !default;
@@ -1,6 +1,6 @@
1
1
  // Graupl Button Component.
2
2
 
3
- @use "defaults";
3
+ @use "../../defaults" as root-defaults;
4
4
  @use "../../theme/variables" as theme;
5
5
  @use "variables" as *;
6
6
  @use "../../mixins/layer" as *;
@@ -88,12 +88,24 @@
88
88
 
89
89
  @each $color, $map in theme.$theme-active {
90
90
  &.#{$color} {
91
- --#{defaults.$prefix}-button-hover-background: #{map.get($map, 700)};
92
- --#{defaults.$prefix}-button-active-background: #{map.get($map, 700)};
93
- --#{defaults.$prefix}-button-border-color: #{map.get($map, 700)};
94
- --#{defaults.$prefix}-button-hover-border-color: #{map.get($map, 700)};
95
- --#{defaults.$prefix}-button-active-border-color: #{map.get($map, 700)};
96
- --#{defaults.$prefix}-button-disabled-border-color: #{map.get(
91
+ --#{root-defaults.$prefix}-button-hover-background: #{map.get(
92
+ $map,
93
+ 700
94
+ )};
95
+ --#{root-defaults.$prefix}-button-active-background: #{map.get(
96
+ $map,
97
+ 700
98
+ )};
99
+ --#{root-defaults.$prefix}-button-border-color: #{map.get($map, 700)};
100
+ --#{root-defaults.$prefix}-button-hover-border-color: #{map.get(
101
+ $map,
102
+ 700
103
+ )};
104
+ --#{root-defaults.$prefix}-button-active-border-color: #{map.get(
105
+ $map,
106
+ 700
107
+ )};
108
+ --#{root-defaults.$prefix}-button-disabled-border-color: #{map.get(
97
109
  $map,
98
110
  200
99
111
  )};
@@ -1,128 +1,132 @@
1
1
  // Variables referencing custom properties.
2
2
 
3
- @use "../../variables" as base;
4
3
  @use "defaults";
5
- @use "sass:map";
4
+ @use "../../variables" as root-variables;
5
+ @use "../../defaults" as root-defaults;
6
6
  @use "../../functions/theme";
7
+ @use "sass:map";
7
8
 
8
9
  // Button properties.
9
10
  $button-min-width: var(
10
- --#{defaults.$prefix}-button-min-width,
11
- #{defaults.$interactive-min-width}
11
+ --#{root-defaults.$prefix}-button-min-width,
12
+ #{root-defaults.$interactive-min-width}
12
13
  );
13
14
  $button-min-height: var(
14
- --#{defaults.$prefix}-button-min-height,
15
- #{defaults.$interactive-min-height}
15
+ --#{root-defaults.$prefix}-button-min-height,
16
+ #{root-defaults.$interactive-min-height}
17
+ );
18
+ $button-padding-x: var(
19
+ --#{root-defaults.$prefix}-button-padding-x,
20
+ #{root-variables.$gap}
16
21
  );
17
- $button-padding-x: var(--#{defaults.$prefix}-button-padding-x, #{base.$gap});
18
22
  $button-padding-y: var(
19
- --#{defaults.$prefix}-button-padding-y,
20
- calc(#{base.$gap} / 2)
23
+ --#{root-defaults.$prefix}-button-padding-y,
24
+ calc(#{root-variables.$gap} / 2)
21
25
  );
22
26
  $button-padding: var(
23
- --#{defaults.$prefix}-button-padding,
27
+ --#{root-defaults.$prefix}-button-padding,
24
28
  #{$button-padding-y} #{$button-padding-x}
25
29
  );
26
30
  $button-font-size: var(
27
- --#{defaults.$prefix}-button-font-size,
28
- #{map.get(base.$font-size, default)}
31
+ --#{root-defaults.$prefix}-button-font-size,
32
+ #{map.get(root-variables.$font-size, default)}
29
33
  );
30
34
  $button-transition: var(
31
- --#{defaults.$prefix}-button-transition,
32
- background #{map.get(base.$transition-duration, fast)} #{base.$transition-timing-function},
33
- color #{map.get(base.$transition-duration, fast)} #{base.$transition-timing-function},
34
- border-color #{map.get(base.$transition-duration, fast)} #{base.$transition-timing-function},
35
- transform #{map.get(base.$transition-duration, fast)} #{base.$transition-timing-function}
35
+ --#{root-defaults.$prefix}-button-transition,
36
+ background #{map.get(root-variables.$transition-duration, fast)} #{root-variables.$transition-timing-function},
37
+ color #{map.get(root-variables.$transition-duration, fast)} #{root-variables.$transition-timing-function},
38
+ border-color #{map.get(root-variables.$transition-duration, fast)} #{root-variables.$transition-timing-function},
39
+ transform #{map.get(root-variables.$transition-duration, fast)} #{root-variables.$transition-timing-function}
36
40
  );
37
41
  $button-transition-reduced-motion: var(
38
- --#{defaults.$prefix}-button-transition-reduced-motion,
39
- background #{map.get(base.$transition-duration, none)} #{base.$transition-timing-function},
40
- color #{map.get(base.$transition-duration, none)} #{base.$transition-timing-function},
41
- border-color #{map.get(base.$transition-duration, none)} #{base.$transition-timing-function}
42
+ --#{root-defaults.$prefix}-button-transition-reduced-motion,
43
+ background #{map.get(root-variables.$transition-duration, none)} #{root-variables.$transition-timing-function},
44
+ color #{map.get(root-variables.$transition-duration, none)} #{root-variables.$transition-timing-function},
45
+ border-color #{map.get(root-variables.$transition-duration, none)} #{root-variables.$transition-timing-function}
42
46
  );
43
47
 
44
48
  // Transform properties.
45
49
  $button-hover-transform: var(
46
- --#{defaults.$prefix}-button-hover-transform,
50
+ --#{root-defaults.$prefix}-button-hover-transform,
47
51
  #{defaults.$button-hover-transform}
48
52
  );
49
53
  $button-active-transform: var(
50
- --#{defaults.$prefix}-button-active-transform,
54
+ --#{root-defaults.$prefix}-button-active-transform,
51
55
  #{defaults.$button-active-transform}
52
56
  );
53
57
  $button-hover-transform-reduced-motion: var(
54
- --#{defaults.$prefix}-button-hover-transform-reduced-motion,
58
+ --#{root-defaults.$prefix}-button-hover-transform-reduced-motion,
55
59
  #{defaults.$button-hover-transform-reduced-motion}
56
60
  );
57
61
  $button-active-transform-reduced-motion: var(
58
- --#{defaults.$prefix}-button-active-transform-reduced-motion,
62
+ --#{root-defaults.$prefix}-button-active-transform-reduced-motion,
59
63
  #{defaults.$button-active-transform-reduced-motion}
60
64
  );
61
65
 
62
66
  // Background properties.
63
67
  $button-background: var(
64
- --#{defaults.$prefix}-button-background,
68
+ --#{root-defaults.$prefix}-button-background,
65
69
  #{theme.get(primary, 100)}
66
70
  );
67
71
  $button-hover-background: var(
68
- --#{defaults.$prefix}-button-hover-background,
72
+ --#{root-defaults.$prefix}-button-hover-background,
69
73
  #{theme.get(primary, 900)}
70
74
  );
71
75
  $button-active-background: var(
72
- --#{defaults.$prefix}-button-active-background,
76
+ --#{root-defaults.$prefix}-button-active-background,
73
77
  #{theme.get(primary, 900)}
74
78
  );
75
79
  $button-disabled-background: var(
76
- --#{defaults.$prefix}-button-disabled-background,
80
+ --#{root-defaults.$prefix}-button-disabled-background,
77
81
  #{theme.get(primary, 100)}
78
82
  );
79
83
 
80
84
  // Text properties.
81
85
  $button-color: var(
82
- --#{defaults.$prefix}-button-color,
86
+ --#{root-defaults.$prefix}-button-color,
83
87
  #{theme.get(primary, 900)}
84
88
  );
85
89
  $button-hover-color: var(
86
- --#{defaults.$prefix}-button-hover-color,
90
+ --#{root-defaults.$prefix}-button-hover-color,
87
91
  #{theme.get(primary, 100)}
88
92
  );
89
93
  $button-active-color: var(
90
- --#{defaults.$prefix}-button-active-color,
94
+ --#{root-defaults.$prefix}-button-active-color,
91
95
  #{theme.get(primary, 100)}
92
96
  );
93
97
  $button-disabled-color: var(
94
- --#{defaults.$prefix}-button-disabled-color,
98
+ --#{root-defaults.$prefix}-button-disabled-color,
95
99
  #{theme.get(primary, 200)}
96
100
  );
97
101
 
98
102
  // Border properties.
99
103
  $button-border-width: var(
100
- --#{defaults.$prefix}-button-border-width,
101
- #{base.$border-width}
104
+ --#{root-defaults.$prefix}-button-border-width,
105
+ #{root-variables.$border-width}
102
106
  );
103
107
  $button-border-style: var(
104
- --#{defaults.$prefix}-botton-border-style,
105
- #{base.$border-style}
108
+ --#{root-defaults.$prefix}-botton-border-style,
109
+ #{root-variables.$border-style}
106
110
  );
107
111
  $button-border-radius: var(
108
- --#{defaults.$prefix}-button-border-radius,
109
- #{base.$border-radius}
112
+ --#{root-defaults.$prefix}-button-border-radius,
113
+ #{root-variables.$border-radius}
110
114
  );
111
115
 
112
116
  // Border colour properties.
113
117
  $button-border-color: var(
114
- --#{defaults.$prefix}-button-border-color,
118
+ --#{root-defaults.$prefix}-button-border-color,
115
119
  #{theme.get(primary, 900)}
116
120
  );
117
121
  $button-hover-border-color: var(
118
- --#{defaults.$prefix}-button-hover-border-color,
122
+ --#{root-defaults.$prefix}-button-hover-border-color,
119
123
  #{theme.get(primary, 900)}
120
124
  );
121
125
  $button-active-border-color: var(
122
- --#{defaults.$prefix}-button-active-border-color,
126
+ --#{root-defaults.$prefix}-button-active-border-color,
123
127
  #{theme.get(primary, 900)}
124
128
  );
125
129
  $button-disabled-border-color: var(
126
- --#{defaults.$prefix}-button-disabled-border-color,
130
+ --#{root-defaults.$prefix}-button-disabled-border-color,
127
131
  #{theme.get(primary, 200)}
128
132
  );
@@ -4,8 +4,6 @@
4
4
  // They are mainly used to provide default fallbacks for custom properties
5
5
  // which can be found in the `variables.scss` file.
6
6
 
7
- @forward "../../defaults";
8
-
9
7
  $columns-max-width: 1fr !default;
10
8
  $columns-count: 3 !default;
11
9
  $columns-disable-width: 48ch !default;
@@ -2,14 +2,14 @@
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "defaults";
5
- @use "../../variables" as base;
5
+ @use "../../defaults" as root-defaults;
6
6
  @use "../../mixins/layer" as *;
7
7
 
8
8
  @include layer(layout) {
9
9
  .columns {
10
10
  display: grid;
11
11
  grid-template-columns: var(
12
- --#{defaults.$prefix}-columns,
12
+ --#{root-defaults.$prefix}-columns,
13
13
  repeat(auto-fit, minmax(#{$columns-min-width}, #{$columns-max-width}))
14
14
  );
15
15
  gap: $columns-gap;
@@ -21,18 +21,18 @@
21
21
 
22
22
  @for $i from defaults.$columns-min-count through defaults.$columns-max-count {
23
23
  .count-#{$i} {
24
- --#{defaults.$prefix}-columns-count: #{$i};
24
+ --#{root-defaults.$prefix}-columns-count: #{$i};
25
25
  }
26
26
 
27
27
  .span-#{$i} {
28
- --#{defaults.$prefix}-columns-span: #{$i};
28
+ --#{root-defaults.$prefix}-columns-span: #{$i};
29
29
  }
30
30
  }
31
31
 
32
32
  // Disable columns on small screens to avoid horizontal bleeding.
33
33
  @media screen and (max-width: #{defaults.$columns-disable-width}) {
34
34
  .columns {
35
- --#{defaults.$prefix}-columns-min-width: #{defaults.$columns-max-width};
35
+ --#{root-defaults.$prefix}-columns-min-width: #{defaults.$columns-max-width};
36
36
  }
37
37
  }
38
38
  }
@@ -1,24 +1,33 @@
1
1
  // Variables referencing custom properties.
2
2
 
3
- @use "../../variables" as base;
4
3
  @use "defaults";
4
+ @use "../../variables" as root-variables;
5
+ @use "../../defaults" as root-defaults;
5
6
 
6
- $columns-gap: var(--#{defaults.$prefix}-columns-gap, #{base.$gap});
7
+ $columns-gap: var(
8
+ --#{root-defaults.$prefix}-columns-gap,
9
+ #{root-variables.$gap}
10
+ );
7
11
  $columns-count: var(
8
- --#{defaults.$prefix}-columns-count,
12
+ --#{root-defaults.$prefix}-columns-count,
9
13
  #{defaults.$columns-count}
10
14
  );
15
+ /* stylelint-disable scss/operator-no-newline-after -- Prettier wants to format it this way. */
11
16
  $columns-min-width: var(
12
- --#{defaults.$prefix}-columns-min-width,
17
+ --#{root-defaults.$prefix}-columns-min-width,
13
18
  calc(
14
- (#{base.$content-max-width} - #{$columns-gap} * (#{$columns-count} - 1)) / #{$columns-count}
19
+ (
20
+ #{root-variables.$content-max-width} - #{$columns-gap} *
21
+ (#{$columns-count} - 1)
22
+ ) / #{$columns-count}
15
23
  )
16
24
  );
25
+ /* stylelint-enable scss/operator-no-newline-after */
17
26
  $columns-max-width: var(
18
- --#{defaults.$prefix}-columns-max-width,
27
+ --#{root-defaults.$prefix}-columns-max-width,
19
28
  #{defaults.$columns-max-width}
20
29
  );
21
30
  $columns-span: var(
22
- --#{defaults.$prefix}-columns-span,
31
+ --#{root-defaults.$prefix}-columns-span,
23
32
  #{defaults.$columns-span}
24
33
  );
@@ -4,7 +4,5 @@
4
4
  // They are mainly used to provide default fallbacks for custom properties
5
5
  // which can be found in the `variables.scss` file.
6
6
 
7
- @forward "../../defaults";
8
-
9
7
  $container-breakout-width: 15ch !default;
10
8
  $container-feature-width: 20ch !default;
@@ -2,34 +2,38 @@
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "../../mixins/layer" as *;
5
- @use "defaults";
5
+ @use "../../defaults" as root-defaults;
6
6
 
7
7
  @include layer(layout) {
8
8
  .container,
9
9
  .container > .full-width {
10
- --#{defaults.$prefix}-container-full-width: minmax(#{$container-gap}, 1fr);
11
- --#{defaults.$prefix}-container-content: min(
10
+ --#{root-defaults.$prefix}-container-full-width: minmax(
11
+ #{$container-gap},
12
+ 1fr
13
+ );
14
+ --#{root-defaults.$prefix}-container-content: min(
12
15
  #{$container-content-max-width},
13
16
  calc(100% - #{$container-gap} * 2)
14
17
  );
15
- --#{defaults.$prefix}-container-breakout: minmax(
18
+ --#{root-defaults.$prefix}-container-breakout: minmax(
16
19
  0,
17
20
  #{$container-breakout-width}
18
21
  );
19
- --#{defaults.$prefix}-container-feature: minmax(
22
+ --#{root-defaults.$prefix}-container-feature: minmax(
20
23
  0,
21
24
  #{$container-feature-width}
22
25
  );
23
26
 
24
27
  display: grid;
25
28
  grid-template-columns:
26
- [full-width-start] var(--#{defaults.$prefix}-container-full-width)
27
- [feature-start] var(--#{defaults.$prefix}-container-feature)
28
- [breakout-start] var(--#{defaults.$prefix}-container-breakout)
29
- [content-start] var(--#{defaults.$prefix}-container-content) [content-end]
30
- var(--#{defaults.$prefix}-container-breakout) [breakout-end]
31
- var(--#{defaults.$prefix}-container-feature) [feature-end]
32
- var(--#{defaults.$prefix}-container-full-width) [full-width-end];
29
+ [full-width-start] var(--#{root-defaults.$prefix}-container-full-width)
30
+ [feature-start] var(--#{root-defaults.$prefix}-container-feature)
31
+ [breakout-start] var(--#{root-defaults.$prefix}-container-breakout)
32
+ [content-start] var(--#{root-defaults.$prefix}-container-content)
33
+ [content-end]
34
+ var(--#{root-defaults.$prefix}-container-breakout) [breakout-end]
35
+ var(--#{root-defaults.$prefix}-container-feature) [feature-end]
36
+ var(--#{root-defaults.$prefix}-container-full-width) [full-width-end];
33
37
 
34
38
  > :not(.breakout, .full-width, .feature) {
35
39
  grid-column: content;
@@ -1,26 +1,30 @@
1
1
  // Variables referencing custom properties.
2
2
 
3
- @use "../../variables" as base;
4
3
  @use "defaults";
4
+ @use "../../variables" as root-variables;
5
+ @use "../../defaults" as root-defaults;
5
6
 
6
- $container-gap: var(--#{defaults.$prefix}-container-gap, #{base.$gap});
7
+ $container-gap: var(
8
+ --#{root-defaults.$prefix}-container-gap,
9
+ #{root-variables.$gap}
10
+ );
7
11
  $container-content-max-width: var(
8
- --#{defaults.$prefix}-container-content-max-width,
9
- #{base.$content-max-width}
12
+ --#{root-defaults.$prefix}-container-content-max-width,
13
+ #{root-variables.$content-max-width}
10
14
  );
11
15
  $container-breakout-max-width: var(
12
- --#{defaults.$prefix}-container-breakout-max-width,
16
+ --#{root-defaults.$prefix}-container-breakout-max-width,
13
17
  calc(#{$container-content-max-width} + #{defaults.$container-breakout-width})
14
18
  );
15
19
  $container-breakout-width: var(
16
- --#{defaults.$prefix}-container-breakout-width,
20
+ --#{root-defaults.$prefix}-container-breakout-width,
17
21
  calc((#{$container-breakout-max-width} - #{$container-content-max-width}) / 2)
18
22
  );
19
23
  $container-feature-max-width: var(
20
- --#{defaults.$prefix}-container-feature-max-width,
24
+ --#{root-defaults.$prefix}-container-feature-max-width,
21
25
  calc(#{$container-breakout-max-width} + #{defaults.$container-feature-width})
22
26
  );
23
27
  $container-feature-width: var(
24
- --#{defaults.$prefix}-container-feature-width,
28
+ --#{root-defaults.$prefix}-container-feature-width,
25
29
  calc((#{$container-feature-max-width} - #{$container-breakout-max-width}) / 2)
26
30
  );
@@ -3,11 +3,11 @@
3
3
  // These should be used to define the layers of your components to ensure that
4
4
  // they are output in the correct order in the final compiled CSS.
5
5
 
6
- @use "../defaults" as base;
6
+ @use "../defaults" as root-defaults;
7
7
 
8
8
  @mixin layer($layer) {
9
9
  @at-root {
10
- @layer #{base.$prefix}.#{$layer} {
10
+ @layer #{root-defaults.$prefix}.#{$layer} {
11
11
  @content;
12
12
  }
13
13
  }
@@ -4,7 +4,5 @@
4
4
  // They are mainly used to provide default fallbacks for custom properties
5
5
  // which can be found in the `variables.scss` file.
6
6
 
7
- @forward "../../defaults";
8
-
9
7
  $focus-outline-style: dotted !default;
10
8
  $focus-box-shadow-style: inset !default;
@@ -1,36 +1,40 @@
1
1
  // Variables referencing custom properties.
2
2
 
3
- @use "../../variables" as base;
3
+ @use "../../variables" as root-variables;
4
4
  @use "defaults";
5
+ @use "../../defaults" as root-defaults;
5
6
  @use "../../functions/theme";
6
7
 
7
- $focus-width: var(--#{defaults.$prefix}-focus-width, #{base.$border-width});
8
+ $focus-width: var(
9
+ --#{root-defaults.$prefix}-focus-width,
10
+ #{root-variables.$border-width}
11
+ );
8
12
  $focus-outline-color: var(
9
- --#{defaults.$prefix}-focus-outline-color,
13
+ --#{root-defaults.$prefix}-focus-outline-color,
10
14
  #{theme.get(primary, 900)}
11
15
  );
12
16
  $focus-outline-width: var(
13
- --#{defaults.$prefix}-focus-outline-width,
17
+ --#{root-defaults.$prefix}-focus-outline-width,
14
18
  #{$focus-width}
15
19
  );
16
20
  $focus-outline-style: var(
17
- --#{defaults.$prefix}-focus-outline-style,
21
+ --#{root-defaults.$prefix}-focus-outline-style,
18
22
  #{defaults.$focus-outline-style}
19
23
  );
20
24
  $focus-outline-offset: var(
21
- --#{defaults.$prefix}-focus-outline-offset,
25
+ --#{root-defaults.$prefix}-focus-outline-offset,
22
26
  calc(-1 * #{$focus-outline-width})
23
27
  );
24
28
  $focus-box-shadow-color: var(
25
- --#{defaults.$prefix}-focus-box-shadow-color,
29
+ --#{root-defaults.$prefix}-focus-box-shadow-color,
26
30
  #{theme.get(primary, 100)}
27
31
  );
28
32
  $focus-box-shadow-style: var(
29
- --#{defaults.$prefix}-focus-box-shadow-style,
33
+ --#{root-defaults.$prefix}-focus-box-shadow-style,
30
34
  #{defaults.$focus-box-shadow-style}
31
35
  );
32
36
  $focus-box-shadow: var(
33
- --#{defaults.$prefix}-focus-box-shadow,
37
+ --#{root-defaults.$prefix}-focus-box-shadow,
34
38
  #{$focus-width $focus-width} 0 0 #{$focus-box-shadow-style} #{$focus-box-shadow-color},
35
39
  0 0 0 #{$focus-width} #{$focus-box-shadow-style} #{$focus-box-shadow-color}
36
40
  );
@@ -5,7 +5,6 @@
5
5
  // which can be found in the `variables.scss` file.
6
6
 
7
7
  @use "sass:map";
8
- @forward "../defaults";
9
8
 
10
9
  // Colours.
11
10
  $default-colors: (
@@ -42,9 +41,9 @@ $default-colors: (
42
41
  800: hsl(340deg 75% 20%),
43
42
  900: hsl(340deg 85% 10%),
44
43
  ),
45
- ) !default;
44
+ );
46
45
  $custom-colors: () !default;
47
- $colors: map.merge($default-colors, $custom-colors) !default;
46
+ $colors: map.merge($default-colors, $custom-colors);
48
47
 
49
48
  // A map for reversing the shade values of the dark theme.
50
49
  $dark-map: (
@@ -61,7 +60,7 @@ $dark-map: (
61
60
 
62
61
  // Font properties.
63
62
  /* stylelint-disable-next-line scss/dollar-variable-colon-space-after */
64
- $font-family:
63
+ $global-font-family:
65
64
  system-ui,
66
65
  -apple-system,
67
66
  blinkmacsystemfont,
@@ -70,4 +69,4 @@ $font-family:
70
69
  "Helvetica Neue",
71
70
  arial,
72
71
  sans-serif !default;
73
- $font-size: clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem);
72
+ $global-font-size: clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem);
@@ -2,23 +2,29 @@
2
2
 
3
3
  @use "variables" as *;
4
4
  @use "../mixins/layer" as *;
5
- @use "defaults";
5
+ @use "../defaults" as root-defaults;
6
6
  @use "sass:map";
7
7
  @use "../functions/theme";
8
8
 
9
9
  @include layer(theme) {
10
10
  :root {
11
- background: theme.get(primary, 100);
12
- color: theme.get(primary, 900);
13
- font-family: $font-family;
14
- font-size: $font-size;
11
+ background: $global-background;
12
+ color: $global-font-color;
13
+ font-family: $global-font-family;
14
+ font-size: $global-font-size;
15
+
16
+ @each $color, $map in $theme-light {
17
+ @each $shade, $value in $map {
18
+ --#{root-defaults.$prefix}-theme-active--#{$color}--#{$shade}: #{$value};
19
+ }
20
+ }
15
21
  }
16
22
 
17
23
  // Set the active theme for dark mode.
18
24
  .dark-mode {
19
25
  @each $color, $map in $theme-dark {
20
26
  @each $shade, $value in $map {
21
- --#{defaults.$prefix}-theme-active--#{$color}--#{$shade}: #{$value};
27
+ --#{root-defaults.$prefix}-theme-active--#{$color}--#{$shade}: #{$value};
22
28
  }
23
29
  }
24
30
 
@@ -29,7 +35,7 @@
29
35
  .light-mode {
30
36
  @each $color, $map in $theme-light {
31
37
  @each $shade, $value in $map {
32
- --#{defaults.$prefix}-theme-active--#{$color}--#{$shade}: #{$value};
38
+ --#{root-defaults.$prefix}-theme-active--#{$color}--#{$shade}: #{$value};
33
39
  }
34
40
  }
35
41