@graupl/graupl 1.0.0-alpha.0
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/.browserslistrc +3 -0
- package/.czrc +3 -0
- package/.editorconfig +13 -0
- package/.github/CODE_OF_CONDUCT.md +73 -0
- package/.github/COMMIT_CONVENTION.md +17 -0
- package/.github/CONTRIBUTING.md +86 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
- package/.github/ISSUE_TEMPLATE/documentation.md +20 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/.github/SECURITY.md +26 -0
- package/.github/dependabot.yml +17 -0
- package/.github/pull_request_template.md +5 -0
- package/.github/workflows/codeql-analysis.yml +71 -0
- package/.github/workflows/docs.yml +59 -0
- package/.github/workflows/test.yml +27 -0
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +5 -0
- package/.prettierignore +12 -0
- package/.stylelintignore +0 -0
- package/.versionrc.cjs +61 -0
- package/CHANGELOG.md +43 -0
- package/README.md +3 -0
- package/commitlint.config.js +5 -0
- package/dist/base/link/link.css +26 -0
- package/dist/base/link/link.css.map +1 -0
- package/dist/component/button/button.css +55 -0
- package/dist/component/button/button.css.map +1 -0
- package/dist/graupl.css +171 -0
- package/dist/graupl.css.map +1 -0
- package/dist/layout/columns/columns.css +26 -0
- package/dist/layout/columns/columns.css.map +1 -0
- package/dist/layout/container/container.css +38 -0
- package/dist/layout/container/container.css.map +1 -0
- package/dist/state/focus/focus.css +10 -0
- package/dist/state/focus/focus.css.map +1 -0
- package/dist/theme/theme.css +26 -0
- package/dist/theme/theme.css.map +1 -0
- package/docs/.vitepress/config.js +11 -0
- package/docs/.vitepress/theme/custom.scss +35 -0
- package/docs/.vitepress/theme/index.js +4 -0
- package/docs/index.md +7 -0
- package/eslint.config.js +73 -0
- package/index.html +29 -0
- package/lint-staged.config.js +6 -0
- package/package.json +61 -0
- package/postcss.config.cjs +12 -0
- package/prettier.config.js +16 -0
- package/scss/_defaults.scss +40 -0
- package/scss/_variables.scss +63 -0
- package/scss/base/_index.scss +3 -0
- package/scss/base/link/_defaults.scss +9 -0
- package/scss/base/link/_index.scss +33 -0
- package/scss/base/link/_variables.scss +31 -0
- package/scss/base/link/link.scss +3 -0
- package/scss/component/_index.scss +3 -0
- package/scss/component/button/_defaults.scss +10 -0
- package/scss/component/button/_index.scss +67 -0
- package/scss/component/button/_variables.scss +102 -0
- package/scss/component/button/button.scss +3 -0
- package/scss/graupl.scss +9 -0
- package/scss/layout/_index.scss +4 -0
- package/scss/layout/columns/_defaults.scss +13 -0
- package/scss/layout/columns/_index.scss +30 -0
- package/scss/layout/columns/_variables.scss +20 -0
- package/scss/layout/columns/columns.scss +3 -0
- package/scss/layout/container/_defaults.scss +10 -0
- package/scss/layout/container/_index.scss +50 -0
- package/scss/layout/container/_variables.scss +26 -0
- package/scss/layout/container/container.scss +3 -0
- package/scss/mixins/_layer.scss +14 -0
- package/scss/mixins/_media-queries.scss +15 -0
- package/scss/state/_index.scss +3 -0
- package/scss/state/focus/_defaults.scss +10 -0
- package/scss/state/focus/_index.scss +13 -0
- package/scss/state/focus/_variables.scss +36 -0
- package/scss/state/focus/focus.scss +3 -0
- package/scss/theme/_defaults.scss +45 -0
- package/scss/theme/_index.scss +35 -0
- package/scss/theme/_variables.scss +177 -0
- package/scss/theme/theme.scss +3 -0
- package/stylelint.config.js +14 -0
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
// Prefix for custom properties and other naming conventions.
|
|
8
|
+
$prefix: "graupl" !default;
|
|
9
|
+
|
|
10
|
+
// Layout properties.
|
|
11
|
+
$content-max-width: 96ch !default;
|
|
12
|
+
|
|
13
|
+
// Spacing properties.
|
|
14
|
+
$gap: 1rem !default;
|
|
15
|
+
|
|
16
|
+
// Size properties.
|
|
17
|
+
$interactive-min-width: 44px !default;
|
|
18
|
+
$interactive-min-height: 44px !default;
|
|
19
|
+
|
|
20
|
+
// Border properties.
|
|
21
|
+
$border-radius: 0.125rem !default;
|
|
22
|
+
$border-width: 2px !default;
|
|
23
|
+
$border-style: solid !default;
|
|
24
|
+
|
|
25
|
+
// Font properties.
|
|
26
|
+
$font-size-base: 1rem !default;
|
|
27
|
+
$font-size: (
|
|
28
|
+
small: $font-size-base * 0.875,
|
|
29
|
+
default: $font-size-base,
|
|
30
|
+
large: $font-size-base * 1.125,
|
|
31
|
+
) !default;
|
|
32
|
+
|
|
33
|
+
// Transition properties.
|
|
34
|
+
$transition-duration-base: 100;
|
|
35
|
+
$transition-duration: (
|
|
36
|
+
fast: #{$transition-duration-base * 1.5}ms,
|
|
37
|
+
default: #{$transition-duration-base * 2.5}ms,
|
|
38
|
+
slow: #{$transition-duration-base * 3}ms,
|
|
39
|
+
) !default;
|
|
40
|
+
$transition-timing-function: ease !default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Variables referencing custom properties.
|
|
2
|
+
|
|
3
|
+
@use "defaults";
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
|
|
6
|
+
// Layout properties.
|
|
7
|
+
$content-max-width: var(
|
|
8
|
+
--#{defaults.$prefix}-content-max-width,
|
|
9
|
+
defaults.$content-max-width
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
// Spacing properties.
|
|
13
|
+
$gap: var(--#{defaults.$prefix}-gap, defaults.$gap);
|
|
14
|
+
|
|
15
|
+
// Border properties.
|
|
16
|
+
$border-radius: var(
|
|
17
|
+
--#{defaults.$prefix}-border-radius,
|
|
18
|
+
defaults.$border-radius
|
|
19
|
+
);
|
|
20
|
+
$border-width: var(--#{defaults.$prefix}-border-width, defaults.$border-width);
|
|
21
|
+
$border-style: var(--#{defaults.$prefix}-border-style, defaults.$border-style);
|
|
22
|
+
|
|
23
|
+
// Font properties.
|
|
24
|
+
$font-size: (
|
|
25
|
+
small:
|
|
26
|
+
var(
|
|
27
|
+
--#{defaults.$prefix}-font-size-small,
|
|
28
|
+
map.get(defaults.$font-size, small)
|
|
29
|
+
),
|
|
30
|
+
default:
|
|
31
|
+
var(
|
|
32
|
+
--#{defaults.$prefix}-font-size-default,
|
|
33
|
+
map.get(defaults.$font-size, default)
|
|
34
|
+
),
|
|
35
|
+
large:
|
|
36
|
+
var(
|
|
37
|
+
--#{defaults.$prefix}-font-size-large,
|
|
38
|
+
map.get(defaults.$font-size, large)
|
|
39
|
+
),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
// Transition properties.
|
|
43
|
+
$transition-duration: (
|
|
44
|
+
fast:
|
|
45
|
+
var(
|
|
46
|
+
--#{defaults.$prefix}-transition-duration-fast,
|
|
47
|
+
map.get(defaults.$transition-duration, fast)
|
|
48
|
+
),
|
|
49
|
+
default:
|
|
50
|
+
var(
|
|
51
|
+
--#{defaults.$prefix}-transition-duration-default,
|
|
52
|
+
map.get(defaults.$transition-duration, default)
|
|
53
|
+
),
|
|
54
|
+
slow:
|
|
55
|
+
var(
|
|
56
|
+
--#{defaults.$prefix}-transition-duration-slow,
|
|
57
|
+
map.get(defaults.$transition-duration, slow)
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
$transition-timing-function: var(
|
|
61
|
+
--#{defaults.$prefix}-transition-timing-function,
|
|
62
|
+
defaults.$transition-timing-function
|
|
63
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
@forward "../../defaults";
|
|
8
|
+
|
|
9
|
+
$link-text-decoration: underline;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Link base styles.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "../../mixins/layer" as *;
|
|
5
|
+
|
|
6
|
+
@include layer(base) {
|
|
7
|
+
a {
|
|
8
|
+
text-decoration: $link-text-decoration;
|
|
9
|
+
text-decoration-thickness: $link-text-decoration-thickness;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@include layer(theme) {
|
|
14
|
+
a {
|
|
15
|
+
color: $link-color;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: $link-hover-color;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:active {
|
|
22
|
+
color: $link-active-color;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:visited {
|
|
26
|
+
color: $link-visited-color;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
color: $link-hover-color;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Variables referencing custom properties.
|
|
2
|
+
|
|
3
|
+
@use "../../variables" as base;
|
|
4
|
+
@use "../../theme/variables" as theme;
|
|
5
|
+
@use "defaults";
|
|
6
|
+
|
|
7
|
+
// Link properties.
|
|
8
|
+
$link-text-decoration: var(
|
|
9
|
+
--#{defaults.$prefix}-link-text-decoration,
|
|
10
|
+
#{defaults.$link-text-decoration}
|
|
11
|
+
);
|
|
12
|
+
$link-text-decoration-thickness: var(
|
|
13
|
+
--#{defaults.$prefix}-link-text-decoration-thickness,
|
|
14
|
+
#{base.$border-width}
|
|
15
|
+
);
|
|
16
|
+
$link-color: var(
|
|
17
|
+
--#{defaults.$prefix}-link-color,
|
|
18
|
+
#{theme.$theme-active--primary}
|
|
19
|
+
);
|
|
20
|
+
$link-hover-color: var(
|
|
21
|
+
--#{defaults.$prefix}-link-hover-color,
|
|
22
|
+
#{theme.$theme-active--secondary}
|
|
23
|
+
);
|
|
24
|
+
$link-active-color: var(
|
|
25
|
+
--#{defaults.$prefix}-link-active-color,
|
|
26
|
+
#{theme.$theme-active--secondary}
|
|
27
|
+
);
|
|
28
|
+
$link-visited-color: var(
|
|
29
|
+
--#{defaults.$prefix}-link-visited-color,
|
|
30
|
+
#{theme.$theme-active--primary}
|
|
31
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
@forward "../../defaults";
|
|
8
|
+
|
|
9
|
+
$button-hover-transform: none !default;
|
|
10
|
+
$button-active-transform: scale(0.95) !default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Graupl Button Component.
|
|
2
|
+
|
|
3
|
+
@use "defaults";
|
|
4
|
+
@use "../../theme/variables" as theme;
|
|
5
|
+
@use "variables" as *;
|
|
6
|
+
@use "../../mixins/layer" as *;
|
|
7
|
+
|
|
8
|
+
@include layer(component) {
|
|
9
|
+
.button {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
min-width: $button-min-width;
|
|
14
|
+
min-height: $button-min-height;
|
|
15
|
+
padding: $button-padding;
|
|
16
|
+
transition: $button-transition;
|
|
17
|
+
border-width: $button-border-width;
|
|
18
|
+
border-style: $button-border-style;
|
|
19
|
+
border-radius: $button-border-radius;
|
|
20
|
+
font-size: $button-font-size;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
transform: $button-hover-transform;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:active {
|
|
28
|
+
transform: $button-active-transform;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@include layer(theme) {
|
|
34
|
+
.button {
|
|
35
|
+
border-color: $button-border-color;
|
|
36
|
+
background: $button-background;
|
|
37
|
+
color: $button-color;
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
border-color: $button-hover-border-color;
|
|
41
|
+
background: $button-hover-background;
|
|
42
|
+
color: $button-hover-color;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:active {
|
|
46
|
+
border-color: $button-active-border-color;
|
|
47
|
+
background: $button-active-background;
|
|
48
|
+
color: $button-active-color;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.primary {
|
|
52
|
+
--#{defaults.$prefix}-button-hover-background: #{theme.$theme-active--primary};
|
|
53
|
+
--#{defaults.$prefix}-button-active-background: #{theme.$theme-active--primary};
|
|
54
|
+
--#{defaults.$prefix}-button-border-color: #{theme.$theme-active--primary};
|
|
55
|
+
--#{defaults.$prefix}-button-hover-border-color: #{theme.$theme-active--primary};
|
|
56
|
+
--#{defaults.$prefix}-button-active-border-color: #{theme.$theme-active--primary};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.secondary {
|
|
60
|
+
--#{defaults.$prefix}-button-hover-background: #{theme.$theme-active--secondary};
|
|
61
|
+
--#{defaults.$prefix}-button-active-background: #{theme.$theme-active--secondary};
|
|
62
|
+
--#{defaults.$prefix}-button-border-color: #{theme.$theme-active--secondary};
|
|
63
|
+
--#{defaults.$prefix}-button-hover-border-color: #{theme.$theme-active--secondary};
|
|
64
|
+
--#{defaults.$prefix}-button-active-border-color: #{theme.$theme-active--secondary};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Variables referencing custom properties.
|
|
2
|
+
|
|
3
|
+
@use "../../variables" as base;
|
|
4
|
+
@use "../../theme/variables" as theme;
|
|
5
|
+
@use "defaults";
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
|
|
8
|
+
// Button properties.
|
|
9
|
+
$button-min-width: var(
|
|
10
|
+
--#{defaults.$prefix}-button-min-width,
|
|
11
|
+
#{defaults.$interactive-min-width}
|
|
12
|
+
);
|
|
13
|
+
$button-min-height: var(
|
|
14
|
+
--#{defaults.$prefix}-button-min-height,
|
|
15
|
+
#{defaults.$interactive-min-height}
|
|
16
|
+
);
|
|
17
|
+
$button-padding-x: var(--#{defaults.$prefix}-button-padding-x, #{base.$gap});
|
|
18
|
+
$button-padding-y: var(
|
|
19
|
+
--#{defaults.$prefix}-button-padding-y,
|
|
20
|
+
calc(#{base.$gap} / 2)
|
|
21
|
+
);
|
|
22
|
+
$button-padding: var(
|
|
23
|
+
--#{defaults.$prefix}-button-padding,
|
|
24
|
+
#{$button-padding-y} #{$button-padding-x}
|
|
25
|
+
);
|
|
26
|
+
$button-font-size: var(
|
|
27
|
+
--#{defaults.$prefix}-button-font-size,
|
|
28
|
+
#{map.get(base.$font-size, default)}
|
|
29
|
+
);
|
|
30
|
+
$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}
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// Transform properties.
|
|
39
|
+
$button-hover-transform: var(
|
|
40
|
+
--#{defaults.$prefix}-button-hover-transform,
|
|
41
|
+
#{defaults.$button-hover-transform}
|
|
42
|
+
);
|
|
43
|
+
$button-active-transform: var(
|
|
44
|
+
--#{defaults.$prefix}-button-active-transform,
|
|
45
|
+
#{defaults.$button-active-transform}
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
// Background properties.
|
|
49
|
+
$button-background: var(
|
|
50
|
+
--#{defaults.$prefix}-button-background,
|
|
51
|
+
#{theme.$theme-active--light}
|
|
52
|
+
);
|
|
53
|
+
$button-hover-background: var(
|
|
54
|
+
--#{defaults.$prefix}-button-hover-background,
|
|
55
|
+
#{theme.$theme-active--dark}
|
|
56
|
+
);
|
|
57
|
+
$button-active-background: var(
|
|
58
|
+
--#{defaults.$prefix}-button-active-background,
|
|
59
|
+
#{theme.$theme-active--dark}
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
// Text properties.
|
|
63
|
+
$button-color: var(
|
|
64
|
+
--#{defaults.$prefix}-button-color,
|
|
65
|
+
#{theme.$theme-active--dark}
|
|
66
|
+
);
|
|
67
|
+
$button-hover-color: var(
|
|
68
|
+
--#{defaults.$prefix}-button-hover-color,
|
|
69
|
+
#{theme.$theme-active--light}
|
|
70
|
+
);
|
|
71
|
+
$button-active-color: var(
|
|
72
|
+
--#{defaults.$prefix}-button-active-color,
|
|
73
|
+
#{theme.$theme-active--light}
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
// Border properties.
|
|
77
|
+
$button-border-width: var(
|
|
78
|
+
--#{defaults.$prefix}-button-border-width,
|
|
79
|
+
#{base.$border-width}
|
|
80
|
+
);
|
|
81
|
+
$button-border-style: var(
|
|
82
|
+
--#{defaults.$prefix}-botton-border-style,
|
|
83
|
+
#{base.$border-style}
|
|
84
|
+
);
|
|
85
|
+
$button-border-radius: var(
|
|
86
|
+
--#{defaults.$prefix}-button-border-radius,
|
|
87
|
+
#{base.$border-radius}
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
// Border colour properties.
|
|
91
|
+
$button-border-color: var(
|
|
92
|
+
--#{defaults.$prefix}-button-border-color,
|
|
93
|
+
#{theme.$theme-active--dark}
|
|
94
|
+
);
|
|
95
|
+
$button-hover-border-color: var(
|
|
96
|
+
--#{defaults.$prefix}-button-hover-border-color,
|
|
97
|
+
#{theme.$theme-active--dark}
|
|
98
|
+
);
|
|
99
|
+
$button-active-border-color: var(
|
|
100
|
+
--#{defaults.$prefix}-button-active-border-color,
|
|
101
|
+
#{theme.$theme-active--dark}
|
|
102
|
+
);
|
package/scss/graupl.scss
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
@forward "../../defaults";
|
|
8
|
+
|
|
9
|
+
$columns-max-width: 1fr !default;
|
|
10
|
+
$columns-count: 3 !default;
|
|
11
|
+
$columns-disable-width: 48ch !default;
|
|
12
|
+
$columns-min-count: 1 !default;
|
|
13
|
+
$columns-max-count: 4 !default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Graupl Columns layout.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "defaults";
|
|
5
|
+
@use "../../variables" as base;
|
|
6
|
+
@use "../../mixins/layer" as *;
|
|
7
|
+
|
|
8
|
+
@include layer(layout) {
|
|
9
|
+
.columns {
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: var(
|
|
12
|
+
--#{defaults.$prefix}-columns,
|
|
13
|
+
repeat(auto-fit, minmax(#{$columns-min-width}, #{$columns-max-width}))
|
|
14
|
+
);
|
|
15
|
+
gap: $columns-gap;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@for $i from defaults.$columns-min-count through defaults.$columns-max-count {
|
|
19
|
+
.columns-#{$i} {
|
|
20
|
+
--#{defaults.$prefix}-columns-count: #{$i};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Disable columns on small screens to avoid horizontal bleeding.
|
|
25
|
+
@media screen and (max-width: #{defaults.$columns-disable-width}) {
|
|
26
|
+
.columns {
|
|
27
|
+
--#{defaults.$prefix}-columns-min-width: #{defaults.$columns-max-width};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Variables referencing custom properties.
|
|
2
|
+
|
|
3
|
+
@use "../../variables" as base;
|
|
4
|
+
@use "defaults";
|
|
5
|
+
|
|
6
|
+
$columns-gap: var(--#{defaults.$prefix}-columns-gap, #{base.$gap});
|
|
7
|
+
$columns-count: var(
|
|
8
|
+
--#{defaults.$prefix}-columns-count,
|
|
9
|
+
#{defaults.$columns-count}
|
|
10
|
+
);
|
|
11
|
+
$columns-min-width: var(
|
|
12
|
+
--#{defaults.$prefix}-columns-min-width,
|
|
13
|
+
calc(
|
|
14
|
+
(#{base.$content-max-width} - #{$columns-gap} * (#{$columns-count} - 1)) / #{$columns-count}
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
$columns-max-width: var(
|
|
18
|
+
--#{defaults.$prefix}-columns-max-width,
|
|
19
|
+
#{defaults.$columns-max-width}
|
|
20
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
@forward "../../defaults";
|
|
8
|
+
|
|
9
|
+
$container-breakout-width: 15ch !default;
|
|
10
|
+
$container-feature-width: 20ch !default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Graupl Container layout.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "../../mixins/layer" as *;
|
|
5
|
+
@use "defaults";
|
|
6
|
+
|
|
7
|
+
@include layer(layout) {
|
|
8
|
+
.container,
|
|
9
|
+
.container > .full-width {
|
|
10
|
+
--#{defaults.$prefix}-container-full-width: minmax(#{$container-gap}, 1fr);
|
|
11
|
+
--#{defaults.$prefix}-container-content: min(
|
|
12
|
+
#{$container-content-max-width},
|
|
13
|
+
calc(100% - #{$container-gap} * 2)
|
|
14
|
+
);
|
|
15
|
+
--#{defaults.$prefix}-container-breakout: minmax(
|
|
16
|
+
0,
|
|
17
|
+
#{$container-breakout-width}
|
|
18
|
+
);
|
|
19
|
+
--#{defaults.$prefix}-container-feature: minmax(
|
|
20
|
+
0,
|
|
21
|
+
#{$container-feature-width}
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
display: grid;
|
|
25
|
+
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];
|
|
33
|
+
|
|
34
|
+
> :not(.breakout, .full-width, .feature) {
|
|
35
|
+
grid-column: content;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.breakout {
|
|
39
|
+
grid-column: breakout;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.feature {
|
|
43
|
+
grid-column: feature;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.full-width {
|
|
47
|
+
grid-column: full-width;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Variables referencing custom properties.
|
|
2
|
+
|
|
3
|
+
@use "../../variables" as base;
|
|
4
|
+
@use "defaults";
|
|
5
|
+
|
|
6
|
+
$container-gap: var(--#{defaults.$prefix}-container-gap, #{base.$gap});
|
|
7
|
+
$container-content-max-width: var(
|
|
8
|
+
--#{defaults.$prefix}-container-content-max-width,
|
|
9
|
+
#{base.$content-max-width}
|
|
10
|
+
);
|
|
11
|
+
$container-breakout-max-width: var(
|
|
12
|
+
--#{defaults.$prefix}-container-breakout-max-width,
|
|
13
|
+
calc(#{$container-content-max-width} + #{defaults.$container-breakout-width})
|
|
14
|
+
);
|
|
15
|
+
$container-breakout-width: var(
|
|
16
|
+
--#{defaults.$prefix}-container-breakout-width,
|
|
17
|
+
calc((#{$container-breakout-max-width} - #{$container-content-max-width}) / 2)
|
|
18
|
+
);
|
|
19
|
+
$container-feature-max-width: var(
|
|
20
|
+
--#{defaults.$prefix}-container-feature-max-width,
|
|
21
|
+
calc(#{$container-breakout-max-width} + #{defaults.$container-feature-width})
|
|
22
|
+
);
|
|
23
|
+
$container-feature-width: var(
|
|
24
|
+
--#{defaults.$prefix}-container-feature-width,
|
|
25
|
+
calc((#{$container-feature-max-width} - #{$container-breakout-max-width}) / 2)
|
|
26
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Layer mixins.
|
|
2
|
+
//
|
|
3
|
+
// These should be used to define the layers of your components to ensure that
|
|
4
|
+
// they are output in the correct order in the final compiled CSS.
|
|
5
|
+
|
|
6
|
+
@use "../defaults" as base;
|
|
7
|
+
|
|
8
|
+
@mixin layer($layer) {
|
|
9
|
+
@at-root {
|
|
10
|
+
@layer #{base.$prefix}.#{$layer} {
|
|
11
|
+
@content;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Media query mixins.
|
|
2
|
+
|
|
3
|
+
// A media query for targetting users who have not requested reduced motion.
|
|
4
|
+
@mixin animation-on {
|
|
5
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
6
|
+
@content;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// A media query for targetting users who have requested reduced motion.
|
|
11
|
+
@mixin animation-off {
|
|
12
|
+
@media (prefers-reduced-motion: reduce) {
|
|
13
|
+
@content;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
@forward "../../defaults";
|
|
8
|
+
|
|
9
|
+
$focus-outline-style: dotted !default;
|
|
10
|
+
$focus-box-shadow-style: inset !default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Focus state styles.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "../../mixins/layer" as *;
|
|
5
|
+
|
|
6
|
+
@include layer(state) {
|
|
7
|
+
*:focus-visible {
|
|
8
|
+
border-color: transparent;
|
|
9
|
+
outline: $focus-outline-width $focus-outline-style $focus-outline-color;
|
|
10
|
+
outline-offset: $focus-outline-offset;
|
|
11
|
+
box-shadow: $focus-box-shadow;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Variables referencing custom properties.
|
|
2
|
+
|
|
3
|
+
@use "../../variables" as base;
|
|
4
|
+
@use "../../theme/variables" as theme;
|
|
5
|
+
@use "defaults";
|
|
6
|
+
|
|
7
|
+
$focus-width: var(--#{defaults.$prefix}-focus-width, #{base.$border-width});
|
|
8
|
+
$focus-outline-color: var(
|
|
9
|
+
--#{defaults.$prefix}-focus-outline-color,
|
|
10
|
+
#{theme.$theme-active--dark}
|
|
11
|
+
);
|
|
12
|
+
$focus-outline-width: var(
|
|
13
|
+
--#{defaults.$prefix}-focus-outline-width,
|
|
14
|
+
#{$focus-width}
|
|
15
|
+
);
|
|
16
|
+
$focus-outline-style: var(
|
|
17
|
+
--#{defaults.$prefix}-focus-outline-style,
|
|
18
|
+
#{defaults.$focus-outline-style}
|
|
19
|
+
);
|
|
20
|
+
$focus-outline-offset: var(
|
|
21
|
+
--#{defaults.$prefix}-focus-outline-offset,
|
|
22
|
+
calc(-1 * #{$focus-outline-width})
|
|
23
|
+
);
|
|
24
|
+
$focus-box-shadow-color: var(
|
|
25
|
+
--#{defaults.$prefix}-focus-box-shadow-color,
|
|
26
|
+
#{theme.$theme-active--light}
|
|
27
|
+
);
|
|
28
|
+
$focus-box-shadow-style: var(
|
|
29
|
+
--#{defaults.$prefix}-focus-box-shadow-style,
|
|
30
|
+
#{defaults.$focus-box-shadow-style}
|
|
31
|
+
);
|
|
32
|
+
$focus-box-shadow: var(
|
|
33
|
+
--#{defaults.$prefix}-focus-box-shadow,
|
|
34
|
+
#{$focus-width $focus-width} 0 0 #{$focus-box-shadow-style} #{$focus-box-shadow-color},
|
|
35
|
+
0 0 0 #{$focus-width} #{$focus-box-shadow-style} #{$focus-box-shadow-color}
|
|
36
|
+
);
|