@graupl/graupl 1.0.0-alpha.11 → 1.0.0-alpha.13
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 +54 -0
- package/dist/base/button.css +2 -0
- package/dist/base/button.css.map +1 -0
- package/dist/base/form.css +1 -1
- package/dist/base/form.css.map +1 -1
- package/dist/base/link.css +1 -1
- package/dist/base/link.css.map +1 -1
- package/dist/base/table.css +1 -1
- package/dist/base/table.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/component/card.css +2 -0
- package/dist/component/card.css.map +1 -0
- package/dist/component/input-group.css +1 -1
- package/dist/component/input-group.css.map +1 -1
- package/dist/component/menu.css +2 -0
- package/dist/component/menu.css.map +1 -0
- package/dist/component/navigation.css +2 -0
- package/dist/component/navigation.css.map +1 -0
- package/dist/component.css +1 -1
- package/dist/component.css.map +1 -1
- package/dist/graupl.css +1 -1
- package/dist/graupl.css.map +1 -1
- package/dist/init.css +2 -0
- package/dist/init.css.map +1 -0
- package/dist/layout/columns.css +1 -1
- package/dist/layout/columns.css.map +1 -1
- package/dist/layout/container.css.map +1 -1
- package/dist/layout/flex-columns.css +2 -0
- package/dist/layout/flex-columns.css.map +1 -0
- package/dist/layout.css +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/normalize.css +2 -0
- package/dist/normalize.css.map +1 -0
- package/dist/state/focus.css.map +1 -1
- package/dist/state.css.map +1 -1
- package/dist/theme/color.css.map +1 -1
- package/dist/theme/typography.css +1 -1
- package/dist/theme/typography.css.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/theme.css.map +1 -1
- package/dist/utilities/order.css +2 -0
- package/dist/utilities/order.css.map +1 -0
- package/dist/utilities/spacing.css +1 -1
- package/dist/utilities/spacing.css.map +1 -1
- package/dist/utilities/typography.css +1 -1
- package/dist/utilities/typography.css.map +1 -1
- package/dist/utilities.css +1 -1
- package/dist/utilities.css.map +1 -1
- package/eslint.config.js +1 -0
- package/index.html +619 -326
- package/package.json +2 -1
- package/scss/base/button.scss +3 -0
- package/scss/base/form.scss +1 -1
- package/scss/base/link.scss +1 -1
- package/scss/base/table.scss +1 -1
- package/scss/base.scss +1 -1
- package/scss/component/card.scss +3 -0
- package/scss/component/input-group.scss +1 -1
- package/scss/component/menu.scss +3 -0
- package/scss/component/navigation.scss +3 -0
- package/scss/component.scss +1 -1
- package/scss/graupl.scss +1 -3
- package/scss/init.scss +3 -0
- package/scss/layout/columns.scss +1 -1
- package/scss/layout/container.scss +1 -1
- package/scss/layout/flex-columns.scss +3 -0
- package/scss/layout.scss +1 -1
- package/scss/normalize.scss +3 -0
- package/scss/state/focus.scss +1 -1
- package/scss/state.scss +1 -1
- package/scss/theme/color.scss +1 -1
- package/scss/theme/typography.scss +1 -1
- package/scss/theme.scss +1 -1
- package/scss/utilities/alignment.scss +1 -1
- package/scss/utilities/color.scss +1 -1
- package/scss/utilities/display.scss +1 -1
- package/scss/utilities/flex.scss +1 -1
- package/scss/utilities/inset.scss +1 -1
- package/scss/utilities/justification.scss +1 -1
- package/scss/utilities/list.scss +1 -1
- package/scss/utilities/order.scss +3 -0
- package/scss/utilities/postion.scss +1 -1
- package/scss/utilities/spacing.scss +1 -1
- package/scss/utilities/typography.scss +1 -1
- package/scss/utilities/visibility.scss +1 -1
- package/scss/utilities.scss +1 -1
- package/src/js/navigation.js +34 -0
- package/src/scss/_defaults.scss +21 -5
- package/src/scss/_index.scss +4 -3
- package/src/scss/_init.scss +2 -2
- package/src/scss/_normalize.scss +197 -0
- package/src/scss/_variables.scss +4 -1
- package/src/scss/base/_index.scss +2 -1
- package/src/scss/base/button/_defaults.scss +53 -0
- package/src/scss/base/button/_index.scss +210 -0
- package/src/scss/{component → base}/button/_variables.scss +51 -12
- package/src/scss/base/form/_defaults.scss +14 -4
- package/src/scss/base/form/_index.scss +23 -20
- package/src/scss/base/form/_variables.scss +12 -1
- package/src/scss/base/link/_defaults.scss +48 -5
- package/src/scss/base/link/_index.scss +101 -17
- package/src/scss/base/link/_variables.scss +226 -5
- package/src/scss/base/table/_defaults.scss +49 -4
- package/src/scss/base/table/_index.scss +102 -8
- package/src/scss/base/table/_variables.scss +71 -1
- package/src/scss/component/_index.scss +4 -3
- package/src/scss/component/card/_defaults.scss +29 -0
- package/src/scss/component/card/_index.scss +143 -0
- package/src/scss/component/card/_variables.scss +185 -0
- package/src/scss/component/input-group/_defaults.scss +11 -4
- package/src/scss/component/input-group/_index.scss +11 -9
- package/src/scss/component/input-group/_variables.scss +4 -1
- package/src/scss/component/menu/_defaults.scss +65 -0
- package/src/scss/component/menu/_index.scss +304 -0
- package/src/scss/component/menu/_variables.scss +491 -0
- package/src/scss/component/navigation/_defaults.scss +29 -0
- package/src/scss/component/navigation/_index.scss +189 -0
- package/src/scss/component/navigation/_variables.scss +237 -0
- package/src/scss/functions/_important.scss +2 -0
- package/src/scss/functions/_theme.scss +18 -0
- package/src/scss/layout/_index.scss +2 -1
- package/src/scss/layout/columns/_defaults.scss +12 -4
- package/src/scss/layout/columns/_index.scss +27 -5
- package/src/scss/layout/columns/_variables.scss +4 -1
- package/src/scss/layout/container/_defaults.scss +13 -4
- package/src/scss/layout/container/_index.scss +12 -7
- package/src/scss/layout/container/_variables.scss +4 -1
- package/src/scss/layout/flex-columns/_defaults.scss +18 -0
- package/src/scss/layout/flex-columns/_index.scss +77 -0
- package/src/scss/layout/flex-columns/_variables.scss +26 -0
- package/src/scss/mixins/_layer.scss +1 -1
- package/src/scss/mixins/_media-queries.scss +10 -1
- package/src/scss/state/_index.scss +1 -1
- package/src/scss/state/focus/_defaults.scss +6 -4
- package/src/scss/state/focus/_index.scss +1 -1
- package/src/scss/state/focus/_variables.scss +4 -1
- package/src/scss/theme/_index.scss +1 -1
- package/src/scss/theme/color/_defaults.scss +6 -4
- package/src/scss/theme/color/_index.scss +1 -1
- package/src/scss/theme/color/_variables.scss +4 -1
- package/src/scss/theme/typography/_defaults.scss +7 -5
- package/src/scss/theme/typography/_index.scss +1 -1
- package/src/scss/theme/typography/_variables.scss +9 -3
- package/src/scss/utilities/_index.scss +3 -1
- package/src/scss/utilities/alignment/_defaults.scss +6 -4
- package/src/scss/utilities/alignment/_index.scss +1 -1
- package/src/scss/utilities/alignment/_variables.scss +4 -1
- package/src/scss/utilities/color/_defaults.scss +6 -4
- package/src/scss/utilities/color/_index.scss +1 -1
- package/src/scss/utilities/color/_variables.scss +4 -1
- package/src/scss/utilities/display/_defaults.scss +6 -4
- package/src/scss/utilities/display/_index.scss +1 -1
- package/src/scss/utilities/display/_variables.scss +4 -1
- package/src/scss/utilities/flex/_defaults.scss +6 -4
- package/src/scss/utilities/flex/_index.scss +1 -1
- package/src/scss/utilities/flex/_variables.scss +4 -1
- package/src/scss/utilities/inset/_defaults.scss +6 -4
- package/src/scss/utilities/inset/_index.scss +1 -1
- package/src/scss/utilities/inset/_variables.scss +4 -1
- package/src/scss/utilities/justification/_defaults.scss +6 -4
- package/src/scss/utilities/justification/_index.scss +1 -1
- package/src/scss/utilities/justification/_variables.scss +4 -1
- package/src/scss/utilities/list/_defaults.scss +6 -4
- package/src/scss/utilities/list/_index.scss +1 -1
- package/src/scss/utilities/list/_variables.scss +4 -1
- package/src/scss/utilities/order/_defaults.scss +19 -0
- package/src/scss/utilities/order/_index.scss +35 -0
- package/src/scss/utilities/order/_variables.scss +6 -0
- package/src/scss/utilities/position/_defaults.scss +6 -4
- package/src/scss/utilities/position/_index.scss +1 -1
- package/src/scss/utilities/position/_variables.scss +4 -1
- package/src/scss/utilities/ratio/_defaults.scss +24 -0
- package/src/scss/utilities/ratio/_index.scss +26 -0
- package/src/scss/utilities/ratio/_variables.scss +9 -0
- package/src/scss/utilities/spacing/_defaults.scss +6 -4
- package/src/scss/utilities/spacing/_index.scss +41 -17
- package/src/scss/utilities/spacing/_variables.scss +4 -1
- package/src/scss/utilities/typography/_defaults.scss +6 -4
- package/src/scss/utilities/typography/_index.scss +1 -1
- package/src/scss/utilities/typography/_variables.scss +4 -1
- package/src/scss/utilities/visibility/_defaults.scss +6 -4
- package/src/scss/utilities/visibility/_index.scss +1 -1
- package/src/scss/utilities/visibility/_variables.scss +4 -1
- package/dist/component/button.css +0 -2
- package/dist/component/button.css.map +0 -1
- package/dist/component/table.css +0 -2
- package/dist/component/table.css.map +0 -1
- package/scss/component/button.scss +0 -3
- package/scss/component/table.scss +0 -3
- package/src/scss/component/button/_defaults.scss +0 -39
- package/src/scss/component/button/_index.scss +0 -134
- package/src/scss/component/table/_defaults.scss +0 -30
- package/src/scss/component/table/_index.scss +0 -77
- package/src/scss/component/table/_variables.scss +0 -64
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl color theme variables.
|
|
2
|
+
//
|
|
3
|
+
// These values are to be used to directly style components and provide a
|
|
4
|
+
// cleaner way to reference custom properties.
|
|
2
5
|
|
|
3
6
|
@use "defaults";
|
|
4
7
|
@use "../../defaults" as root-defaults;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl typography theme default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
9
11
|
// font properties.
|
|
10
|
-
$font-size: 1rem !default;
|
|
12
|
+
$font-size-base: 1rem !default;
|
|
11
13
|
$root-font-size: clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem) !default;
|
|
12
14
|
$line-height: 1.2em !default;
|
|
13
15
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl typography theme variables.
|
|
2
|
+
//
|
|
3
|
+
// These values are to be used to directly style components and provide a
|
|
4
|
+
// cleaner way to reference custom properties.
|
|
2
5
|
|
|
3
6
|
@use "defaults";
|
|
4
7
|
@use "../../defaults" as root-defaults;
|
|
@@ -6,7 +9,10 @@
|
|
|
6
9
|
@use "sass:map";
|
|
7
10
|
|
|
8
11
|
// Font properties.
|
|
9
|
-
$font-size: var(
|
|
12
|
+
$font-size-base: var(
|
|
13
|
+
--#{root-defaults.$prefix}-font-size-base,
|
|
14
|
+
#{defaults.$font-size-base}
|
|
15
|
+
);
|
|
10
16
|
$line-height: var(
|
|
11
17
|
--#{root-defaults.$prefix}-line-height,
|
|
12
18
|
#{defaults.$line-height}
|
|
@@ -18,7 +24,7 @@ $font-sizes: ();
|
|
|
18
24
|
@each $key, $value in defaults.$font-size-multipliers {
|
|
19
25
|
$size: var(
|
|
20
26
|
--#{root-defaults.$prefix}-font-#{$key},
|
|
21
|
-
calc(#{$value} * #{$font-size})
|
|
27
|
+
calc(#{$value} * #{$font-size-base})
|
|
22
28
|
);
|
|
23
29
|
$font-sizes: map.set($font-sizes, $key, $size);
|
|
24
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @gruapl/graupl utilities styles.
|
|
2
2
|
|
|
3
3
|
@forward "alignment";
|
|
4
4
|
@forward "color";
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
@forward "inset";
|
|
8
8
|
@forward "justification";
|
|
9
9
|
@forward "list";
|
|
10
|
+
@forward "order";
|
|
10
11
|
@forward "position";
|
|
12
|
+
@forward "ratio";
|
|
11
13
|
@forward "spacing";
|
|
12
14
|
@forward "typography";
|
|
13
15
|
@forward "visibility";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl alignment utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl color utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl display utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl flex utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl inset utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl justification utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl list utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// @graupl/graupl order utilities default values.
|
|
2
|
+
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
8
|
+
|
|
9
|
+
@use "sass:map";
|
|
10
|
+
|
|
11
|
+
// Order properties.
|
|
12
|
+
$order-class-prefix: "order-" !default;
|
|
13
|
+
$base-order-properties: (
|
|
14
|
+
"none": 0,
|
|
15
|
+
"first": -9999,
|
|
16
|
+
"last": 9999,
|
|
17
|
+
);
|
|
18
|
+
$custom-order-properties: () !default;
|
|
19
|
+
$order-properties: map.merge($base-order-properties, $custom-order-properties);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// @gruapl/graupl order utilities styles.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "defaults" as defaults;
|
|
5
|
+
@use "../../layout/columns/defaults" as columns-defaults;
|
|
6
|
+
@use "../../layout/flex-columns/defaults" as flex-columns-defaults;
|
|
7
|
+
@use "../../mixins/layer" as *;
|
|
8
|
+
@use "../../functions/important";
|
|
9
|
+
|
|
10
|
+
@include layer(utilities) {
|
|
11
|
+
@each $order-property, $order-value in $order-properties {
|
|
12
|
+
.#{$order-class-prefix}#{$order-property} {
|
|
13
|
+
order: $order-value;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$order-max-count: 0;
|
|
18
|
+
|
|
19
|
+
/* stylelint-disable scss/operator-no-newline-after -- Prettier wants to format it this way. */
|
|
20
|
+
@if (
|
|
21
|
+
columns-defaults.$columns-max-count >
|
|
22
|
+
flex-columns-defaults.$flex-columns-max-count
|
|
23
|
+
) {
|
|
24
|
+
$order-max-count: columns-defaults.$columns-max-count;
|
|
25
|
+
} @else {
|
|
26
|
+
$order-max-count: flex-columns-defaults.$flex-columns-max-count;
|
|
27
|
+
}
|
|
28
|
+
/* stylelint-enable scss/operator-no-newline-after */
|
|
29
|
+
|
|
30
|
+
@for $i from 1 through $order-max-count {
|
|
31
|
+
.#{$order-class-prefix}#{$i} {
|
|
32
|
+
order: $i;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl position utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @graupl/graupl ratio utilities default values.
|
|
2
|
+
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
8
|
+
|
|
9
|
+
@use "sass:map";
|
|
10
|
+
|
|
11
|
+
// Ratio utilities.
|
|
12
|
+
$ratio-selector: ".ratio" !default;
|
|
13
|
+
$ratio-variant-selector-prefix: "." !default;
|
|
14
|
+
$base-ratios: (
|
|
15
|
+
"one-by-one": 100%,
|
|
16
|
+
"two-by-one": 50%,
|
|
17
|
+
"four-by-three": 75%,
|
|
18
|
+
"four-by-one": 25%,
|
|
19
|
+
"sixteen-by-nine": calc(9 / 16 * 100%),
|
|
20
|
+
"three-by-two": calc(2 / 3 * 100%),
|
|
21
|
+
"eight-by-five": calc(5 / 8 * 100%),
|
|
22
|
+
);
|
|
23
|
+
$custom-ratios: () !default;
|
|
24
|
+
$ratios: map.merge($base-ratios, $custom-ratios);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// @gruapl/graupl ratio utilities styles.
|
|
2
|
+
|
|
3
|
+
@use "variables" as *;
|
|
4
|
+
@use "defaults" as defaults;
|
|
5
|
+
@use "../../defaults" as root-defaults;
|
|
6
|
+
@use "../../mixins/layer" as *;
|
|
7
|
+
@use "../../functions/important";
|
|
8
|
+
|
|
9
|
+
@include layer(utilities) {
|
|
10
|
+
#{defaults.$ratio-selector} {
|
|
11
|
+
position: relative;
|
|
12
|
+
width: 100%;
|
|
13
|
+
|
|
14
|
+
&::before {
|
|
15
|
+
content: "";
|
|
16
|
+
display: block;
|
|
17
|
+
padding-top: $ratio;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@each $ratio-selector, $value in defaults.$ratios {
|
|
22
|
+
#{defaults.$ratio-variant-selector-prefix}#{$ratio-selector} {
|
|
23
|
+
--#{root-defaults.$prefix}-ratio: #{$value};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// @graupl/graupl ratio utilities variables.
|
|
2
|
+
//
|
|
3
|
+
// These values are to be used to directly style components and provide a
|
|
4
|
+
// cleaner way to reference custom properties.
|
|
5
|
+
|
|
6
|
+
@use "defaults";
|
|
7
|
+
@use "../../defaults" as root-defaults;
|
|
8
|
+
|
|
9
|
+
$ratio: var(--#{root-defaults.$prefix}-ratio);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl spacing utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @gruapl/graupl spacing utilities styles.
|
|
2
2
|
|
|
3
3
|
@use "variables" as *;
|
|
4
4
|
@use "defaults" as defaults;
|
|
@@ -6,16 +6,18 @@
|
|
|
6
6
|
@use "../../functions/important";
|
|
7
7
|
@use "../../variables" as root-variables;
|
|
8
8
|
@use "../../defaults" as root-defaults;
|
|
9
|
+
@use "../../layout/columns/defaults" as columns-defaults;
|
|
10
|
+
@use "../../layout/flex-columns/defaults" as flex-columns-defaults;
|
|
9
11
|
|
|
10
12
|
@include layer(utilities) {
|
|
11
13
|
// For each spacing property, create a utility class.
|
|
12
14
|
@each $name, $property in defaults.$spacing-properties {
|
|
13
15
|
@each $key, $value in root-variables.$spacers {
|
|
14
16
|
.#{$name}-#{$key} {
|
|
15
|
-
// If we're dealing with gap, column-gap, or row-gap inside of
|
|
17
|
+
// If we're dealing with gap, column-gap, or row-gap inside of #{columns-defaults.$columns-selector}, we should update
|
|
16
18
|
// the columns-column-gap property instead of the raw property.
|
|
17
19
|
@if $name == "g" {
|
|
18
|
-
|
|
20
|
+
&#{columns-defaults.$columns-selector} {
|
|
19
21
|
--#{root-defaults.$prefix}-columns-column-gap: #{important.insert(
|
|
20
22
|
$value
|
|
21
23
|
)};
|
|
@@ -24,34 +26,49 @@
|
|
|
24
26
|
)};
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
&#{flex-columns-defaults.$flex-columns-selector} {
|
|
30
|
+
--#{root-defaults.$prefix}-flex-columns-column-gap: #{important.insert(
|
|
31
|
+
$value
|
|
32
|
+
)};
|
|
33
|
+
--#{root-defaults.$prefix}-flex-columns-row-gap: #{important.insert(
|
|
34
|
+
$value
|
|
35
|
+
)};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@each $prop in $property {
|
|
39
|
+
#{$prop}: important.insert($value);
|
|
31
40
|
}
|
|
32
41
|
} @else if $name == "cg" {
|
|
33
|
-
|
|
42
|
+
&#{columns-defaults.$columns-selector} {
|
|
34
43
|
--#{root-defaults.$prefix}-columns-column-gap: #{important.insert(
|
|
35
44
|
$value
|
|
36
45
|
)};
|
|
37
46
|
}
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
&#{flex-columns-defaults.$flex-columns-selector} {
|
|
49
|
+
--#{root-defaults.$prefix}-flex-columns-column-gap: #{important.insert(
|
|
50
|
+
$value
|
|
51
|
+
)};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@each $prop in $property {
|
|
55
|
+
#{$prop}: important.insert($value);
|
|
43
56
|
}
|
|
44
57
|
} @else if $name == "rg" {
|
|
45
|
-
|
|
58
|
+
&#{columns-defaults.$columns-selector} {
|
|
46
59
|
--#{root-defaults.$prefix}-columns-row-gap: #{important.insert(
|
|
47
60
|
$value
|
|
48
61
|
)};
|
|
49
62
|
}
|
|
50
63
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
&#{flex-columns-defaults.$flex-columns-selector} {
|
|
65
|
+
--#{root-defaults.$prefix}-flex-columns-row-gap: #{important.insert(
|
|
66
|
+
$value
|
|
67
|
+
)};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@each $prop in $property {
|
|
71
|
+
#{$prop}: important.insert($value);
|
|
55
72
|
}
|
|
56
73
|
} @else {
|
|
57
74
|
@each $prop in $property {
|
|
@@ -60,5 +77,12 @@
|
|
|
60
77
|
}
|
|
61
78
|
}
|
|
62
79
|
}
|
|
80
|
+
|
|
81
|
+
// Create the "auto" utility class.
|
|
82
|
+
.#{$name}-auto {
|
|
83
|
+
@each $prop in $property {
|
|
84
|
+
#{$prop}: important.insert(auto);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
63
87
|
}
|
|
64
88
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @graupl/graupl typography utilities default values.
|
|
2
2
|
//
|
|
3
|
-
// Generally, these should not be used directly when styling components.
|
|
4
|
-
// They are mainly used to provide
|
|
5
|
-
//
|
|
3
|
+
// Generally, these should not be used directly when styling components unless a static value is needed.
|
|
4
|
+
// They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
|
|
5
|
+
//
|
|
6
|
+
// They should not be used to define direct property values (i.e. font-size, color, etc.).
|
|
7
|
+
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
6
8
|
|
|
7
9
|
@use "sass:map";
|
|
8
10
|
|