@birdycom/omniacss 0.0.0-stage → 0.11.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/LICENSE +21 -0
- package/README.md +43 -2
- package/dist/oc-colors.css +4429 -0
- package/dist/oc-theme.css +69 -0
- package/dist/omnia.css +465435 -0
- package/dist/omnia.min.css +2 -0
- package/dist/omnia.starter.css +13459 -0
- package/dist/omnia.starter.min.css +1 -0
- package/dist/tokens/omnia.dtcg.json +1496 -0
- package/dist/tokens/omnia.tokens.json +580 -0
- package/dist/tokens/omnia_tokens.py +189 -0
- package/package.json +61 -4
- package/scss/base/_reset.scss +88 -0
- package/scss/config/omniacss.config.scss +114 -0
- package/scss/config/omniacss.fonts.scss +34 -0
- package/scss/functions/_functions.scss +407 -0
- package/scss/json/html-colors.json +1998 -0
- package/scss/json/omnia-colors.json +500 -0
- package/scss/json/ral-colors.json +3430 -0
- package/scss/layout/_media_query.scss +18 -0
- package/scss/omnia_colors.scss +7 -0
- package/scss/omnia_main.scss +143 -0
- package/scss/profiles/omnia_main.hsl.scss +12 -0
- package/scss/profiles/omnia_main.oklab.scss +12 -0
- package/scss/profiles/omnia_main.oklch.scss +12 -0
- package/scss/utilities/_accessibility.scss +42 -0
- package/scss/utilities/_alignment.scss +861 -0
- package/scss/utilities/_anchor_positioning.scss +65 -0
- package/scss/utilities/_animation_properties.scss +143 -0
- package/scss/utilities/_aspect.scss +73 -0
- package/scss/utilities/_backgrounds.scss +49 -0
- package/scss/utilities/_borders_extended.scss +97 -0
- package/scss/utilities/_borders_outlines.scss +161 -0
- package/scss/utilities/_clamp.scss +111 -0
- package/scss/utilities/_colors_html.scss +341 -0
- package/scss/utilities/_colors_mix.scss +84 -0
- package/scss/utilities/_colors_omnia.scss +315 -0
- package/scss/utilities/_colors_ral.scss +151 -0
- package/scss/utilities/_colors_tokens.scss +87 -0
- package/scss/utilities/_container.scss +58 -0
- package/scss/utilities/_containment.scss +82 -0
- package/scss/utilities/_corner_shape.scss +30 -0
- package/scss/utilities/_css_functions.scss +34 -0
- package/scss/utilities/_dark_mode.scss +117 -0
- package/scss/utilities/_display.scss +58 -0
- package/scss/utilities/_drop_shadow_colors.scss +26 -0
- package/scss/utilities/_effects.scss +50 -0
- package/scss/utilities/_effects_advanced.scss +102 -0
- package/scss/utilities/_experimental_css.scss +149 -0
- package/scss/utilities/_filters.scss +89 -0
- package/scss/utilities/_flexbox.scss +318 -0
- package/scss/utilities/_font_variants.scss +139 -0
- package/scss/utilities/_fonts.scss +276 -0
- package/scss/utilities/_gap.scss +104 -0
- package/scss/utilities/_gradient_stops.scss +48 -0
- package/scss/utilities/_gradients.scss +99 -0
- package/scss/utilities/_grid.scss +673 -0
- package/scss/utilities/_index.scss +22 -0
- package/scss/utilities/_interactivity.scss +198 -0
- package/scss/utilities/_layering.scss +24 -0
- package/scss/utilities/_layout_extras.scss +171 -0
- package/scss/utilities/_layout_flow.scss +210 -0
- package/scss/utilities/_mask_extras.scss +62 -0
- package/scss/utilities/_motion_transforms.scss +167 -0
- package/scss/utilities/_overflow.scss +41 -0
- package/scss/utilities/_position.scss +49 -0
- package/scss/utilities/_responsive.scss +272 -0
- package/scss/utilities/_scroll_animations.scss +80 -0
- package/scss/utilities/_scroll_spacing.scss +33 -0
- package/scss/utilities/_scrollbar.scss +49 -0
- package/scss/utilities/_shadow_tokens.scss +21 -0
- package/scss/utilities/_shapes.scss +72 -0
- package/scss/utilities/_sizing.scss +458 -0
- package/scss/utilities/_sizing_logical.scss +99 -0
- package/scss/utilities/_space_divide.scss +85 -0
- package/scss/utilities/_spacing_margin.scss +199 -0
- package/scss/utilities/_spacing_padding.scss +195 -0
- package/scss/utilities/_starting_style.scss +53 -0
- package/scss/utilities/_state_variants.scss +196 -0
- package/scss/utilities/_svg.scss +100 -0
- package/scss/utilities/_table.scss +46 -0
- package/scss/utilities/_table_advanced.scss +19 -0
- package/scss/utilities/_text.scss +1331 -0
- package/scss/utilities/_transforms_3d.scss +76 -0
- package/scss/utilities/_typography_advanced.scss +124 -0
- package/scss/utilities/_typography_modern.scss +83 -0
- package/scss/utilities/_view_transitions.scss +64 -0
- package/scss/utilities/_writing_modes.scss +72 -0
- package/scss/variables/_color_tone.scss +39 -0
- package/scss/variables/_hulp.scss +108 -0
- package/scss/variables/_mixins.scss +40 -0
- package/scss/variables/_modifiers.scss +32 -0
- package/scss/variables/_variables.scss +302 -0
- package/scss/variables/_variables_colors_html.scss +2019 -0
- package/scss/variables/_variables_colors_omnia.scss +465 -0
- package/scss/variables/_variables_colors_ral.scss +3472 -0
- package/scss/variables/_variables_effects.scss +109 -0
- package/scss/variables/_variables_flex_grid.scss +427 -0
- package/scss/variables/_variables_layout.scss +591 -0
- package/scss/variables/_variables_typography.scss +550 -0
- package/src/engine.mjs +258 -0
- package/src/postcss.mjs +43 -0
- package/src/starter-classes.mjs +124 -0
- package/src/tokens.mjs +377 -0
- package/src/variants.mjs +278 -0
- package/tokens/semantic.json +80 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// SCSS Document
|
|
2
|
+
// File: src/scss/utilities/_space_divide.scss
|
|
3
|
+
// Description: Space and divide between children — .space-x/y-{n} (gap via margin) and .divide-x/y (rule between children),
|
|
4
|
+
// both with a *-reverse switch for reversed flex rows/columns.
|
|
5
|
+
// Copyright: 2021-2026 Birdycom
|
|
6
|
+
// Author: Serge Cools
|
|
7
|
+
// Version: 0.4.0
|
|
8
|
+
// Framework: OmniaCSS
|
|
9
|
+
// Purpose: Generate .space-x-{n}, .space-y-{n}, .space-x-reverse, .space-y-reverse, .divide-x[-{w}], .divide-y[-{w}],
|
|
10
|
+
// .divide-x-reverse, .divide-y-reverse, .divide-{solid|dashed|dotted|double|none}, .divide-current,
|
|
11
|
+
// .divide-transparent and .divide-{omnia color}.
|
|
12
|
+
// Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline
|
|
13
|
+
// Note: Logical properties, so rows follow the writing direction (RTL included). Prefer .gap-* in flex/grid layouts;
|
|
14
|
+
// use these for block flow, lists and reversed flex containers.
|
|
15
|
+
// Map: space scale -> space-x/y -> reverse -> divide width -> divide style -> divide color
|
|
16
|
+
|
|
17
|
+
@use "sass:string";
|
|
18
|
+
@use "sass:map";
|
|
19
|
+
@use '../utilities/' as *;
|
|
20
|
+
|
|
21
|
+
$_space-scale: (0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16);
|
|
22
|
+
$_between: '> :not([hidden]) ~ :not([hidden])';
|
|
23
|
+
|
|
24
|
+
/* Space between children: margin on every child except the first */
|
|
25
|
+
@each $n in $_space-scale {
|
|
26
|
+
$v: #{$n * 0.25}rem;
|
|
27
|
+
@if $n == 0 { $v: 0; }
|
|
28
|
+
.space-x-#{$n} #{$_between} {
|
|
29
|
+
margin-inline-start: calc(#{$v} * (1 - var(--oc-space-x-reverse, 0)));
|
|
30
|
+
margin-inline-end: calc(#{$v} * var(--oc-space-x-reverse, 0));
|
|
31
|
+
}
|
|
32
|
+
.space-y-#{$n} #{$_between} {
|
|
33
|
+
margin-block-start: calc(#{$v} * (1 - var(--oc-space-y-reverse, 0)));
|
|
34
|
+
margin-block-end: calc(#{$v} * var(--oc-space-y-reverse, 0));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.space-x-px #{$_between} {
|
|
38
|
+
margin-inline-start: calc(1px * (1 - var(--oc-space-x-reverse, 0)));
|
|
39
|
+
margin-inline-end: calc(1px * var(--oc-space-x-reverse, 0));
|
|
40
|
+
}
|
|
41
|
+
.space-y-px #{$_between} {
|
|
42
|
+
margin-block-start: calc(1px * (1 - var(--oc-space-y-reverse, 0)));
|
|
43
|
+
margin-block-end: calc(1px * var(--oc-space-y-reverse, 0));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Reverse: use with flex-row-reverse / flex-col-reverse so the space stays between the children */
|
|
47
|
+
.space-x-reverse #{$_between} { --oc-space-x-reverse: 1; }
|
|
48
|
+
.space-y-reverse #{$_between} { --oc-space-y-reverse: 1; }
|
|
49
|
+
|
|
50
|
+
/* Divide: a rule between the children (default width 1px, solid, 20% of the text color) */
|
|
51
|
+
@each $axis, $start, $end in ('x', 'inline-start', 'inline-end'), ('y', 'block-start', 'block-end') {
|
|
52
|
+
$axis-name: block;
|
|
53
|
+
@if $axis == 'x' { $axis-name: inline; }
|
|
54
|
+
.divide-#{$axis} #{$_between} {
|
|
55
|
+
border-#{$axis-name}-style: var(--oc-divide-style, solid);
|
|
56
|
+
border-#{$axis-name}-color: var(--oc-divide-color, color-mix(in oklab, currentcolor 20%, transparent));
|
|
57
|
+
border-#{$start}-width: calc(1px * (1 - var(--oc-divide-#{$axis}-reverse, 0)));
|
|
58
|
+
border-#{$end}-width: calc(1px * var(--oc-divide-#{$axis}-reverse, 0));
|
|
59
|
+
}
|
|
60
|
+
@each $w in (0, 2, 4, 8) {
|
|
61
|
+
.divide-#{$axis}-#{$w} #{$_between} {
|
|
62
|
+
border-#{$axis-name}-style: var(--oc-divide-style, solid);
|
|
63
|
+
border-#{$axis-name}-color: var(--oc-divide-color, color-mix(in oklab, currentcolor 20%, transparent));
|
|
64
|
+
border-#{$start}-width: calc(#{$w}px * (1 - var(--oc-divide-#{$axis}-reverse, 0)));
|
|
65
|
+
border-#{$end}-width: calc(#{$w}px * var(--oc-divide-#{$axis}-reverse, 0));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
.divide-#{$axis}-reverse #{$_between} { --oc-divide-#{$axis}-reverse: 1; }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Divide style and color are set on the container and inherited by the children */
|
|
72
|
+
@each $style in (solid, dashed, dotted, double) {
|
|
73
|
+
.divide-#{$style} { --oc-divide-style: #{$style}; }
|
|
74
|
+
}
|
|
75
|
+
.divide-none { --oc-divide-style: none; }
|
|
76
|
+
.divide-current { --oc-divide-color: currentcolor; }
|
|
77
|
+
.divide-transparent { --oc-divide-color: transparent; }
|
|
78
|
+
|
|
79
|
+
@each $group, $families in $omnia-colors {
|
|
80
|
+
@each $family, $colors in $families {
|
|
81
|
+
@each $color, $props in $colors {
|
|
82
|
+
.divide-#{string.to-lower-case(#{$color})} { --oc-divide-color: var(--color-#{string.to-lower-case(#{$color})}-50); }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// SCSS Document
|
|
2
|
+
// File: src/utilities/_spacing_margin.scss
|
|
3
|
+
// Description: margin properties
|
|
4
|
+
// Copyright: 2021-2022 Birdycom
|
|
5
|
+
// Autor: Serge Cools
|
|
6
|
+
// Version: 0.2.0
|
|
7
|
+
// Framework: OmniaCSS
|
|
8
|
+
// Properties: margin, margin-inline, margin-inline-start, margin-inline-end, margin-block, margin-block-start, margin-block-end
|
|
9
|
+
// Values: value in rem, auto
|
|
10
|
+
|
|
11
|
+
@use "sass:string";
|
|
12
|
+
@use "sass:map";
|
|
13
|
+
@use '../utilities/' as *;
|
|
14
|
+
|
|
15
|
+
/* The Margin property */
|
|
16
|
+
|
|
17
|
+
// loop true the $sizes list and make the new css-elements
|
|
18
|
+
// $sizesrem-prop is the first set from the list-item ( "size-1" ), the text before the :-sign
|
|
19
|
+
// $sizesrem-value is the second set from the list item ( $base-size * 0.125 ), the text after the :-sign
|
|
20
|
+
|
|
21
|
+
/* The Margin property */
|
|
22
|
+
|
|
23
|
+
///
|
|
24
|
+
/// The position property specifies the type of positioning method used for an element.
|
|
25
|
+
/// @group Margin
|
|
26
|
+
/// @name margin
|
|
27
|
+
/// @link src/scss/utilities/_spacing_margin.scss
|
|
28
|
+
/// @since 1.0.0
|
|
29
|
+
/// @author Serge Cools
|
|
30
|
+
///
|
|
31
|
+
/// To use on `<p>`, `<ul>`, `<ol>`, `<pre>`, `<table>`, `<blockquote>`, etc.
|
|
32
|
+
///
|
|
33
|
+
/// Outputs `margin-top` and `margin-bottom`.
|
|
34
|
+
///
|
|
35
|
+
/// Applies to: all elements, except elements with table display types other than table-caption, table and inline-table. It also applies to ::first-letter and ::first-line.
|
|
36
|
+
///
|
|
37
|
+
/// @example scss - margin class
|
|
38
|
+
/// $min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
39
|
+
/// $run: 0;
|
|
40
|
+
/// @while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
|
|
41
|
+
/// $result: omnia-generate-sizing($min-group, 'margin', true, $run);
|
|
42
|
+
/// $min-group: map.get($result,1);
|
|
43
|
+
/// $run: map.get($result,6);
|
|
44
|
+
/// .#{string.slice(map.get($result,5),1,1)}-#{map.get($result,2)} {
|
|
45
|
+
/// #{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
|
|
46
|
+
/// }
|
|
47
|
+
/// .#{string.slice(map.get($result,5),1,1)+'t'}-#{map.get($result,2)} {
|
|
48
|
+
/// #{map.get($result,5)+'-top'} : map.get($result,3) + #{map.get($result,4)}
|
|
49
|
+
/// }
|
|
50
|
+
/// .#{string.slice(map.get($result,5),1,1)+'r'}-#{map.get($result,2)} {
|
|
51
|
+
/// #{map.get($result,5)+'-right'} : map.get($result,3) + #{map.get($result,4)}
|
|
52
|
+
/// }
|
|
53
|
+
/// .#{string.slice(map.get($result,5),1,1)+'b'}-#{map.get($result,2)} {
|
|
54
|
+
/// #{map.get($result,5)+'-bottom'} : map.get($result,3) + #{map.get($result,4)}
|
|
55
|
+
/// }
|
|
56
|
+
/// .#{string.slice(map.get($result,5),1,1)+'l'}-#{map.get($result,2)} {
|
|
57
|
+
/// #{map.get($result,5)+'-left'} : map.get($result,3) + #{map.get($result,4)}
|
|
58
|
+
/// }
|
|
59
|
+
/// .#{string.slice(map.get($result,5),1,1)+'h'}-#{map.get($result,2)} {
|
|
60
|
+
/// #{map.get($result,5)+'-right'} : map.get($result,3) + #{map.get($result,4)};
|
|
61
|
+
/// #{map.get($result,5)+'-left'} : map.get($result,3) + #{map.get($result,4)}
|
|
62
|
+
/// }
|
|
63
|
+
/// .#{string.slice(map.get($result,5),1,1)+'v'}-#{map.get($result,2)} {
|
|
64
|
+
/// #{map.get($result,5)+'-top'} : map.get($result,3) + #{map.get($result,4)};
|
|
65
|
+
/// #{map.get($result,5)+'-bottom'} : map.get($result,3) + #{map.get($result,4)}
|
|
66
|
+
/// }
|
|
67
|
+
/// };
|
|
68
|
+
/// @example html - use the margin-top class
|
|
69
|
+
/// <div class="container mt-5">
|
|
70
|
+
/// <h2>Voorbeeld set margin top with a lenght of 5rem</h2>
|
|
71
|
+
/// </div>
|
|
72
|
+
//
|
|
73
|
+
$min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
74
|
+
$run: 0;
|
|
75
|
+
@while $min-group <= $SPACING-SECOND-MAX-GROUP {
|
|
76
|
+
|
|
77
|
+
$result: omnia-generate-sizing($min-group, 'margin', true, $run);
|
|
78
|
+
|
|
79
|
+
$min-group: map.get($result,1);
|
|
80
|
+
$run: map.get($result,6);
|
|
81
|
+
// margin
|
|
82
|
+
.#{string.slice(map.get($result,5),1,1)}-#{map.get($result,2)} {
|
|
83
|
+
|
|
84
|
+
#{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
// margin-top
|
|
88
|
+
.#{string.slice(map.get($result,5),1,1)+'t'}-#{map.get($result,2)} {
|
|
89
|
+
|
|
90
|
+
#{map.get($result,5)+'-top'} : map.get($result,3) + #{map.get($result,4)}
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
// margin-right
|
|
94
|
+
.#{string.slice(map.get($result,5),1,1)+'r'}-#{map.get($result,2)} {
|
|
95
|
+
|
|
96
|
+
#{map.get($result,5)+'-right'} : map.get($result,3) + #{map.get($result,4)}
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
// margin-bottom
|
|
100
|
+
.#{string.slice(map.get($result,5),1,1)+'b'}-#{map.get($result,2)} {
|
|
101
|
+
|
|
102
|
+
#{map.get($result,5)+'-bottom'} : map.get($result,3) + #{map.get($result,4)}
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
// margin-left
|
|
106
|
+
.#{string.slice(map.get($result,5),1,1)+'l'}-#{map.get($result,2)} {
|
|
107
|
+
|
|
108
|
+
#{map.get($result,5)+'-left'} : map.get($result,3) + #{map.get($result,4)}
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
// margin horizontal
|
|
112
|
+
.#{string.slice(map.get($result,5),1,1)+'h'}-#{map.get($result,2)} {
|
|
113
|
+
|
|
114
|
+
#{map.get($result,5)+'-right'} : map.get($result,3) + #{map.get($result,4)};
|
|
115
|
+
#{map.get($result,5)+'-left'} : map.get($result,3) + #{map.get($result,4)}
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
// margin vertical
|
|
119
|
+
.#{string.slice(map.get($result,5),1,1)+'v'}-#{map.get($result,2)} {
|
|
120
|
+
|
|
121
|
+
#{map.get($result,5)+'-top'} : map.get($result,3) + #{map.get($result,4)};
|
|
122
|
+
#{map.get($result,5)+'-bottom'} : map.get($result,3) + #{map.get($result,4)}
|
|
123
|
+
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// margin new version CSS
|
|
128
|
+
///
|
|
129
|
+
/// The position property specifies the type of positioning method used for an element.
|
|
130
|
+
/// @group Margin
|
|
131
|
+
/// @name margin inline, inline-start, inline-end, block, block-start, block-end
|
|
132
|
+
/// @link src/scss/utilities/_spacing_margin.scss
|
|
133
|
+
/// @since 1.0.0
|
|
134
|
+
/// @author Serge Cools
|
|
135
|
+
///
|
|
136
|
+
/// Applies to: all elements, except elements with table display types other than table-caption, table and inline-table. It also applies to ::first-letter and ::first-line.
|
|
137
|
+
///
|
|
138
|
+
/// @require $sides -inline, inline-start, inline-end, block, block-start, block-end
|
|
139
|
+
///
|
|
140
|
+
/// @example scss - margin-inline class
|
|
141
|
+
/// $min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
142
|
+
/// $run: 0;
|
|
143
|
+
/// @while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
|
|
144
|
+
/// $result: omnia-generate-sizing($min-group, 'margin', true, $run);
|
|
145
|
+
/// $min-group: map.get($result,1);
|
|
146
|
+
/// $run: map.get($result,6);
|
|
147
|
+
/// @each $sides-prop in $sides {
|
|
148
|
+
/// .#{string.slice(map.get($result,5),1,1)}-#{$sides-prop}-#{map.get($result,2)} {
|
|
149
|
+
/// #{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
|
|
150
|
+
/// }
|
|
151
|
+
/// }
|
|
152
|
+
/// };
|
|
153
|
+
/// @example html - use the padding class
|
|
154
|
+
/// <div class="container p-5">
|
|
155
|
+
/// <h2>Voorbeeld padding p-5 </h2>
|
|
156
|
+
/// </div>
|
|
157
|
+
//
|
|
158
|
+
$min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
159
|
+
$run: 0;
|
|
160
|
+
@while $min-group <= $SPACING-SECOND-MAX-GROUP {
|
|
161
|
+
|
|
162
|
+
$result: omnia-generate-sizing($min-group, 'margin', true, $run);
|
|
163
|
+
|
|
164
|
+
$min-group: map.get($result,1);
|
|
165
|
+
$run: map.get($result,6);
|
|
166
|
+
|
|
167
|
+
@each $sides-prop in $sides {
|
|
168
|
+
|
|
169
|
+
.#{string.slice(map.get($result,5),1,1)}-#{$sides-prop}-#{map.get($result,2)} {
|
|
170
|
+
|
|
171
|
+
#{map.get($result,5)}-#{$sides-prop}: map.get($result,3) + #{map.get($result,4)}
|
|
172
|
+
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/* Margin with var(--spacing): .m-var-0 … .m-var-10 (value = calc(var(--spacing) * n)). Uses same --spacing as padding. */
|
|
179
|
+
@for $n from 0 through 10 {
|
|
180
|
+
@if $n == 0 {
|
|
181
|
+
.m-var-0 { margin: 0; }
|
|
182
|
+
.mt-var-0 { margin-top: 0; }
|
|
183
|
+
.mr-var-0 { margin-right: 0; }
|
|
184
|
+
.mb-var-0 { margin-bottom: 0; }
|
|
185
|
+
.ml-var-0 { margin-left: 0; }
|
|
186
|
+
.mh-var-0 { margin-left: 0; margin-right: 0; }
|
|
187
|
+
.mv-var-0 { margin-top: 0; margin-bottom: 0; }
|
|
188
|
+
} @else {
|
|
189
|
+
.m-var-#{$n} { margin: calc(var(--spacing) * #{$n}); }
|
|
190
|
+
.mt-var-#{$n} { margin-top: calc(var(--spacing) * #{$n}); }
|
|
191
|
+
.mr-var-#{$n} { margin-right: calc(var(--spacing) * #{$n}); }
|
|
192
|
+
.mb-var-#{$n} { margin-bottom: calc(var(--spacing) * #{$n}); }
|
|
193
|
+
.ml-var-#{$n} { margin-left: calc(var(--spacing) * #{$n}); }
|
|
194
|
+
.mh-var-#{$n} { margin-left: calc(var(--spacing) * #{$n}); margin-right: calc(var(--spacing) * #{$n}); }
|
|
195
|
+
.mv-var-#{$n} { margin-top: calc(var(--spacing) * #{$n}); margin-bottom: calc(var(--spacing) * #{$n}); }
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* End Margin property */
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// SCSS Document
|
|
2
|
+
// File: src/utilities/_spacing_padding.scss
|
|
3
|
+
// Description: Padding properties
|
|
4
|
+
// Copyright: 2021-2022 Birdycom
|
|
5
|
+
// Autor: Serge Cools
|
|
6
|
+
// Version: 0.2.0
|
|
7
|
+
// Framework: OmniaCSS
|
|
8
|
+
// Properties: padding, padding-inline, padding-inline-start, padding-inline-end, padding-block, padding-block-start, padding-block-end
|
|
9
|
+
// Values: value in rem, auto
|
|
10
|
+
|
|
11
|
+
@use "sass:string";
|
|
12
|
+
@use "sass:map";
|
|
13
|
+
@use '../utilities/' as *;
|
|
14
|
+
|
|
15
|
+
// loop true the $sizes list and make the new css-elements
|
|
16
|
+
// $sizesrem-prop is the first set from the list-item ( "size-1" ), the text before the :-sign
|
|
17
|
+
// $sizesrem-value is the second set from the list item ( $base-size * 0.125 ), the text after the :-sign
|
|
18
|
+
|
|
19
|
+
/* The Padding property */
|
|
20
|
+
|
|
21
|
+
///
|
|
22
|
+
/// The position property specifies the type of positioning method used for an element.
|
|
23
|
+
/// @group Padding
|
|
24
|
+
/// @name padding
|
|
25
|
+
/// @link src/scss/utilities/_spacing_padding.scss
|
|
26
|
+
/// @since 1.0.0
|
|
27
|
+
/// @author Serge Cools
|
|
28
|
+
///
|
|
29
|
+
/// Applies to: all elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column. It also applies to ::first-letter and ::first-line.
|
|
30
|
+
///
|
|
31
|
+
/// @example scss - padding class
|
|
32
|
+
/// $min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
33
|
+
/// $run: 0;
|
|
34
|
+
/// @while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
|
|
35
|
+
/// $result: omnia-generate-sizing($min-group, 'padding', true, $run);
|
|
36
|
+
/// $min-group: map.get($result,1);
|
|
37
|
+
/// $run: map.get($result,6);
|
|
38
|
+
/// .#{string.slice(map.get($result,5),1,1)}-#{map.get($result,2)} {
|
|
39
|
+
/// #{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
|
|
40
|
+
/// }
|
|
41
|
+
/// .#{string.slice(map.get($result,5),1,1)+'t'}-#{map.get($result,2)} {
|
|
42
|
+
/// #{map.get($result,5)+'-top'} : map.get($result,3) + #{map.get($result,4)}
|
|
43
|
+
/// }
|
|
44
|
+
/// .#{string.slice(map.get($result,5),1,1)+'r'}-#{map.get($result,2)} {
|
|
45
|
+
/// #{map.get($result,5)+'-right'} : map.get($result,3) + #{map.get($result,4)}
|
|
46
|
+
/// }
|
|
47
|
+
/// .#{string.slice(map.get($result,5),1,1)+'b'}-#{map.get($result,2)} {
|
|
48
|
+
/// #{map.get($result,5)+'-bottom'} : map.get($result,3) + #{map.get($result,4)}
|
|
49
|
+
/// }
|
|
50
|
+
/// .#{string.slice(map.get($result,5),1,1)+'l'}-#{map.get($result,2)} {
|
|
51
|
+
/// #{map.get($result,5)+'-left'} : map.get($result,3) + #{map.get($result,4)}
|
|
52
|
+
/// }
|
|
53
|
+
/// .#{string.slice(map.get($result,5),1,1)+'h'}-#{map.get($result,2)} {
|
|
54
|
+
/// #{map.get($result,5)+'-right'} : map.get($result,3) + #{map.get($result,4)};
|
|
55
|
+
/// #{map.get($result,5)+'-left'} : map.get($result,3) + #{map.get($result,4)}
|
|
56
|
+
/// }
|
|
57
|
+
/// .#{string.slice(map.get($result,5),1,1)+'v'}-#{map.get($result,2)} {
|
|
58
|
+
/// #{map.get($result,5)+'-top'} : map.get($result,3) + #{map.get($result,4)};
|
|
59
|
+
/// #{map.get($result,5)+'-bottom'} : map.get($result,3) + #{map.get($result,4)}
|
|
60
|
+
/// }
|
|
61
|
+
/// };
|
|
62
|
+
/// @example html - use the padding class
|
|
63
|
+
/// <div class="container p-5">
|
|
64
|
+
/// <h2>Voorbeeld padding p-5 </h2>
|
|
65
|
+
/// </div>
|
|
66
|
+
//
|
|
67
|
+
$min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
68
|
+
$run: 0;
|
|
69
|
+
@while $min-group <= $SPACING-SECOND-MAX-GROUP {
|
|
70
|
+
|
|
71
|
+
$result: omnia-generate-sizing($min-group, 'padding', false, $run);
|
|
72
|
+
|
|
73
|
+
$min-group: map.get($result,1);
|
|
74
|
+
$run: map.get($result,6);
|
|
75
|
+
// padding
|
|
76
|
+
.#{string.slice(map.get($result,5),1,1)}-#{map.get($result,2)} {
|
|
77
|
+
|
|
78
|
+
#{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
// padding-top
|
|
82
|
+
.#{string.slice(map.get($result,5),1,1)+'t'}-#{map.get($result,2)} {
|
|
83
|
+
|
|
84
|
+
#{map.get($result,5)+'-top'} : map.get($result,3) + #{map.get($result,4)}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
// padding-right
|
|
88
|
+
.#{string.slice(map.get($result,5),1,1)+'r'}-#{map.get($result,2)} {
|
|
89
|
+
|
|
90
|
+
#{map.get($result,5)+'-right'} : map.get($result,3) + #{map.get($result,4)}
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
// padding-bottom
|
|
94
|
+
.#{string.slice(map.get($result,5),1,1)+'b'}-#{map.get($result,2)} {
|
|
95
|
+
|
|
96
|
+
#{map.get($result,5)+'-bottom'} : map.get($result,3) + #{map.get($result,4)}
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
// padding-left
|
|
100
|
+
.#{string.slice(map.get($result,5),1,1)+'l'}-#{map.get($result,2)} {
|
|
101
|
+
|
|
102
|
+
#{map.get($result,5)+'-left'} : map.get($result,3) + #{map.get($result,4)}
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
// padding horizontal
|
|
106
|
+
.#{string.slice(map.get($result,5),1,1)+'h'}-#{map.get($result,2)} {
|
|
107
|
+
|
|
108
|
+
#{map.get($result,5)+'-right'} : map.get($result,3) + #{map.get($result,4)};
|
|
109
|
+
#{map.get($result,5)+'-left'} : map.get($result,3) + #{map.get($result,4)}
|
|
110
|
+
|
|
111
|
+
}
|
|
112
|
+
// padding vertical
|
|
113
|
+
.#{string.slice(map.get($result,5),1,1)+'v'}-#{map.get($result,2)} {
|
|
114
|
+
|
|
115
|
+
#{map.get($result,5)+'-top'} : map.get($result,3) + #{map.get($result,4)};
|
|
116
|
+
#{map.get($result,5)+'-bottom'} : map.get($result,3) + #{map.get($result,4)}
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
// padding new version CSS
|
|
121
|
+
/// @group Padding
|
|
122
|
+
/// @name padding
|
|
123
|
+
///
|
|
124
|
+
/// @link src/scss/utilities/_spacing_padding.scss
|
|
125
|
+
/// @since 1.0.0
|
|
126
|
+
/// @author Serge Cools
|
|
127
|
+
///
|
|
128
|
+
/// css property - inline, inline-start, inline-end, block, block-start, block-end
|
|
129
|
+
///
|
|
130
|
+
/// Applies to: all elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column. It also applies to ::first-letter and ::first-line.
|
|
131
|
+
///
|
|
132
|
+
/// @require $sides -inline, inline-start, inline-end, block, block-start, block-end
|
|
133
|
+
/// @example scss - padding inline class
|
|
134
|
+
/// $min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
135
|
+
/// $run: 0;
|
|
136
|
+
/// @while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
|
|
137
|
+
/// $result: omnia-generate-sizing($min-group, 'padding', true, $run);
|
|
138
|
+
/// $min-group: map.get($result,1);
|
|
139
|
+
/// $run: map.get($result,6);
|
|
140
|
+
/// @each $sides-prop in $sides {
|
|
141
|
+
/// .#{string.slice(map.get($result,5),1,1)}-#{$sides-prop}-#{map.get($result,2)} {
|
|
142
|
+
/// #{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
|
|
143
|
+
/// }
|
|
144
|
+
/// }
|
|
145
|
+
/// };
|
|
146
|
+
/// @example html - use the padding class
|
|
147
|
+
/// <div class="container p-5">
|
|
148
|
+
/// <h2>Voorbeeld padding p-5 </h2>
|
|
149
|
+
/// </div>
|
|
150
|
+
//
|
|
151
|
+
$min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
152
|
+
$run: 0;
|
|
153
|
+
@while $min-group <= $SPACING-SECOND-MAX-GROUP {
|
|
154
|
+
|
|
155
|
+
$result: omnia-generate-sizing($min-group, 'padding', true, $run);
|
|
156
|
+
|
|
157
|
+
$min-group: map.get($result,1);
|
|
158
|
+
$run: map.get($result,6);
|
|
159
|
+
|
|
160
|
+
@each $sides-prop in $sides {
|
|
161
|
+
|
|
162
|
+
.#{string.slice(map.get($result,5),1,1)}-#{$sides-prop}-#{map.get($result,2)} {
|
|
163
|
+
|
|
164
|
+
#{map.get($result,5)}-#{$sides-prop}: map.get($result,3) + #{map.get($result,4)}
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/* Padding with var(--spacing): .p-var-0 … .p-var-10 (value = calc(var(--spacing) * n)). Set --spacing on :root or component (e.g. 1rem). */
|
|
172
|
+
:root {
|
|
173
|
+
--spacing: 1rem;
|
|
174
|
+
}
|
|
175
|
+
@for $n from 0 through 10 {
|
|
176
|
+
@if $n == 0 {
|
|
177
|
+
.p-var-0 { padding: 0; }
|
|
178
|
+
.pt-var-0 { padding-top: 0; }
|
|
179
|
+
.pr-var-0 { padding-right: 0; }
|
|
180
|
+
.pb-var-0 { padding-bottom: 0; }
|
|
181
|
+
.pl-var-0 { padding-left: 0; }
|
|
182
|
+
.ph-var-0 { padding-left: 0; padding-right: 0; }
|
|
183
|
+
.pv-var-0 { padding-top: 0; padding-bottom: 0; }
|
|
184
|
+
} @else {
|
|
185
|
+
.p-var-#{$n} { padding: calc(var(--spacing) * #{$n}); }
|
|
186
|
+
.pt-var-#{$n} { padding-top: calc(var(--spacing) * #{$n}); }
|
|
187
|
+
.pr-var-#{$n} { padding-right: calc(var(--spacing) * #{$n}); }
|
|
188
|
+
.pb-var-#{$n} { padding-bottom: calc(var(--spacing) * #{$n}); }
|
|
189
|
+
.pl-var-#{$n} { padding-left: calc(var(--spacing) * #{$n}); }
|
|
190
|
+
.ph-var-#{$n} { padding-left: calc(var(--spacing) * #{$n}); padding-right: calc(var(--spacing) * #{$n}); }
|
|
191
|
+
.pv-var-#{$n} { padding-top: calc(var(--spacing) * #{$n}); padding-bottom: calc(var(--spacing) * #{$n}); }
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* End Padding property */
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// SCSS Document
|
|
2
|
+
// File: src/scss/utilities/_starting_style.scss
|
|
3
|
+
// Description: Entry/exit transition utilities — @starting-style, transition-behavior and interpolate-size.
|
|
4
|
+
// Copyright: 2021-2026 Birdycom
|
|
5
|
+
// Author: Serge Cools
|
|
6
|
+
// Version: 0.3.0
|
|
7
|
+
// Framework: OmniaCSS
|
|
8
|
+
// Purpose: Generate .starting-* classes (initial state before first render), .transition-discrete
|
|
9
|
+
// and .interpolate-size-* so popovers, dialogs and <details> can animate in/out with CSS only.
|
|
10
|
+
// Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style
|
|
11
|
+
// Note: combine with a transition utility (e.g. .transition .duration-300) on the same element.
|
|
12
|
+
// Map: @starting-style -> transition-behavior -> interpolate-size -> details-content
|
|
13
|
+
|
|
14
|
+
/* Starting style — values used before the element's first style update */
|
|
15
|
+
.starting-opacity-0 {
|
|
16
|
+
@starting-style { opacity: 0; }
|
|
17
|
+
}
|
|
18
|
+
.starting-scale-95 {
|
|
19
|
+
@starting-style { scale: 0.95; }
|
|
20
|
+
}
|
|
21
|
+
.starting-translate-y-2 {
|
|
22
|
+
@starting-style { translate: 0 0.5rem; }
|
|
23
|
+
}
|
|
24
|
+
.starting-translate-y-n2 {
|
|
25
|
+
@starting-style { translate: 0 -0.5rem; }
|
|
26
|
+
}
|
|
27
|
+
.starting-translate-x-full {
|
|
28
|
+
@starting-style { translate: 100% 0; }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Transition behavior — allow transitions on discrete properties (display, overlay, content-visibility) */
|
|
32
|
+
.transition-normal { transition-behavior: normal; }
|
|
33
|
+
.transition-discrete { transition-behavior: allow-discrete; }
|
|
34
|
+
|
|
35
|
+
/* Interpolate size — animate to/from intrinsic sizes like height: auto */
|
|
36
|
+
.interpolate-size-numeric { interpolate-size: numeric-only; }
|
|
37
|
+
.interpolate-size-keywords { interpolate-size: allow-keywords; }
|
|
38
|
+
|
|
39
|
+
/* Details content — animate the open/close of <details> */
|
|
40
|
+
.details-animate::details-content {
|
|
41
|
+
block-size: 0;
|
|
42
|
+
overflow: clip;
|
|
43
|
+
transition: block-size 300ms ease, content-visibility 300ms allow-discrete;
|
|
44
|
+
}
|
|
45
|
+
.details-animate[open]::details-content {
|
|
46
|
+
block-size: auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (prefers-reduced-motion: reduce) {
|
|
50
|
+
.details-animate::details-content {
|
|
51
|
+
transition: none;
|
|
52
|
+
}
|
|
53
|
+
}
|