@graupl/graupl 1.0.0-alpha.5 → 1.0.0-alpha.7
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/CHANGELOG.md +56 -0
- package/dist/base/form.css +2 -0
- package/dist/base/form.css.map +1 -0
- package/dist/base/link.css.map +1 -0
- package/dist/base/table.css +2 -0
- package/dist/base/table.css.map +1 -0
- package/dist/base.css +2 -0
- package/dist/base.css.map +1 -0
- package/dist/component/button.css +2 -0
- package/dist/component/button.css.map +1 -0
- package/dist/component/input-group.css +2 -0
- package/dist/component/input-group.css.map +1 -0
- package/dist/component/table.css +2 -0
- package/dist/component/table.css.map +1 -0
- package/dist/component.css +2 -0
- package/dist/component.css.map +1 -0
- package/dist/graupl.css +1 -1
- package/dist/graupl.css.map +1 -1
- package/dist/layout/columns.css +2 -0
- package/dist/layout/columns.css.map +1 -0
- package/dist/layout/container.css +2 -0
- package/dist/layout/container.css.map +1 -0
- package/dist/layout.css +2 -0
- package/dist/layout.css.map +1 -0
- package/dist/state/focus.css.map +1 -0
- package/dist/state.css +2 -0
- package/dist/state.css.map +1 -0
- package/dist/theme/color.css +2 -0
- package/dist/theme/color.css.map +1 -0
- package/dist/theme/typography.css +2 -0
- package/dist/theme/typography.css.map +1 -0
- package/dist/theme.css +2 -0
- package/dist/theme.css.map +1 -0
- package/dist/utilities/colors.css.map +1 -0
- package/dist/utilities/spacing.css +2 -0
- package/dist/utilities/spacing.css.map +1 -0
- package/dist/utilities/typography.css +2 -0
- package/dist/utilities/typography.css.map +1 -0
- package/dist/utilities.css +2 -0
- package/dist/utilities.css.map +1 -0
- package/docs/.vitepress/theme/custom.scss +1 -1
- package/index.html +327 -75
- package/package.json +34 -18
- package/scss/base/form.scss +3 -0
- package/scss/base/link.scss +3 -0
- package/scss/base/table.scss +3 -0
- package/scss/base.scss +3 -0
- package/scss/component/button.scss +3 -0
- package/scss/component/input-group.scss +3 -0
- package/scss/component/table.scss +3 -0
- package/scss/component.scss +3 -0
- package/scss/graupl.scss +1 -1
- package/scss/layout/columns.scss +3 -0
- package/scss/layout/container.scss +3 -0
- package/scss/layout.scss +3 -0
- package/scss/state/focus.scss +3 -0
- package/scss/state.scss +3 -0
- package/scss/theme/color.scss +3 -0
- package/scss/theme/typography.scss +3 -0
- package/scss/theme.scss +3 -0
- package/scss/utilities/colors.scss +3 -0
- package/scss/utilities/spacing.scss +3 -0
- package/scss/utilities/typography.scss +3 -0
- package/scss/utilities.scss +3 -0
- package/{scss → src/scss}/_defaults.scss +35 -9
- package/{scss → src/scss}/_variables.scss +10 -20
- package/{scss → src/scss}/base/_index.scss +1 -0
- package/{scss → src/scss}/base/form/_variables.scss +5 -4
- package/src/scss/base/table/_defaults.scss +8 -0
- package/src/scss/base/table/_index.scss +27 -0
- package/src/scss/base/table/_variables.scss +65 -0
- package/{scss → src/scss}/component/_index.scss +2 -0
- package/{scss → src/scss}/component/button/_index.scss +6 -2
- package/{scss → src/scss}/component/button/_variables.scss +4 -3
- package/src/scss/component/input-group/_defaults.scss +23 -0
- package/src/scss/component/input-group/_index.scss +45 -0
- package/src/scss/component/input-group/_variables.scss +63 -0
- package/src/scss/component/table/_index.scss +106 -0
- package/src/scss/component/table/_variables.scss +64 -0
- package/src/scss/functions/_theme.scss +18 -0
- package/{scss → src/scss}/layout/columns/_defaults.scss +1 -2
- package/{scss → src/scss}/layout/columns/_index.scss +4 -6
- package/src/scss/layout/columns/_variables.scss +47 -0
- package/src/scss/layout/container/_index.scss +36 -0
- package/{scss → src/scss}/layout/container/_variables.scss +18 -1
- package/src/scss/mixins/_media-queries.scss +43 -0
- package/src/scss/theme/_index.scss +4 -0
- package/{scss/theme → src/scss/theme/color}/_defaults.scss +0 -13
- package/{scss/theme → src/scss/theme/color}/_index.scss +6 -8
- package/{scss/theme → src/scss/theme/color}/_variables.scss +5 -15
- package/src/scss/theme/typography/_defaults.scss +52 -0
- package/src/scss/theme/typography/_index.scss +111 -0
- package/src/scss/theme/typography/_variables.scss +227 -0
- package/src/scss/utilities/_index.scss +5 -0
- package/src/scss/utilities/colors/_defaults.scss +5 -0
- package/{scss → src/scss}/utilities/colors/_index.scss +2 -2
- package/src/scss/utilities/spacing/_defaults.scss +44 -0
- package/src/scss/utilities/spacing/_index.scss +64 -0
- package/src/scss/utilities/spacing/_variables.scss +3 -0
- package/src/scss/utilities/typography/_defaults.scss +5 -0
- package/src/scss/utilities/typography/_index.scss +92 -0
- package/src/scss/utilities/typography/_variables.scss +3 -0
- package/stylelint.config.js +2 -0
- package/dist/base/form/form.css +0 -2
- package/dist/base/form/form.css.map +0 -1
- package/dist/base/link/link.css.map +0 -1
- package/dist/component/button/button.css +0 -2
- package/dist/component/button/button.css.map +0 -1
- package/dist/layout/columns/columns.css +0 -2
- package/dist/layout/columns/columns.css.map +0 -1
- package/dist/layout/container/container.css +0 -2
- package/dist/layout/container/container.css.map +0 -1
- package/dist/state/focus/focus.css.map +0 -1
- package/dist/theme/theme.css +0 -2
- package/dist/theme/theme.css.map +0 -1
- package/dist/utilities/colors/colors.css.map +0 -1
- package/scss/base/form/form.scss +0 -3
- package/scss/base/link/link.scss +0 -3
- package/scss/component/button/button.scss +0 -3
- package/scss/functions/_theme.scss +0 -11
- package/scss/layout/columns/_variables.scss +0 -33
- package/scss/layout/columns/columns.scss +0 -3
- package/scss/layout/container/_index.scss +0 -54
- package/scss/layout/container/container.scss +0 -3
- package/scss/mixins/_media-queries.scss +0 -15
- package/scss/state/focus/focus.scss +0 -3
- package/scss/theme/theme.scss +0 -3
- package/scss/utilities/_index.scss +0 -3
- package/scss/utilities/colors/colors.scss +0 -3
- /package/dist/base/{link/link.css → link.css} +0 -0
- /package/dist/state/{focus/focus.css → focus.css} +0 -0
- /package/dist/utilities/{colors/colors.css → colors.css} +0 -0
- /package/{scss → src/scss}/_index.scss +0 -0
- /package/{scss → src/scss}/_init.scss +0 -0
- /package/{scss → src/scss}/base/form/_defaults.scss +0 -0
- /package/{scss → src/scss}/base/form/_index.scss +0 -0
- /package/{scss → src/scss}/base/link/_defaults.scss +0 -0
- /package/{scss → src/scss}/base/link/_index.scss +0 -0
- /package/{scss → src/scss}/base/link/_variables.scss +0 -0
- /package/{scss → src/scss}/component/button/_defaults.scss +0 -0
- /package/{scss/utilities/colors → src/scss/component/table}/_defaults.scss +0 -0
- /package/{scss → src/scss}/functions/_important.scss +0 -0
- /package/{scss → src/scss}/layout/_index.scss +0 -0
- /package/{scss → src/scss}/layout/container/_defaults.scss +0 -0
- /package/{scss → src/scss}/mixins/_layer.scss +0 -0
- /package/{scss → src/scss}/state/_index.scss +0 -0
- /package/{scss → src/scss}/state/focus/_defaults.scss +0 -0
- /package/{scss → src/scss}/state/focus/_index.scss +0 -0
- /package/{scss → src/scss}/state/focus/_variables.scss +0 -0
- /package/{scss → src/scss}/utilities/colors/_variables.scss +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Variables referencing custom properties.
|
|
2
|
+
|
|
3
|
+
@use "defaults";
|
|
4
|
+
@use "../../variables" as root-variables;
|
|
5
|
+
@use "../../defaults" as root-defaults;
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
|
|
8
|
+
$columns-row-gap: var(
|
|
9
|
+
--#{root-defaults.$prefix}-columns-row-gap,
|
|
10
|
+
#{map.get(root-variables.$spacers, 5)}
|
|
11
|
+
);
|
|
12
|
+
$columns-column-gap: var(
|
|
13
|
+
--#{root-defaults.$prefix}-columns-column-gap,
|
|
14
|
+
#{map.get(root-variables.$spacers, 5)}
|
|
15
|
+
);
|
|
16
|
+
$columns-count: var(
|
|
17
|
+
--#{root-defaults.$prefix}-columns-count,
|
|
18
|
+
#{defaults.$columns-count}
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
// Calculate the min-width of each column based on the content-max-width and column-gap.
|
|
22
|
+
// We take the maximum width of the page and subtract the gap width multiplied by the number of
|
|
23
|
+
// columns minus one (to account for the gaps between columns).
|
|
24
|
+
// We then divide this by the number of columns to get the min-width of each column.
|
|
25
|
+
/* stylelint-disable scss/operator-no-newline-after -- Prettier wants to format it this way. */
|
|
26
|
+
$columns-min-width: var(
|
|
27
|
+
--#{root-defaults.$prefix}-columns-min-width,
|
|
28
|
+
calc(
|
|
29
|
+
(
|
|
30
|
+
#{root-variables.$content-max-width} - #{$columns-column-gap} *
|
|
31
|
+
(#{$columns-count} - 1)
|
|
32
|
+
) / #{$columns-count}
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
/* stylelint-enable scss/operator-no-newline-after */
|
|
36
|
+
$columns-max-width: var(
|
|
37
|
+
--#{root-defaults.$prefix}-columns-max-width,
|
|
38
|
+
#{defaults.$columns-max-width}
|
|
39
|
+
);
|
|
40
|
+
$columns-grid-template-columns: var(
|
|
41
|
+
--#{root-defaults.$prefix}-columns-grid-template-columns,
|
|
42
|
+
repeat(auto-fit, minmax(#{$columns-min-width}, #{$columns-max-width}))
|
|
43
|
+
);
|
|
44
|
+
$columns-span: var(
|
|
45
|
+
--#{root-defaults.$prefix}-columns-span,
|
|
46
|
+
#{defaults.$columns-span}
|
|
47
|
+
);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Graupl Container layout.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "../../mixins/layer" as *;
|
|
5
|
+
|
|
6
|
+
@include layer(layout) {
|
|
7
|
+
.container,
|
|
8
|
+
.container > .full-width {
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns:
|
|
11
|
+
[full-width-start] $container-full-width-section-width
|
|
12
|
+
[feature-start] $container-feature-section-width
|
|
13
|
+
[breakout-start] $container-breakout-section-width
|
|
14
|
+
[content-start] $container-content-section-width
|
|
15
|
+
[content-end]
|
|
16
|
+
$container-breakout-section-width [breakout-end]
|
|
17
|
+
$container-feature-section-width [feature-end]
|
|
18
|
+
$container-full-width-section-width [full-width-end];
|
|
19
|
+
|
|
20
|
+
> :not(.breakout, .full-width, .feature) {
|
|
21
|
+
grid-column: content;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.breakout {
|
|
25
|
+
grid-column: breakout;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.feature {
|
|
29
|
+
grid-column: feature;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.full-width {
|
|
33
|
+
grid-column: full-width;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
@use "defaults";
|
|
4
4
|
@use "../../variables" as root-variables;
|
|
5
5
|
@use "../../defaults" as root-defaults;
|
|
6
|
+
@use "sass:map";
|
|
6
7
|
|
|
7
8
|
$container-gap: var(
|
|
8
9
|
--#{root-defaults.$prefix}-container-gap,
|
|
9
|
-
#{root-variables.$
|
|
10
|
+
#{map.get(root-variables.$spacers, 5)}
|
|
10
11
|
);
|
|
11
12
|
$container-content-max-width: var(
|
|
12
13
|
--#{root-defaults.$prefix}-container-content-max-width,
|
|
@@ -28,3 +29,19 @@ $container-feature-width: var(
|
|
|
28
29
|
--#{root-defaults.$prefix}-container-feature-width,
|
|
29
30
|
calc((#{$container-feature-max-width} - #{$container-breakout-max-width}) / 2)
|
|
30
31
|
);
|
|
32
|
+
$container-content-section-width: var(
|
|
33
|
+
--#{root-defaults.$prefix}-container-content-section-width,
|
|
34
|
+
min(#{$container-content-max-width}, calc(100% - #{$container-gap} * 2))
|
|
35
|
+
);
|
|
36
|
+
$container-full-width-section-width: var(
|
|
37
|
+
--#{root-defaults.$prefix}-container-full-width-section-width,
|
|
38
|
+
minmax(#{$container-gap}, 1fr)
|
|
39
|
+
);
|
|
40
|
+
$container-breakout-section-width: var(
|
|
41
|
+
--#{root-defaults.$prefix}-container-breakout-section-width,
|
|
42
|
+
minmax(0, #{$container-breakout-width})
|
|
43
|
+
);
|
|
44
|
+
$container-feature-section-width: var(
|
|
45
|
+
--#{root-defaults.$prefix}-container-feature-section-width,
|
|
46
|
+
minmax(0, #{$container-feature-width})
|
|
47
|
+
);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Media query mixins.
|
|
2
|
+
|
|
3
|
+
@use "../defaults" as root-defaults;
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
|
|
6
|
+
// A media query for targetting users who have not requested reduced motion.
|
|
7
|
+
@mixin animation-on {
|
|
8
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
9
|
+
@content;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// A media query for targetting users who have requested reduced motion.
|
|
14
|
+
@mixin animation-off {
|
|
15
|
+
@media (prefers-reduced-motion: reduce) {
|
|
16
|
+
@content;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin screen($size) {
|
|
21
|
+
$screen-size: map.get(root-defaults.$screen-sizes, $size);
|
|
22
|
+
|
|
23
|
+
@media screen and (min-width: $screen-size) {
|
|
24
|
+
@content;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin screen-under($size) {
|
|
29
|
+
$screen-size: map.get(root-defaults.$screen-sizes, $size);
|
|
30
|
+
|
|
31
|
+
@media screen and (max-width: #{$screen-size - 1}) {
|
|
32
|
+
@content;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@mixin screen-between($min-size, $max-size) {
|
|
37
|
+
$min-screen-size: map.get(root-defaults.$screen-sizes, $min-size);
|
|
38
|
+
$max-screen-size: map.get(root-defaults.$screen-sizes, $max-size);
|
|
39
|
+
|
|
40
|
+
@media screen and (min-width: $min-screen-size) and (max-width: #{$max-screen-size - 1}) {
|
|
41
|
+
@content;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -57,16 +57,3 @@ $dark-map: (
|
|
|
57
57
|
800: 200,
|
|
58
58
|
900: 100,
|
|
59
59
|
) !default;
|
|
60
|
-
|
|
61
|
-
// Font properties.
|
|
62
|
-
/* stylelint-disable-next-line scss/dollar-variable-colon-space-after */
|
|
63
|
-
$global-font-family:
|
|
64
|
-
system-ui,
|
|
65
|
-
-apple-system,
|
|
66
|
-
blinkmacsystemfont,
|
|
67
|
-
"Segoe UI",
|
|
68
|
-
roboto,
|
|
69
|
-
"Helvetica Neue",
|
|
70
|
-
arial,
|
|
71
|
-
sans-serif !default;
|
|
72
|
-
$global-font-size: clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem);
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Color theme styles.
|
|
2
2
|
|
|
3
3
|
@use "variables" as *;
|
|
4
|
-
@use "
|
|
5
|
-
@use "
|
|
4
|
+
@use "../../mixins/layer" as *;
|
|
5
|
+
@use "../../defaults" as root-defaults;
|
|
6
6
|
@use "sass:map";
|
|
7
|
-
@use "
|
|
7
|
+
@use "../../functions/theme";
|
|
8
8
|
|
|
9
9
|
@include layer(theme) {
|
|
10
10
|
:root {
|
|
11
|
-
background: $
|
|
12
|
-
color: $
|
|
13
|
-
font-family: $global-font-family;
|
|
14
|
-
font-size: $global-font-size;
|
|
11
|
+
background: $root-background;
|
|
12
|
+
color: $root-font-color;
|
|
15
13
|
|
|
16
14
|
@each $color, $map in $theme-light {
|
|
17
15
|
@each $shade, $value in $map {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Variables referencing custom properties.
|
|
2
2
|
|
|
3
3
|
@use "defaults";
|
|
4
|
-
@use "
|
|
4
|
+
@use "../../defaults" as root-defaults;
|
|
5
5
|
@use "sass:map";
|
|
6
6
|
|
|
7
7
|
// A colour map of base colours and their shades.
|
|
@@ -110,22 +110,12 @@ $theme-active: ();
|
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
// Font properties.
|
|
114
|
-
$global-font-family: var(
|
|
115
|
-
--#{root-defaults.$prefix}-global-font-family,
|
|
116
|
-
#{defaults.$global-font-family}
|
|
117
|
-
);
|
|
118
|
-
$global-font-size: var(
|
|
119
|
-
--#{root-defaults.$prefix}-global-font-size,
|
|
120
|
-
#{defaults.$global-font-size}
|
|
121
|
-
);
|
|
122
|
-
|
|
123
113
|
// Colour properties.
|
|
124
|
-
$
|
|
125
|
-
--#{root-defaults.$prefix}-
|
|
114
|
+
$root-font-color: var(
|
|
115
|
+
--#{root-defaults.$prefix}-root-font-color,
|
|
126
116
|
#{map.get(map.get($theme-active, primary), 900)}
|
|
127
117
|
);
|
|
128
|
-
$
|
|
129
|
-
--#{root-defaults.$prefix}-
|
|
118
|
+
$root-background: var(
|
|
119
|
+
--#{root-defaults.$prefix}-root-background,
|
|
130
120
|
#{map.get(map.get($theme-active, primary), 100)}
|
|
131
121
|
);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Default values for Graupl.
|
|
2
|
+
//
|
|
3
|
+
// Generally, these should not be used directly when styling components.
|
|
4
|
+
// They are mainly used to provide default fallbacks for custom properties
|
|
5
|
+
// which can be found in the `variables.scss` file.
|
|
6
|
+
|
|
7
|
+
@use "sass:map";
|
|
8
|
+
|
|
9
|
+
// font properties.
|
|
10
|
+
$font-size: 1rem !default;
|
|
11
|
+
$root-font-size: clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem) !default;
|
|
12
|
+
$line-height: 1.2em !default;
|
|
13
|
+
|
|
14
|
+
// Multipliers for font sizes.
|
|
15
|
+
// This uses a minor third scale.
|
|
16
|
+
// 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
|
|
17
|
+
$base-font-size-multipliers: (
|
|
18
|
+
xs: 0.694,
|
|
19
|
+
sm: 0.833,
|
|
20
|
+
base: 1,
|
|
21
|
+
lg: 1.2,
|
|
22
|
+
xl: 1.44,
|
|
23
|
+
2xl: 1.728,
|
|
24
|
+
3xl: 2.074,
|
|
25
|
+
4xl: 2.488,
|
|
26
|
+
5xl: 2.986,
|
|
27
|
+
) !default;
|
|
28
|
+
$custom-font-size-multipliers: () !default;
|
|
29
|
+
$font-size-multipliers: map.merge(
|
|
30
|
+
$base-font-size-multipliers,
|
|
31
|
+
$custom-font-size-multipliers
|
|
32
|
+
) !default;
|
|
33
|
+
|
|
34
|
+
// Weights.
|
|
35
|
+
$base-font-weights: (
|
|
36
|
+
light: 300,
|
|
37
|
+
normal: 400,
|
|
38
|
+
bold: 700,
|
|
39
|
+
) !default;
|
|
40
|
+
$custom-font-weights: () !default;
|
|
41
|
+
$font-weights: map.merge($base-font-weights, $custom-font-weights) !default;
|
|
42
|
+
|
|
43
|
+
/* stylelint-disable-next-line scss/dollar-variable-colon-space-after */
|
|
44
|
+
$root-font-family:
|
|
45
|
+
system-ui,
|
|
46
|
+
-apple-system,
|
|
47
|
+
blinkmacsystemfont,
|
|
48
|
+
"Segoe UI",
|
|
49
|
+
roboto,
|
|
50
|
+
"Helvetica Neue",
|
|
51
|
+
arial,
|
|
52
|
+
sans-serif !default;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// Typography theme styles.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "../../mixins/layer" as *;
|
|
5
|
+
@use "sass:map";
|
|
6
|
+
|
|
7
|
+
@include layer(base) {
|
|
8
|
+
p {
|
|
9
|
+
margin: $paragraph-margin;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
small {
|
|
13
|
+
margin: $small-margin;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
h1 {
|
|
17
|
+
margin: $h1-margin;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
h2 {
|
|
21
|
+
margin: $h2-margin;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
h3 {
|
|
25
|
+
margin: $h3-margin;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
h4 {
|
|
29
|
+
margin: $h4-margin;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
h5 {
|
|
33
|
+
margin: $h5-margin;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
h6 {
|
|
37
|
+
margin: $h6-margin;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@include layer(theme) {
|
|
42
|
+
:root {
|
|
43
|
+
font-family: $root-font-family;
|
|
44
|
+
font-size: $root-font-size;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
b,
|
|
48
|
+
strong {
|
|
49
|
+
font-weight: $font-weight-bold;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
body {
|
|
53
|
+
font-size: $body-font-size;
|
|
54
|
+
font-weight: $body-font-weight;
|
|
55
|
+
line-height: $body-line-height;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
p {
|
|
59
|
+
font-size: $paragraph-font-size;
|
|
60
|
+
font-weight: $paragraph-font-weight;
|
|
61
|
+
line-height: $paragraph-line-height;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
small {
|
|
65
|
+
font-size: $small-font-size;
|
|
66
|
+
font-weight: $small-font-weight;
|
|
67
|
+
line-height: $small-line-height;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
h1 {
|
|
71
|
+
font-family: $h1-font-family;
|
|
72
|
+
font-size: $h1-font-size;
|
|
73
|
+
font-weight: $h1-font-weight;
|
|
74
|
+
line-height: $h1-line-height;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
h2 {
|
|
78
|
+
font-family: $h2-font-family;
|
|
79
|
+
font-size: $h2-font-size;
|
|
80
|
+
font-weight: $h2-font-weight;
|
|
81
|
+
line-height: $h2-line-height;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
h3 {
|
|
85
|
+
font-family: $h3-font-family;
|
|
86
|
+
font-size: $h3-font-size;
|
|
87
|
+
font-weight: $h3-font-weight;
|
|
88
|
+
line-height: $h3-line-height;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
h4 {
|
|
92
|
+
font-family: $h4-font-family;
|
|
93
|
+
font-size: $h4-font-size;
|
|
94
|
+
font-weight: $h4-font-weight;
|
|
95
|
+
line-height: $h4-line-height;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
h5 {
|
|
99
|
+
font-family: $h5-font-family;
|
|
100
|
+
font-size: $h5-font-size;
|
|
101
|
+
font-weight: $h5-font-weight;
|
|
102
|
+
line-height: $h5-line-height;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
h6 {
|
|
106
|
+
font-family: $h6-font-family;
|
|
107
|
+
font-size: $h6-font-size;
|
|
108
|
+
font-weight: $h6-font-weight;
|
|
109
|
+
line-height: $h6-line-height;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
// Variables referencing custom properties.
|
|
2
|
+
|
|
3
|
+
@use "defaults";
|
|
4
|
+
@use "../../defaults" as root-defaults;
|
|
5
|
+
@use "../../variables" as root-variables;
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
|
|
8
|
+
// Font properties.
|
|
9
|
+
$font-size: var(--#{root-defaults.$prefix}-font-base, #{defaults.$font-size});
|
|
10
|
+
$line-height: var(
|
|
11
|
+
--#{root-defaults.$prefix}-line-height,
|
|
12
|
+
#{defaults.$line-height}
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
// Generate all of the font-size-x custom properties.
|
|
16
|
+
$font-sizes: ();
|
|
17
|
+
|
|
18
|
+
@each $key, $value in defaults.$font-size-multipliers {
|
|
19
|
+
$size: var(
|
|
20
|
+
--#{root-defaults.$prefix}-font-#{$key},
|
|
21
|
+
calc(#{$value} * #{$font-size})
|
|
22
|
+
);
|
|
23
|
+
$font-sizes: map.set($font-sizes, $key, $size);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
$font-weights: ();
|
|
27
|
+
|
|
28
|
+
@each $key, $value in defaults.$font-weights {
|
|
29
|
+
$weight: var(--#{root-defaults.$prefix}-font-weight-#{$key}, $value);
|
|
30
|
+
$font-weights: map.set($font-weights, $key, $weight);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
$font-weight-bold: var(
|
|
34
|
+
--#{root-defaults.$prefix}-font-weight-bold,
|
|
35
|
+
#{map.get($font-weights, bold)}
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// Root properties.
|
|
39
|
+
$root-font-family: var(
|
|
40
|
+
--#{root-defaults.$prefix}-root-font-family,
|
|
41
|
+
#{defaults.$root-font-family}
|
|
42
|
+
);
|
|
43
|
+
$root-font-size: var(
|
|
44
|
+
--#{root-defaults.$prefix}-root-font-size,
|
|
45
|
+
#{defaults.$root-font-size}
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
// Typography properties.
|
|
49
|
+
$body-font-size: var(
|
|
50
|
+
--#{root-defaults.$prefix}-body-font-size,
|
|
51
|
+
#{map.get($font-sizes, base)}
|
|
52
|
+
);
|
|
53
|
+
$body-line-height: var(
|
|
54
|
+
--#{root-defaults.$prefix}-body-line-height,
|
|
55
|
+
#{$line-height}
|
|
56
|
+
);
|
|
57
|
+
$body-font-weight: var(
|
|
58
|
+
--#{root-defaults.$prefix}-body-font-weight,
|
|
59
|
+
#{map.get($font-weights, normal)}
|
|
60
|
+
);
|
|
61
|
+
$paragraph-font-size: var(
|
|
62
|
+
--#{root-defaults.$prefix}-paragraph-font-size,
|
|
63
|
+
#{$body-font-size}
|
|
64
|
+
);
|
|
65
|
+
$paragraph-line-height: var(
|
|
66
|
+
--#{root-defaults.$prefix}-paragraph-line-height,
|
|
67
|
+
#{$body-line-height}
|
|
68
|
+
);
|
|
69
|
+
$paragraph-margin: var(
|
|
70
|
+
--#{root-defaults.$prefix}-paragraph-margin,
|
|
71
|
+
0 0 #{map.get(root-variables.$spacers, 2)} 0
|
|
72
|
+
);
|
|
73
|
+
$paragraph-font-weight: var(
|
|
74
|
+
--#{root-defaults.$prefix}-paragraph-font-weight,
|
|
75
|
+
#{$body-font-weight}
|
|
76
|
+
);
|
|
77
|
+
$small-font-size: var(
|
|
78
|
+
--#{root-defaults.$prefix}-small-font-size,
|
|
79
|
+
#{map.get($font-sizes, sm)}
|
|
80
|
+
);
|
|
81
|
+
$small-line-height: var(
|
|
82
|
+
--#{root-defaults.$prefix}-small-line-height,
|
|
83
|
+
#{$line-height}
|
|
84
|
+
);
|
|
85
|
+
$small-margin: var(
|
|
86
|
+
--#{root-defaults.$prefix}-small-margin,
|
|
87
|
+
0 0 #{map.get(root-variables.$spacers, 2)} 0
|
|
88
|
+
);
|
|
89
|
+
$small-font-weight: var(
|
|
90
|
+
--#{root-defaults.$prefix}-small-font-weight,
|
|
91
|
+
#{$body-font-weight}
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
// Headings properties.
|
|
95
|
+
$heading-font-family: var(
|
|
96
|
+
--#{root-defaults.$prefix}-heading-font-family,
|
|
97
|
+
$root-font-family
|
|
98
|
+
);
|
|
99
|
+
$heading-line-height: var(
|
|
100
|
+
--#{root-defaults.$prefix}-heading-line-height,
|
|
101
|
+
#{$line-height}
|
|
102
|
+
);
|
|
103
|
+
$heading-margin: var(
|
|
104
|
+
--#{root-defaults.$prefix}-heading-margin,
|
|
105
|
+
#{map.get(root-variables.$spacers, 5)} 0 #{map.get(
|
|
106
|
+
root-variables.$spacers,
|
|
107
|
+
2
|
|
108
|
+
)} 0
|
|
109
|
+
);
|
|
110
|
+
$heading-font-weight: var(
|
|
111
|
+
--#{root-defaults.$prefix}-heading-font-weight,
|
|
112
|
+
#{$font-weight-bold}
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
// H1 properties.
|
|
116
|
+
$h1-font-size: var(
|
|
117
|
+
--#{root-defaults.$prefix}-h1-font-size,
|
|
118
|
+
#{map.get($font-sizes, 5xl)}
|
|
119
|
+
);
|
|
120
|
+
$h1-line-height: var(
|
|
121
|
+
--#{root-defaults.$prefix}-h1-line-height,
|
|
122
|
+
#{$heading-line-height}
|
|
123
|
+
);
|
|
124
|
+
$h1-margin: var(--#{root-defaults.$prefix}-h1-margin, #{$heading-margin});
|
|
125
|
+
$h1-font-family: var(
|
|
126
|
+
--#{root-defaults.$prefix}-h1-font-family,
|
|
127
|
+
$heading-font-family
|
|
128
|
+
);
|
|
129
|
+
$h1-font-weight: var(
|
|
130
|
+
--#{root-defaults.$prefix}-h1-font-weight,
|
|
131
|
+
$heading-font-weight
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
// H2 properties.
|
|
135
|
+
$h2-font-size: var(
|
|
136
|
+
--#{root-defaults.$prefix}-h2-font-size,
|
|
137
|
+
#{map.get($font-sizes, 4xl)}
|
|
138
|
+
);
|
|
139
|
+
$h2-line-height: var(
|
|
140
|
+
--#{root-defaults.$prefix}-h2-line-height,
|
|
141
|
+
#{$heading-line-height}
|
|
142
|
+
);
|
|
143
|
+
$h2-margin: var(--#{root-defaults.$prefix}-h2-margin, #{$heading-margin});
|
|
144
|
+
$h2-font-family: var(
|
|
145
|
+
--#{root-defaults.$prefix}-h2-font-family,
|
|
146
|
+
$heading-font-family
|
|
147
|
+
);
|
|
148
|
+
$h2-font-weight: var(
|
|
149
|
+
--#{root-defaults.$prefix}-h2-font-weight,
|
|
150
|
+
$heading-font-weight
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
// H3 properties.
|
|
154
|
+
$h3-font-size: var(
|
|
155
|
+
--#{root-defaults.$prefix}-h3-font-size,
|
|
156
|
+
#{map.get($font-sizes, 3xl)}
|
|
157
|
+
);
|
|
158
|
+
$h3-line-height: var(
|
|
159
|
+
--#{root-defaults.$prefix}-h3-line-height,
|
|
160
|
+
#{$heading-line-height}
|
|
161
|
+
);
|
|
162
|
+
$h3-margin: var(--#{root-defaults.$prefix}-h3-margin, #{$heading-margin});
|
|
163
|
+
$h3-font-family: var(
|
|
164
|
+
--#{root-defaults.$prefix}-h3-font-family,
|
|
165
|
+
$heading-font-family
|
|
166
|
+
);
|
|
167
|
+
$h3-font-weight: var(
|
|
168
|
+
--#{root-defaults.$prefix}-h3-font-weight,
|
|
169
|
+
$heading-font-weight
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
// H4 properties.
|
|
173
|
+
$h4-font-size: var(
|
|
174
|
+
--#{root-defaults.$prefix}-h4-font-size,
|
|
175
|
+
#{map.get($font-sizes, 2xl)}
|
|
176
|
+
);
|
|
177
|
+
$h4-line-height: var(
|
|
178
|
+
--#{root-defaults.$prefix}-h4-line-height,
|
|
179
|
+
#{$heading-line-height}
|
|
180
|
+
);
|
|
181
|
+
$h4-margin: var(--#{root-defaults.$prefix}-h4-margin, #{$heading-margin});
|
|
182
|
+
$h4-font-family: var(
|
|
183
|
+
--#{root-defaults.$prefix}-h4-font-family,
|
|
184
|
+
$heading-font-family
|
|
185
|
+
);
|
|
186
|
+
$h4-font-weight: var(
|
|
187
|
+
--#{root-defaults.$prefix}-h4-font-weight,
|
|
188
|
+
$heading-font-weight
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
// H5 properties.
|
|
192
|
+
$h5-font-size: var(
|
|
193
|
+
--#{root-defaults.$prefix}-h5-font-size,
|
|
194
|
+
#{map.get($font-sizes, xl)}
|
|
195
|
+
);
|
|
196
|
+
$h5-line-height: var(
|
|
197
|
+
--#{root-defaults.$prefix}-h5-line-height,
|
|
198
|
+
#{$heading-line-height}
|
|
199
|
+
);
|
|
200
|
+
$h5-margin: var(--#{root-defaults.$prefix}-h5-margin, #{$heading-margin});
|
|
201
|
+
$h5-font-family: var(
|
|
202
|
+
--#{root-defaults.$prefix}-h5-font-family,
|
|
203
|
+
$heading-font-family
|
|
204
|
+
);
|
|
205
|
+
$h5-font-weight: var(
|
|
206
|
+
--#{root-defaults.$prefix}-h5-font-weight,
|
|
207
|
+
$heading-font-weight
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
// H6 properties.
|
|
211
|
+
$h6-font-size: var(
|
|
212
|
+
--#{root-defaults.$prefix}-h6-font-size,
|
|
213
|
+
#{map.get($font-sizes, lg)}
|
|
214
|
+
);
|
|
215
|
+
$h6-line-height: var(
|
|
216
|
+
--#{root-defaults.$prefix}-h6-line-height,
|
|
217
|
+
#{$heading-line-height}
|
|
218
|
+
);
|
|
219
|
+
$h6-margin: var(--#{root-defaults.$prefix}-h6-margin, #{$heading-margin});
|
|
220
|
+
$h6-font-family: var(
|
|
221
|
+
--#{root-defaults.$prefix}-h6-font-family,
|
|
222
|
+
$heading-font-family
|
|
223
|
+
);
|
|
224
|
+
$h6-font-weight: var(
|
|
225
|
+
--#{root-defaults.$prefix}-h6-font-weight,
|
|
226
|
+
$heading-font-weight
|
|
227
|
+
);
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
@use "variables" as *;
|
|
4
4
|
@use "../../mixins/layer" as *;
|
|
5
5
|
@use "../../functions/important";
|
|
6
|
-
@use "../../theme/variables" as
|
|
6
|
+
@use "../../theme/color/variables" as color;
|
|
7
7
|
|
|
8
8
|
@include layer(utilities) {
|
|
9
|
-
@each $color, $map in
|
|
9
|
+
@each $color, $map in color.$theme-active {
|
|
10
10
|
@each $shade, $value in $map {
|
|
11
11
|
$name: #{$color}-#{$shade};
|
|
12
12
|
|