@graupl/core 1.0.0-beta.10
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/dist/css/base/button.css +2 -0
- package/dist/css/base/button.css.map +1 -0
- package/dist/css/base/form.css +2 -0
- package/dist/css/base/form.css.map +1 -0
- package/dist/css/base/link.css +2 -0
- package/dist/css/base/link.css.map +1 -0
- package/dist/css/base/table.css +2 -0
- package/dist/css/base/table.css.map +1 -0
- package/dist/css/base.css +2 -0
- package/dist/css/base.css.map +1 -0
- package/dist/css/component/accordion.css +5 -0
- package/dist/css/component/accordion.css.map +1 -0
- package/dist/css/component/alert.css +2 -0
- package/dist/css/component/alert.css.map +1 -0
- package/dist/css/component/card.css +2 -0
- package/dist/css/component/card.css.map +1 -0
- package/dist/css/component/carousel.css +2 -0
- package/dist/css/component/carousel.css.map +1 -0
- package/dist/css/component/input-group.css +2 -0
- package/dist/css/component/input-group.css.map +1 -0
- package/dist/css/component/list.css +2 -0
- package/dist/css/component/list.css.map +1 -0
- package/dist/css/component/menu.css +2 -0
- package/dist/css/component/menu.css.map +1 -0
- package/dist/css/component/navigation.css +2 -0
- package/dist/css/component/navigation.css.map +1 -0
- package/dist/css/component.css +5 -0
- package/dist/css/component.css.map +1 -0
- package/dist/css/graupl.css +5 -0
- package/dist/css/graupl.css.map +1 -0
- package/dist/css/init.css +2 -0
- package/dist/css/init.css.map +1 -0
- package/dist/css/layout/columns.css +2 -0
- package/dist/css/layout/columns.css.map +1 -0
- package/dist/css/layout/container.css +2 -0
- package/dist/css/layout/container.css.map +1 -0
- package/dist/css/layout/flex-columns.css +2 -0
- package/dist/css/layout/flex-columns.css.map +1 -0
- package/dist/css/layout.css +5 -0
- package/dist/css/layout.css.map +1 -0
- package/dist/css/normalize.css +2 -0
- package/dist/css/normalize.css.map +1 -0
- package/dist/css/state/focus.css +2 -0
- package/dist/css/state/focus.css.map +1 -0
- package/dist/css/state.css +2 -0
- package/dist/css/state.css.map +1 -0
- package/dist/css/theme/color.css +2 -0
- package/dist/css/theme/color.css.map +1 -0
- package/dist/css/theme/typography.css +2 -0
- package/dist/css/theme/typography.css.map +1 -0
- package/dist/css/theme.css +2 -0
- package/dist/css/theme.css.map +1 -0
- package/dist/css/utilities/alignment.css +2 -0
- package/dist/css/utilities/alignment.css.map +1 -0
- package/dist/css/utilities/background.css +2 -0
- package/dist/css/utilities/background.css.map +1 -0
- package/dist/css/utilities/border.css +2 -0
- package/dist/css/utilities/border.css.map +1 -0
- package/dist/css/utilities/color.css +2 -0
- package/dist/css/utilities/color.css.map +1 -0
- package/dist/css/utilities/container.css +2 -0
- package/dist/css/utilities/container.css.map +1 -0
- package/dist/css/utilities/display.css +2 -0
- package/dist/css/utilities/display.css.map +1 -0
- package/dist/css/utilities/flex.css +2 -0
- package/dist/css/utilities/flex.css.map +1 -0
- package/dist/css/utilities/gradient.css +2 -0
- package/dist/css/utilities/gradient.css.map +1 -0
- package/dist/css/utilities/height.css +2 -0
- package/dist/css/utilities/height.css.map +1 -0
- package/dist/css/utilities/inset.css +2 -0
- package/dist/css/utilities/inset.css.map +1 -0
- package/dist/css/utilities/justification.css +2 -0
- package/dist/css/utilities/justification.css.map +1 -0
- package/dist/css/utilities/list.css +2 -0
- package/dist/css/utilities/list.css.map +1 -0
- package/dist/css/utilities/order.css +2 -0
- package/dist/css/utilities/order.css.map +1 -0
- package/dist/css/utilities/position.css +2 -0
- package/dist/css/utilities/position.css.map +1 -0
- package/dist/css/utilities/ratio.css +2 -0
- package/dist/css/utilities/ratio.css.map +1 -0
- package/dist/css/utilities/spacing.css +2 -0
- package/dist/css/utilities/spacing.css.map +1 -0
- package/dist/css/utilities/typography.css +2 -0
- package/dist/css/utilities/typography.css.map +1 -0
- package/dist/css/utilities/visibility.css +2 -0
- package/dist/css/utilities/visibility.css.map +1 -0
- package/dist/css/utilities/visually-hidden.css +2 -0
- package/dist/css/utilities/visually-hidden.css.map +1 -0
- package/dist/css/utilities/width.css +2 -0
- package/dist/css/utilities/width.css.map +1 -0
- package/dist/css/utilities/z-index.css +2 -0
- package/dist/css/utilities/z-index.css.map +1 -0
- package/dist/css/utilities.css +2 -0
- package/dist/css/utilities.css.map +1 -0
- package/package.json +58 -0
- package/scss/base/button.scss +3 -0
- 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/accordion.scss +3 -0
- package/scss/component/alert.scss +3 -0
- package/scss/component/card.scss +3 -0
- package/scss/component/carousel.scss +3 -0
- package/scss/component/input-group.scss +3 -0
- package/scss/component/list.scss +3 -0
- package/scss/component/menu.scss +3 -0
- package/scss/component/navigation.scss +3 -0
- package/scss/component.scss +3 -0
- package/scss/graupl.scss +3 -0
- package/scss/init.scss +3 -0
- package/scss/layout/columns.scss +3 -0
- package/scss/layout/container.scss +3 -0
- package/scss/layout/flex-columns.scss +3 -0
- package/scss/layout.scss +3 -0
- package/scss/normalize.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/alignment.scss +3 -0
- package/scss/utilities/background.scss +3 -0
- package/scss/utilities/border.scss +3 -0
- package/scss/utilities/color.scss +3 -0
- package/scss/utilities/container.scss +3 -0
- package/scss/utilities/display.scss +3 -0
- package/scss/utilities/flex.scss +3 -0
- package/scss/utilities/gradient.scss +3 -0
- package/scss/utilities/height.scss +3 -0
- package/scss/utilities/inset.scss +3 -0
- package/scss/utilities/justification.scss +3 -0
- package/scss/utilities/list.scss +3 -0
- package/scss/utilities/order.scss +3 -0
- package/scss/utilities/position.scss +3 -0
- package/scss/utilities/ratio.scss +3 -0
- package/scss/utilities/spacing.scss +3 -0
- package/scss/utilities/typography.scss +3 -0
- package/scss/utilities/visibility.scss +3 -0
- package/scss/utilities/visually-hidden.scss +3 -0
- package/scss/utilities/width.scss +3 -0
- package/scss/utilities/z-index.scss +3 -0
- package/scss/utilities.scss +3 -0
- package/src/js/accordion/Accordion.js +1163 -0
- package/src/js/accordion/AccordionItem.js +496 -0
- package/src/js/accordion/index.js +10 -0
- package/src/js/alert/Alert.js +581 -0
- package/src/js/alert/index.js +11 -0
- package/src/js/carousel/Carousel.js +1427 -0
- package/src/js/carousel/index.js +10 -0
- package/src/js/domHelpers.js +37 -0
- package/src/js/eventHandlers.js +39 -0
- package/src/js/navigation/index.js +36 -0
- package/src/js/storage.js +106 -0
- package/src/js/validate.js +225 -0
- package/src/scss/_defaults.scss +184 -0
- package/src/scss/_index.scss +15 -0
- package/src/scss/_init.scss +6 -0
- package/src/scss/_normalize.scss +197 -0
- package/src/scss/_variables.scss +95 -0
- package/src/scss/base/_index.scss +6 -0
- package/src/scss/base/button/_defaults.scss +49 -0
- package/src/scss/base/button/_index.scss +206 -0
- package/src/scss/base/button/_mixins.scss +104 -0
- package/src/scss/base/button/_variables.scss +252 -0
- package/src/scss/base/form/_defaults.scss +24 -0
- package/src/scss/base/form/_index.scss +227 -0
- package/src/scss/base/form/_variables.scss +245 -0
- package/src/scss/base/link/_defaults.scss +35 -0
- package/src/scss/base/link/_index.scss +245 -0
- package/src/scss/base/link/_variables.scss +370 -0
- package/src/scss/base/table/_defaults.scss +68 -0
- package/src/scss/base/table/_index.scss +314 -0
- package/src/scss/base/table/_variables.scss +309 -0
- package/src/scss/component/_index.scss +10 -0
- package/src/scss/component/accordion/_defaults.scss +40 -0
- package/src/scss/component/accordion/_index.scss +198 -0
- package/src/scss/component/accordion/_variables.scss +356 -0
- package/src/scss/component/alert/_defaults.scss +49 -0
- package/src/scss/component/alert/_index.scss +119 -0
- package/src/scss/component/alert/_variables.scss +200 -0
- package/src/scss/component/card/_defaults.scss +32 -0
- package/src/scss/component/card/_index.scss +212 -0
- package/src/scss/component/card/_variables.scss +216 -0
- package/src/scss/component/carousel/_defaults.scss +43 -0
- package/src/scss/component/carousel/_index.scss +192 -0
- package/src/scss/component/carousel/_variables.scss +104 -0
- package/src/scss/component/input-group/_defaults.scss +30 -0
- package/src/scss/component/input-group/_index.scss +47 -0
- package/src/scss/component/input-group/_variables.scss +66 -0
- package/src/scss/component/list/_defaults.scss +15 -0
- package/src/scss/component/list/_index.scss +52 -0
- package/src/scss/component/list/_variables.scss +236 -0
- package/src/scss/component/menu/_defaults.scss +57 -0
- package/src/scss/component/menu/_index.scss +308 -0
- package/src/scss/component/menu/_variables.scss +642 -0
- package/src/scss/component/navigation/_defaults.scss +23 -0
- package/src/scss/component/navigation/_index.scss +190 -0
- package/src/scss/component/navigation/_variables.scss +290 -0
- package/src/scss/functions/_container.scss +38 -0
- package/src/scss/functions/_important.scss +36 -0
- package/src/scss/functions/_screen.scss +38 -0
- package/src/scss/functions/_theme.scss +39 -0
- package/src/scss/functions/_utility.scss +28 -0
- package/src/scss/layout/_index.scss +5 -0
- package/src/scss/layout/columns/_defaults.scss +24 -0
- package/src/scss/layout/columns/_index.scss +137 -0
- package/src/scss/layout/columns/_variables.scss +55 -0
- package/src/scss/layout/container/_defaults.scss +35 -0
- package/src/scss/layout/container/_index.scss +628 -0
- package/src/scss/layout/container/_variables.scss +114 -0
- package/src/scss/layout/flex-columns/_defaults.scss +28 -0
- package/src/scss/layout/flex-columns/_index.scss +184 -0
- package/src/scss/layout/flex-columns/_variables.scss +30 -0
- package/src/scss/mixins/_animation.scss +15 -0
- package/src/scss/mixins/_container.scss +80 -0
- package/src/scss/mixins/_layer.scss +16 -0
- package/src/scss/mixins/_screen.scss +77 -0
- package/src/scss/mixins/_state.scss +18 -0
- package/src/scss/mixins/_theme.scss +15 -0
- package/src/scss/mixins/_utility.scss +185 -0
- package/src/scss/mixins/_visually-hidden.scss +30 -0
- package/src/scss/state/_index.scss +3 -0
- package/src/scss/state/focus/_defaults.scss +9 -0
- package/src/scss/state/focus/_index.scss +42 -0
- package/src/scss/state/focus/_mixins.scss +13 -0
- package/src/scss/state/focus/_variables.scss +50 -0
- package/src/scss/theme/_index.scss +4 -0
- package/src/scss/theme/color/_defaults.scss +143 -0
- package/src/scss/theme/color/_index.scss +42 -0
- package/src/scss/theme/color/_variables.scss +133 -0
- package/src/scss/theme/typography/_defaults.scss +54 -0
- package/src/scss/theme/typography/_index.scss +120 -0
- package/src/scss/theme/typography/_variables.scss +248 -0
- package/src/scss/utilities/_index.scss +23 -0
- package/src/scss/utilities/_template/_defaults.scss +41 -0
- package/src/scss/utilities/_template/_index.scss +171 -0
- package/src/scss/utilities/_template/_variables.scss +6 -0
- package/src/scss/utilities/alignment/_defaults.scss +76 -0
- package/src/scss/utilities/alignment/_index.scss +336 -0
- package/src/scss/utilities/alignment/_variables.scss +6 -0
- package/src/scss/utilities/background/_defaults.scss +122 -0
- package/src/scss/utilities/background/_index.scss +634 -0
- package/src/scss/utilities/background/_variables.scss +6 -0
- package/src/scss/utilities/border/_defaults.scss +73 -0
- package/src/scss/utilities/border/_index.scss +558 -0
- package/src/scss/utilities/border/_variables.scss +6 -0
- package/src/scss/utilities/color/_defaults.scss +49 -0
- package/src/scss/utilities/color/_index.scss +469 -0
- package/src/scss/utilities/color/_variables.scss +6 -0
- package/src/scss/utilities/container/_defaults.scss +40 -0
- package/src/scss/utilities/container/_index.scss +174 -0
- package/src/scss/utilities/container/_variables.scss +6 -0
- package/src/scss/utilities/display/_defaults.scss +47 -0
- package/src/scss/utilities/display/_index.scss +184 -0
- package/src/scss/utilities/display/_variables.scss +6 -0
- package/src/scss/utilities/flex/_defaults.scss +99 -0
- package/src/scss/utilities/flex/_index.scss +486 -0
- package/src/scss/utilities/flex/_variables.scss +6 -0
- package/src/scss/utilities/gradient/_defaults.scss +70 -0
- package/src/scss/utilities/gradient/_index.scss +696 -0
- package/src/scss/utilities/gradient/_variables.scss +29 -0
- package/src/scss/utilities/height/_defaults.scss +54 -0
- package/src/scss/utilities/height/_index.scss +525 -0
- package/src/scss/utilities/height/_variables.scss +6 -0
- package/src/scss/utilities/inset/_defaults.scss +55 -0
- package/src/scss/utilities/inset/_index.scss +258 -0
- package/src/scss/utilities/inset/_variables.scss +6 -0
- package/src/scss/utilities/justification/_defaults.scss +73 -0
- package/src/scss/utilities/justification/_index.scss +333 -0
- package/src/scss/utilities/justification/_variables.scss +6 -0
- package/src/scss/utilities/list/_defaults.scss +53 -0
- package/src/scss/utilities/list/_index.scss +253 -0
- package/src/scss/utilities/list/_variables.scss +6 -0
- package/src/scss/utilities/order/_defaults.scss +36 -0
- package/src/scss/utilities/order/_index.scss +246 -0
- package/src/scss/utilities/order/_variables.scss +6 -0
- package/src/scss/utilities/position/_defaults.scss +41 -0
- package/src/scss/utilities/position/_index.scss +178 -0
- package/src/scss/utilities/position/_variables.scss +6 -0
- package/src/scss/utilities/ratio/_defaults.scss +42 -0
- package/src/scss/utilities/ratio/_index.scss +188 -0
- package/src/scss/utilities/ratio/_variables.scss +9 -0
- package/src/scss/utilities/spacing/_defaults.scss +64 -0
- package/src/scss/utilities/spacing/_index.scss +970 -0
- package/src/scss/utilities/spacing/_variables.scss +6 -0
- package/src/scss/utilities/typography/_defaults.scss +58 -0
- package/src/scss/utilities/typography/_index.scss +1089 -0
- package/src/scss/utilities/typography/_variables.scss +6 -0
- package/src/scss/utilities/visibility/_defaults.scss +39 -0
- package/src/scss/utilities/visibility/_index.scss +173 -0
- package/src/scss/utilities/visibility/_variables.scss +6 -0
- package/src/scss/utilities/visually-hidden/_defaults.scss +29 -0
- package/src/scss/utilities/visually-hidden/_index.scss +189 -0
- package/src/scss/utilities/visually-hidden/_variables.scss +6 -0
- package/src/scss/utilities/width/_defaults.scss +54 -0
- package/src/scss/utilities/width/_index.scss +525 -0
- package/src/scss/utilities/width/_variables.scss +6 -0
- package/src/scss/utilities/z-index/_defaults.scss +40 -0
- package/src/scss/utilities/z-index/_index.scss +173 -0
- package/src/scss/utilities/z-index/_variables.scss +6 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// @graupl/core border 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 "../../defaults" as root-defaults;
|
|
10
|
+
@use "sass:map";
|
|
11
|
+
|
|
12
|
+
// Utility modifiers.
|
|
13
|
+
$selector-base: root-defaults.$utility-selector-base !default;
|
|
14
|
+
$use-important: root-defaults.$use-important !default;
|
|
15
|
+
$screen-aware: false !default;
|
|
16
|
+
$theme-aware: false !default;
|
|
17
|
+
$state-aware: false !default;
|
|
18
|
+
$container-aware: false !default;
|
|
19
|
+
$screen-aware-separator: root-defaults.$utility-screen-aware-separator !default;
|
|
20
|
+
$theme-aware-separator: root-defaults.$utility-theme-aware-separator !default;
|
|
21
|
+
$state-aware-separator: root-defaults.$utility-state-aware-separator !default;
|
|
22
|
+
$container-aware-separator: root-defaults.$utility-container-aware-separator !default;
|
|
23
|
+
$screen-aware-selector-prefix: root-defaults.$utility-screen-aware-selector-prefix !default;
|
|
24
|
+
$theme-aware-selector-prefix: root-defaults.$utility-theme-aware-selector-prefix !default;
|
|
25
|
+
$state-aware-selector-prefix: root-defaults.$utility-state-aware-selector-prefix !default;
|
|
26
|
+
$container-aware-selector-prefix: root-defaults.$utility-container-aware-selector-prefix !default;
|
|
27
|
+
|
|
28
|
+
// Default border properties.
|
|
29
|
+
$default-border-selector: "bordered" !default;
|
|
30
|
+
|
|
31
|
+
// Border width properties.
|
|
32
|
+
$border-width-selector-prefix: "border-" !default;
|
|
33
|
+
$base-border-width-properties: (
|
|
34
|
+
thick: thick,
|
|
35
|
+
thin: thin,
|
|
36
|
+
medium: medium,
|
|
37
|
+
none: none,
|
|
38
|
+
);
|
|
39
|
+
$custom-border-width-properties: () !default;
|
|
40
|
+
$border-width-properties: map.merge(
|
|
41
|
+
$base-border-width-properties,
|
|
42
|
+
$custom-border-width-properties
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// Border color properties.
|
|
46
|
+
$border-color-selector-prefix: "border-" !default;
|
|
47
|
+
$base-border-color-properties: (
|
|
48
|
+
transparent: transparent,
|
|
49
|
+
);
|
|
50
|
+
$custom-border-color-properties: () !default;
|
|
51
|
+
$border-color-properties: map.merge(
|
|
52
|
+
$base-border-color-properties,
|
|
53
|
+
$custom-border-color-properties
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
// Border style properties.
|
|
57
|
+
$border-style-selector-prefix: "border-" !default;
|
|
58
|
+
$base-border-style-properties: (
|
|
59
|
+
solid: solid,
|
|
60
|
+
dashed: dashed,
|
|
61
|
+
dotted: dotted,
|
|
62
|
+
double: double,
|
|
63
|
+
groove: groove,
|
|
64
|
+
ridge: ridge,
|
|
65
|
+
inset: inset,
|
|
66
|
+
outset: outset,
|
|
67
|
+
none: none,
|
|
68
|
+
);
|
|
69
|
+
$custom-border-style-properties: () !default;
|
|
70
|
+
$border-style-properties: map.merge(
|
|
71
|
+
$base-border-style-properties,
|
|
72
|
+
$custom-border-style-properties
|
|
73
|
+
);
|
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
// @graupl/core border utilities styles.
|
|
2
|
+
//
|
|
3
|
+
// This file generates the border utility classes provided by Graupl.
|
|
4
|
+
//
|
|
5
|
+
// The following classes are generated by default:
|
|
6
|
+
// - `.bordered`: Applies the default border styling.
|
|
7
|
+
// - `.border-thick`: Sets the border width to `thick`.
|
|
8
|
+
// - `.border-thin`: Sets the border width to `thin`.
|
|
9
|
+
// - `.border-medium`: Sets the border width to `medium`.
|
|
10
|
+
// - `.border-none`: Sets the border width to `none`.
|
|
11
|
+
// - `.border-primary-100`: Sets the border color to Graupl's primary 100 color.
|
|
12
|
+
// - `.border-primary-200`: Sets the border color to Graupl's primary 200 color.
|
|
13
|
+
// - `.border-primary-300`: Sets the border color to Graupl's primary 300 color.
|
|
14
|
+
// - `.border-primary-400`: Sets the border color to Graupl's primary 400 color.
|
|
15
|
+
// - `.border-primary-500`: Sets the border color to Graupl's primary 500 color.
|
|
16
|
+
// - `.border-primary-600`: Sets the border color to Graupl's primary 600 color.
|
|
17
|
+
// - `.border-primary-700`: Sets the border color to Graupl's primary 700 color.
|
|
18
|
+
// - `.border-primary-800`: Sets the border color to Graupl's primary 800 color.
|
|
19
|
+
// - `.border-primary-900`: Sets the border color to Graupl's primary 900 color.
|
|
20
|
+
// - `.border-secondary-100`: Sets the border color to Graupl's secondary 100 color.
|
|
21
|
+
// - `.border-secondary-200`: Sets the border color to Graupl's secondary 200 color.
|
|
22
|
+
// - `.border-secondary-300`: Sets the border color to Graupl's secondary 300 color.
|
|
23
|
+
// - `.border-secondary-400`: Sets the border color to Graupl's secondary 400 color.
|
|
24
|
+
// - `.border-secondary-500`: Sets the border color to Graupl's secondary 500 color.
|
|
25
|
+
// - `.border-secondary-600`: Sets the border color to Graupl's secondary 600 color.
|
|
26
|
+
// - `.border-secondary-700`: Sets the border color to Graupl's secondary 700 color.
|
|
27
|
+
// - `.border-secondary-800`: Sets the border color to Graupl's secondary 800 color.
|
|
28
|
+
// - `.border-secondary-900`: Sets the border color to Graupl's secondary 900 color.
|
|
29
|
+
// - `.border-tertiary-100`: Sets the border color to Graupl's tertiary 100 color.
|
|
30
|
+
// - `.border-tertiary-200`: Sets the border color to Graupl's tertiary 200 color.
|
|
31
|
+
// - `.border-tertiary-300`: Sets the border color to Graupl's tertiary 300 color.
|
|
32
|
+
// - `.border-tertiary-400`: Sets the border color to Graupl's tertiary 400 color.
|
|
33
|
+
// - `.border-tertiary-500`: Sets the border color to Graupl's tertiary 500 color.
|
|
34
|
+
// - `.border-tertiary-600`: Sets the border color to Graupl's tertiary 600 color.
|
|
35
|
+
// - `.border-tertiary-700`: Sets the border color to Graupl's tertiary 700 color.
|
|
36
|
+
// - `.border-tertiary-800`: Sets the border color to Graupl's tertiary 800 color.
|
|
37
|
+
// - `.border-tertiary-900`: Sets the border color to Graupl's tertiary 900 color.
|
|
38
|
+
// - `.border-transparent`: Sets the border color to `transparent`.
|
|
39
|
+
// - `.border-solid`: Sets the border style to `solid`.
|
|
40
|
+
// - `.border-dashed`: Sets the border style to `dashed`.
|
|
41
|
+
// - `.border-dotted`: Sets the border style to `dotted`.
|
|
42
|
+
// - `.border-double`: Sets the border style to `double`.
|
|
43
|
+
// - `.border-groove`: Sets the border style to `groove`.
|
|
44
|
+
// - `.border-ridge`: Sets the border style to `ridge`.
|
|
45
|
+
// - `.border-inset`: Sets the border style to `inset`.
|
|
46
|
+
// - `.border-outset`: Sets the border style to `outset`.
|
|
47
|
+
// - `.border-none`: Sets the border style to `none`.
|
|
48
|
+
//
|
|
49
|
+
// The following custom properties control the generated classes:
|
|
50
|
+
// - N/A.
|
|
51
|
+
//
|
|
52
|
+
// The following variables control the generated classes:
|
|
53
|
+
// - `$selector-base`: The base selector for the utility classes.
|
|
54
|
+
// - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
|
|
55
|
+
// - `$screen-aware`: A flag to generate screen-aware utility classes.
|
|
56
|
+
// - `$theme-aware`: A flag to generate theme-aware utility classes.
|
|
57
|
+
// - `$state-aware`: A flag to generate state-aware utility classes.
|
|
58
|
+
// - `$container-aware`: A flag to generate container-aware utility classes.
|
|
59
|
+
// - `$screen-aware-separator`: The separator for screen-aware utility classes.
|
|
60
|
+
// - `$theme-aware-separator`: The separator for theme-aware utility classes.
|
|
61
|
+
// - `$state-aware-separator`: The separator for state-aware utility classes.
|
|
62
|
+
// - `$container-aware-separator`: The separator for container-aware utility classes.
|
|
63
|
+
// - `$screen-aware-selector-prefix`: The prefix for screen-aware utility classes.
|
|
64
|
+
// - `$theme-aware-selector-prefix`: The prefix for theme-aware utility classes.
|
|
65
|
+
// - `$state-aware-selector-prefix`: The prefix for state-aware utility classes.
|
|
66
|
+
// - `$container-aware-selector-prefix`: The prefix for container-aware utility classes.
|
|
67
|
+
// - `$default-border-selector`: The selector for the default border utility class.
|
|
68
|
+
// - `$border-width-selector-prefix`: The prefix for the border width utility classes.
|
|
69
|
+
// - `$base-border-width-properties`: The base properties and values for the border width utility classes.
|
|
70
|
+
// - `$custom-border-width-properties`: The custom properties and values for the border width utility classes.
|
|
71
|
+
// - `$border-width-properties`: The combined properties and values for the border width utility classes.
|
|
72
|
+
// - `$border-color-selector-prefix`: The prefix for the border color utility classes.
|
|
73
|
+
// - `$base-border-color-properties`: The base properties and values for the border color utility classes.
|
|
74
|
+
// - `$custom-border-color-properties`: The custom properties and values for the border color utility classes.
|
|
75
|
+
// - `$border-color-properties`: The combined properties and values for the border color utility classes.
|
|
76
|
+
// - `$border-style-selector-prefix`: The prefix for the border style utility classes.
|
|
77
|
+
// - `$base-border-style-properties`: The base properties and values for the border style utility classes.
|
|
78
|
+
// - `$custom-border-style-properties`: The custom properties and values for the border style utility classes.
|
|
79
|
+
// - `$border-style-properties`: The combined properties and values for the border style utility classes.
|
|
80
|
+
//
|
|
81
|
+
// Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.
|
|
82
|
+
// By default, no responsive utility classes are generated.
|
|
83
|
+
//
|
|
84
|
+
// When set to true, screen-aware utility classes will be generated for each screen size in the following pattern:
|
|
85
|
+
// - `.{screen-prefix}{screen-name}:{prefix}{value}`
|
|
86
|
+
//
|
|
87
|
+
// e.g. `.sm:border-thick` will set the `border-width` property to `thick` on screens equal to or larger than the `sm` breakpoint.
|
|
88
|
+
//
|
|
89
|
+
// When set to true, theme-aware utility classes will be generated for each theme in the following pattern:
|
|
90
|
+
// - `.{theme-prefix}{theme-name}:{prefix}{value}`
|
|
91
|
+
//
|
|
92
|
+
// e.g. `.dark:border-thick` will set the `border-width` property to `thick` when the `dark` theme is active.
|
|
93
|
+
//
|
|
94
|
+
// When set to true, state-aware utility classes will be generated for each state in the following pattern:
|
|
95
|
+
// - `.{state-prefix}{state-name}:{prefix}{value}`
|
|
96
|
+
//
|
|
97
|
+
// e.g. `.hover:border-thick` will set the `border-width` property to `thick` when the element is hovered.
|
|
98
|
+
//
|
|
99
|
+
// When set to true, container-aware utility classes will be generated for each container in the following pattern:
|
|
100
|
+
// - `.{container-prefix}{container-name}:{prefix}{value}`
|
|
101
|
+
//
|
|
102
|
+
// e.g. `.cq:md:border-thick` will set the `border-width` property to `thick` when the parent container is larger than the `md` breakpoint.
|
|
103
|
+
//
|
|
104
|
+
// @example
|
|
105
|
+
// <div class="bordered">This element has a border.</div>
|
|
106
|
+
|
|
107
|
+
@use "../../defaults" as root-defaults;
|
|
108
|
+
@use "../../functions/important";
|
|
109
|
+
@use "../../mixins/layer" as *;
|
|
110
|
+
@use "../../mixins/screen";
|
|
111
|
+
@use "../../mixins/utility";
|
|
112
|
+
@use "../../theme/color/variables" as color;
|
|
113
|
+
@use "../../variables" as root-variables;
|
|
114
|
+
@use "defaults";
|
|
115
|
+
@use "sass:map";
|
|
116
|
+
@use "variables" as *;
|
|
117
|
+
|
|
118
|
+
@include layer(utilities) {
|
|
119
|
+
// `.`
|
|
120
|
+
$selector-prefix: defaults.$selector-base;
|
|
121
|
+
|
|
122
|
+
// `.bordered`
|
|
123
|
+
$selector: #{$selector-prefix}#{defaults.$default-border-selector};
|
|
124
|
+
|
|
125
|
+
// Create a class to apply the default border styling.
|
|
126
|
+
@include utility.create-mapped(
|
|
127
|
+
$selector,
|
|
128
|
+
(
|
|
129
|
+
border-width: root-variables.$border-top-width
|
|
130
|
+
root-variables.$border-right-width root-variables.$border-bottom-width
|
|
131
|
+
root-variables.$border-left-width,
|
|
132
|
+
border-radius: root-variables.$border-top-left-radius
|
|
133
|
+
root-variables.$border-top-right-radius
|
|
134
|
+
root-variables.$border-bottom-right-radius
|
|
135
|
+
root-variables.$border-bottom-left-radius,
|
|
136
|
+
border-style: root-variables.$border-top-style
|
|
137
|
+
root-variables.$border-right-style root-variables.$border-bottom-style
|
|
138
|
+
root-variables.$border-left-style,
|
|
139
|
+
),
|
|
140
|
+
$important: defaults.$use-important
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
// For each border width, create a class to apply the border width.
|
|
144
|
+
@each $width, $value in defaults.$border-width-properties {
|
|
145
|
+
// e.g. `.border-thick` or `.border-thin`
|
|
146
|
+
$selector: #{$selector-prefix}#{defaults.$border-width-selector-prefix}#{$width};
|
|
147
|
+
|
|
148
|
+
@include utility.create(
|
|
149
|
+
$selector,
|
|
150
|
+
border-width,
|
|
151
|
+
$value,
|
|
152
|
+
$important: defaults.$use-important
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// For each border style, create a class to apply the border style.
|
|
157
|
+
@each $border-style, $value in defaults.$border-style-properties {
|
|
158
|
+
// e.g. `.border-solid` or `.border-dashed`
|
|
159
|
+
$selector: #{$selector-prefix}#{defaults.$border-style-selector-prefix}#{$border-style};
|
|
160
|
+
|
|
161
|
+
@include utility.create(
|
|
162
|
+
$selector,
|
|
163
|
+
border-style,
|
|
164
|
+
$value,
|
|
165
|
+
$important: defaults.$use-important
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// For each theme colour, create a utility class for border color.
|
|
170
|
+
@each $color, $map in map.get(color.$themes, active) {
|
|
171
|
+
@each $shade, $value in $map {
|
|
172
|
+
// e.g. `.border-primary-100` or `.border-secondary-900`
|
|
173
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$color}-#{$shade};
|
|
174
|
+
|
|
175
|
+
@include utility.create(
|
|
176
|
+
$selector,
|
|
177
|
+
border-color,
|
|
178
|
+
$value,
|
|
179
|
+
$important: defaults.$use-important
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// For each border color, create a utility class for border color.
|
|
185
|
+
@each $name, $value in defaults.$border-color-properties {
|
|
186
|
+
// e.g. `.border-transparent`
|
|
187
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$name};
|
|
188
|
+
|
|
189
|
+
@include utility.create(
|
|
190
|
+
$selector,
|
|
191
|
+
border-color,
|
|
192
|
+
$value,
|
|
193
|
+
$important: defaults.$use-important
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Generate screen-aware utilities.
|
|
198
|
+
@if defaults.$screen-aware and root-defaults.$screen-aware-utilities {
|
|
199
|
+
@each $screen-name in map.keys(root-defaults.$screen-sizes) {
|
|
200
|
+
// e.g. `.md:` or `.lg:`
|
|
201
|
+
$selector-prefix: #{defaults.$selector-base}#{defaults.$screen-aware-selector-prefix}#{$screen-name}#{defaults.$screen-aware-separator};
|
|
202
|
+
|
|
203
|
+
// e.g. `.md:bordered` or `.lg:bordered`
|
|
204
|
+
$selector: #{$selector-prefix}#{defaults.$default-border-selector};
|
|
205
|
+
|
|
206
|
+
// Create a class to apply the default border styling.
|
|
207
|
+
@include utility.create-mapped(
|
|
208
|
+
$selector,
|
|
209
|
+
(
|
|
210
|
+
border-width: root-variables.$border-top-width
|
|
211
|
+
root-variables.$border-right-width
|
|
212
|
+
root-variables.$border-bottom-width
|
|
213
|
+
root-variables.$border-left-width,
|
|
214
|
+
border-radius: root-variables.$border-top-left-radius
|
|
215
|
+
root-variables.$border-top-right-radius
|
|
216
|
+
root-variables.$border-bottom-right-radius
|
|
217
|
+
root-variables.$border-bottom-left-radius,
|
|
218
|
+
border-style: root-variables.$border-top-style
|
|
219
|
+
root-variables.$border-right-style
|
|
220
|
+
root-variables.$border-bottom-style
|
|
221
|
+
root-variables.$border-left-style,
|
|
222
|
+
),
|
|
223
|
+
$important: defaults.$use-important,
|
|
224
|
+
$screen: $screen-name
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
// For each border width, create a class to apply the border width.
|
|
228
|
+
@each $width, $value in defaults.$border-width-properties {
|
|
229
|
+
// e.g. `.md:border-thick` or `.lg:border-thin`
|
|
230
|
+
$selector: #{$selector-prefix}#{defaults.$border-width-selector-prefix}#{$width};
|
|
231
|
+
|
|
232
|
+
@include utility.create(
|
|
233
|
+
$selector,
|
|
234
|
+
border-width,
|
|
235
|
+
$value,
|
|
236
|
+
$important: defaults.$use-important,
|
|
237
|
+
$screen: $screen-name
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// For each border style, create a class to apply the border style.
|
|
242
|
+
@each $border-style, $value in defaults.$border-style-properties {
|
|
243
|
+
// e.g. `.md:border-solid` or `.lg:border-dashed`
|
|
244
|
+
$selector: #{$selector-prefix}#{defaults.$border-style-selector-prefix}#{$border-style};
|
|
245
|
+
|
|
246
|
+
@include utility.create(
|
|
247
|
+
$selector,
|
|
248
|
+
border-style,
|
|
249
|
+
$value,
|
|
250
|
+
$important: defaults.$use-important,
|
|
251
|
+
$screen: $screen-name
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// For each theme colour, create a utility class for border color.
|
|
256
|
+
@each $color, $map in map.get(color.$themes, active) {
|
|
257
|
+
@each $shade, $value in $map {
|
|
258
|
+
// e.g. `.md:border-primary-100` or `.lg:border-secondary-900`
|
|
259
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$color}-#{$shade};
|
|
260
|
+
|
|
261
|
+
@include utility.create(
|
|
262
|
+
$selector,
|
|
263
|
+
border-color,
|
|
264
|
+
$value,
|
|
265
|
+
$important: defaults.$use-important,
|
|
266
|
+
$screen: $screen-name
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// For each border color, create a utility class for border color.
|
|
272
|
+
@each $name, $value in defaults.$border-color-properties {
|
|
273
|
+
// e.g. `.md:border-transparent` or `.lg:border-transparent`
|
|
274
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$name};
|
|
275
|
+
|
|
276
|
+
@include utility.create(
|
|
277
|
+
$selector,
|
|
278
|
+
border-color,
|
|
279
|
+
$value,
|
|
280
|
+
$important: defaults.$use-important,
|
|
281
|
+
$screen: $screen-name
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// Generate theme-aware utilities.
|
|
288
|
+
@if defaults.$theme-aware and root-defaults.$theme-aware-utilities {
|
|
289
|
+
@each $theme-name, $colors in color.$themes {
|
|
290
|
+
@if $theme-name != active {
|
|
291
|
+
// e.g. `.dark:` or `.light:`
|
|
292
|
+
$selector-prefix: #{defaults.$selector-base}#{defaults.$theme-aware-selector-prefix}#{$theme-name}#{defaults.$theme-aware-separator};
|
|
293
|
+
|
|
294
|
+
// e.g. `.dark:bordered` or `.light:bordered`
|
|
295
|
+
$selector: #{$selector-prefix}#{defaults.$default-border-selector};
|
|
296
|
+
|
|
297
|
+
// Create a class to apply the default border styling.
|
|
298
|
+
@include utility.create-mapped(
|
|
299
|
+
$selector,
|
|
300
|
+
(
|
|
301
|
+
border-width: root-variables.$border-top-width
|
|
302
|
+
root-variables.$border-right-width
|
|
303
|
+
root-variables.$border-bottom-width
|
|
304
|
+
root-variables.$border-left-width,
|
|
305
|
+
border-radius: root-variables.$border-top-left-radius
|
|
306
|
+
root-variables.$border-top-right-radius
|
|
307
|
+
root-variables.$border-bottom-right-radius
|
|
308
|
+
root-variables.$border-bottom-left-radius,
|
|
309
|
+
border-style: root-variables.$border-top-style
|
|
310
|
+
root-variables.$border-right-style
|
|
311
|
+
root-variables.$border-bottom-style
|
|
312
|
+
root-variables.$border-left-style,
|
|
313
|
+
),
|
|
314
|
+
$important: defaults.$use-important,
|
|
315
|
+
$theme: $theme-name
|
|
316
|
+
);
|
|
317
|
+
|
|
318
|
+
// For each border width, create a class to apply the border width.
|
|
319
|
+
@each $width, $value in defaults.$border-width-properties {
|
|
320
|
+
// e.g. `.dark:border-thick` or `.light:border-thin`
|
|
321
|
+
$selector: #{$selector-prefix}#{defaults.$border-width-selector-prefix}#{$width};
|
|
322
|
+
|
|
323
|
+
@include utility.create(
|
|
324
|
+
$selector,
|
|
325
|
+
border-width,
|
|
326
|
+
$value,
|
|
327
|
+
$important: defaults.$use-important,
|
|
328
|
+
$theme: $theme-name
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// For each border style, create a class to apply the border style.
|
|
333
|
+
@each $border-style, $value in defaults.$border-style-properties {
|
|
334
|
+
// e.g. `.dark:border-solid` or `.light:border-dashed`
|
|
335
|
+
$selector: #{$selector-prefix}#{defaults.$border-style-selector-prefix}#{$border-style};
|
|
336
|
+
|
|
337
|
+
@include utility.create(
|
|
338
|
+
$selector,
|
|
339
|
+
border-style,
|
|
340
|
+
$value,
|
|
341
|
+
$important: defaults.$use-important,
|
|
342
|
+
$theme: $theme-name
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// For each theme colour, create a utility class for border color.
|
|
347
|
+
@each $color, $map in map.get(color.$themes, active) {
|
|
348
|
+
@each $shade, $value in $map {
|
|
349
|
+
// e.g. `.dark:border-primary-100` or `.light:border-secondary-900`
|
|
350
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$color}-#{$shade};
|
|
351
|
+
|
|
352
|
+
@include utility.create(
|
|
353
|
+
$selector,
|
|
354
|
+
border-color,
|
|
355
|
+
$value,
|
|
356
|
+
$important: defaults.$use-important,
|
|
357
|
+
$theme: $theme-name
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// For each border color, create a utility class for border color.
|
|
363
|
+
@each $name, $value in defaults.$border-color-properties {
|
|
364
|
+
// e.g. `.dark:border-transparent` or `.light:border-transparent`
|
|
365
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$name};
|
|
366
|
+
|
|
367
|
+
@include utility.create(
|
|
368
|
+
$selector,
|
|
369
|
+
border-color,
|
|
370
|
+
$value,
|
|
371
|
+
$important: defaults.$use-important,
|
|
372
|
+
$theme: $theme-name
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// Generate state-aware utilities.
|
|
380
|
+
@if defaults.$state-aware and root-defaults.$state-aware-utilities {
|
|
381
|
+
@each $state-name, $value in root-defaults.$state-selectors {
|
|
382
|
+
// e.g. `.hover:` or `.focus:`
|
|
383
|
+
$selector-prefix: #{defaults.$selector-base}#{defaults.$state-aware-selector-prefix}#{$state-name}#{defaults.$state-aware-separator};
|
|
384
|
+
|
|
385
|
+
// e.g. `.hover:bordered` or `.focus:bordered`
|
|
386
|
+
$selector: #{$selector-prefix}#{defaults.$default-border-selector};
|
|
387
|
+
|
|
388
|
+
// Create a class to apply the default border styling.
|
|
389
|
+
@include utility.create-mapped(
|
|
390
|
+
$selector,
|
|
391
|
+
(
|
|
392
|
+
border-width: root-variables.$border-top-width
|
|
393
|
+
root-variables.$border-right-width
|
|
394
|
+
root-variables.$border-bottom-width
|
|
395
|
+
root-variables.$border-left-width,
|
|
396
|
+
border-radius: root-variables.$border-top-left-radius
|
|
397
|
+
root-variables.$border-top-right-radius
|
|
398
|
+
root-variables.$border-bottom-right-radius
|
|
399
|
+
root-variables.$border-bottom-left-radius,
|
|
400
|
+
border-style: root-variables.$border-top-style
|
|
401
|
+
root-variables.$border-right-style
|
|
402
|
+
root-variables.$border-bottom-style
|
|
403
|
+
root-variables.$border-left-style,
|
|
404
|
+
),
|
|
405
|
+
$important: defaults.$use-important,
|
|
406
|
+
$state: $state-name
|
|
407
|
+
);
|
|
408
|
+
|
|
409
|
+
// For each border width, create a class to apply the border width.
|
|
410
|
+
@each $width, $value in defaults.$border-width-properties {
|
|
411
|
+
// e.g. `.hover:border-thick` or `.focus:border-thin`
|
|
412
|
+
$selector: #{$selector-prefix}#{defaults.$border-width-selector-prefix}#{$width};
|
|
413
|
+
|
|
414
|
+
@include utility.create(
|
|
415
|
+
$selector,
|
|
416
|
+
border-width,
|
|
417
|
+
$value,
|
|
418
|
+
$important: defaults.$use-important,
|
|
419
|
+
$state: $state-name
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// For each border style, create a class to apply the border style.
|
|
424
|
+
@each $border-style, $value in defaults.$border-style-properties {
|
|
425
|
+
// e.g. `.hover:border-solid` or `.focus:border-dashed`
|
|
426
|
+
$selector: #{$selector-prefix}#{defaults.$border-style-selector-prefix}#{$border-style};
|
|
427
|
+
|
|
428
|
+
@include utility.create(
|
|
429
|
+
$selector,
|
|
430
|
+
border-style,
|
|
431
|
+
$value,
|
|
432
|
+
$important: defaults.$use-important,
|
|
433
|
+
$state: $state-name
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// For each theme colour, create a utility class for border color.
|
|
438
|
+
@each $color, $map in map.get(color.$themes, active) {
|
|
439
|
+
@each $shade, $value in $map {
|
|
440
|
+
// e.g. `.hover:border-primary-100` or `.focus:border-secondary-900`
|
|
441
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$color}-#{$shade};
|
|
442
|
+
|
|
443
|
+
@include utility.create(
|
|
444
|
+
$selector,
|
|
445
|
+
border-color,
|
|
446
|
+
$value,
|
|
447
|
+
$important: defaults.$use-important,
|
|
448
|
+
$state: $state-name
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// For each border color, create a utility class for border color.
|
|
454
|
+
@each $name, $value in defaults.$border-color-properties {
|
|
455
|
+
// e.g. `.hover:border-transparent` or `.focus:border-transparent`
|
|
456
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$name};
|
|
457
|
+
|
|
458
|
+
@include utility.create(
|
|
459
|
+
$selector,
|
|
460
|
+
border-color,
|
|
461
|
+
$value,
|
|
462
|
+
$important: defaults.$use-important,
|
|
463
|
+
$state: $state-name
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// Generate container-aware utilities.
|
|
470
|
+
@if defaults.$container-aware and root-defaults.$container-aware-utilities {
|
|
471
|
+
@each $container-name in map.keys(root-defaults.$container-sizes) {
|
|
472
|
+
// e.g. `.md:` or `.lg:`
|
|
473
|
+
$selector-prefix: #{defaults.$selector-base}#{defaults.$container-aware-selector-prefix}#{$container-name}#{defaults.$container-aware-separator};
|
|
474
|
+
|
|
475
|
+
// e.g. `.md:bordered` or `.lg:bordered`
|
|
476
|
+
$selector: #{$selector-prefix}#{defaults.$default-border-selector};
|
|
477
|
+
|
|
478
|
+
// Create a class to apply the default border styling.
|
|
479
|
+
@include utility.create-mapped(
|
|
480
|
+
$selector,
|
|
481
|
+
(
|
|
482
|
+
border-width: root-variables.$border-top-width
|
|
483
|
+
root-variables.$border-right-width
|
|
484
|
+
root-variables.$border-bottom-width
|
|
485
|
+
root-variables.$border-left-width,
|
|
486
|
+
border-radius: root-variables.$border-top-left-radius
|
|
487
|
+
root-variables.$border-top-right-radius
|
|
488
|
+
root-variables.$border-bottom-right-radius
|
|
489
|
+
root-variables.$border-bottom-left-radius,
|
|
490
|
+
border-style: root-variables.$border-top-style
|
|
491
|
+
root-variables.$border-right-style
|
|
492
|
+
root-variables.$border-bottom-style
|
|
493
|
+
root-variables.$border-left-style,
|
|
494
|
+
),
|
|
495
|
+
$important: defaults.$use-important,
|
|
496
|
+
$container: $container-name
|
|
497
|
+
);
|
|
498
|
+
|
|
499
|
+
// For each border width, create a class to apply the border width.
|
|
500
|
+
@each $width, $value in defaults.$border-width-properties {
|
|
501
|
+
// e.g. `.md:border-thick` or `.lg:border-thin`
|
|
502
|
+
$selector: #{$selector-prefix}#{defaults.$border-width-selector-prefix}#{$width};
|
|
503
|
+
|
|
504
|
+
@include utility.create(
|
|
505
|
+
$selector,
|
|
506
|
+
border-width,
|
|
507
|
+
$value,
|
|
508
|
+
$important: defaults.$use-important,
|
|
509
|
+
$container: $container-name
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// For each border style, create a class to apply the border style.
|
|
514
|
+
@each $border-style, $value in defaults.$border-style-properties {
|
|
515
|
+
// e.g. `.md:border-solid` or `.lg:border-dashed`
|
|
516
|
+
$selector: #{$selector-prefix}#{defaults.$border-style-selector-prefix}#{$border-style};
|
|
517
|
+
|
|
518
|
+
@include utility.create(
|
|
519
|
+
$selector,
|
|
520
|
+
border-style,
|
|
521
|
+
$value,
|
|
522
|
+
$important: defaults.$use-important,
|
|
523
|
+
$container: $container-name
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// For each theme colour, create a utility class for border color.
|
|
528
|
+
@each $color, $map in map.get(color.$themes, active) {
|
|
529
|
+
@each $shade, $value in $map {
|
|
530
|
+
// e.g. `.md:border-primary-100` or `.lg:border-secondary-900`
|
|
531
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$color}-#{$shade};
|
|
532
|
+
|
|
533
|
+
@include utility.create(
|
|
534
|
+
$selector,
|
|
535
|
+
border-color,
|
|
536
|
+
$value,
|
|
537
|
+
$important: defaults.$use-important,
|
|
538
|
+
$container: $container-name
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// For each border color, create a utility class for border color.
|
|
544
|
+
@each $name, $value in defaults.$border-color-properties {
|
|
545
|
+
// e.g. `.md:border-transparent` or `.lg:border-transparent`
|
|
546
|
+
$selector: #{$selector-prefix}#{defaults.$border-color-selector-prefix}#{$name};
|
|
547
|
+
|
|
548
|
+
@include utility.create(
|
|
549
|
+
$selector,
|
|
550
|
+
border-color,
|
|
551
|
+
$value,
|
|
552
|
+
$important: defaults.$use-important,
|
|
553
|
+
$container: $container-name
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// @graupl/core color 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 "../../defaults" as root-defaults;
|
|
10
|
+
@use "sass:map";
|
|
11
|
+
|
|
12
|
+
// Utility modifiers.
|
|
13
|
+
$selector-base: root-defaults.$utility-selector-base !default;
|
|
14
|
+
$use-important: root-defaults.$use-important !default;
|
|
15
|
+
$screen-aware: false !default;
|
|
16
|
+
$theme-aware: true !default;
|
|
17
|
+
$state-aware: true !default;
|
|
18
|
+
$container-aware: false !default;
|
|
19
|
+
$screen-aware-separator: root-defaults.$utility-screen-aware-separator !default;
|
|
20
|
+
$theme-aware-separator: root-defaults.$utility-theme-aware-separator !default;
|
|
21
|
+
$state-aware-separator: root-defaults.$utility-state-aware-separator !default;
|
|
22
|
+
$container-aware-separator: root-defaults.$utility-container-aware-separator !default;
|
|
23
|
+
$screen-aware-selector-prefix: root-defaults.$utility-screen-aware-selector-prefix !default;
|
|
24
|
+
$theme-aware-selector-prefix: root-defaults.$utility-theme-aware-selector-prefix !default;
|
|
25
|
+
$state-aware-selector-prefix: root-defaults.$utility-state-aware-selector-prefix !default;
|
|
26
|
+
$container-aware-selector-prefix: root-defaults.$utility-container-aware-selector-prefix !default;
|
|
27
|
+
|
|
28
|
+
// Background utility properties.
|
|
29
|
+
$background-selector-prefix: "bg-" !default;
|
|
30
|
+
$base-background-properties: (
|
|
31
|
+
inherit: inherit,
|
|
32
|
+
current: currentcolor,
|
|
33
|
+
transparent: transparent,
|
|
34
|
+
);
|
|
35
|
+
$custom-background-properties: () !default;
|
|
36
|
+
$background-properties: map.merge(
|
|
37
|
+
$base-background-properties,
|
|
38
|
+
$custom-background-properties
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
// Text utility properties.
|
|
42
|
+
$text-selector-prefix: "text-" !default;
|
|
43
|
+
$base-text-properties: (
|
|
44
|
+
inherit: inherit,
|
|
45
|
+
current: currentcolor,
|
|
46
|
+
transparent: transparent,
|
|
47
|
+
);
|
|
48
|
+
$custom-text-properties: () !default;
|
|
49
|
+
$text-properties: map.merge($base-text-properties, $custom-text-properties);
|