@birdycom/omniacss 0.11.0 → 0.11.2

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.
Files changed (48) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +44 -44
  3. package/dist/oc-theme.css +1 -1
  4. package/dist/omnia.css +2 -1
  5. package/dist/omnia.min.css +1 -1
  6. package/dist/omnia.starter.css +2 -0
  7. package/dist/omnia.starter.min.css +1 -1
  8. package/dist/tokens/omnia.dtcg.json +2 -2
  9. package/dist/tokens/omnia.tokens.json +1 -1
  10. package/dist/tokens/omnia_tokens.py +2 -2
  11. package/package.json +63 -63
  12. package/scss/utilities/_anchor_positioning.scss +65 -65
  13. package/scss/utilities/_animation_properties.scss +143 -143
  14. package/scss/utilities/_borders_extended.scss +97 -97
  15. package/scss/utilities/_borders_outlines.scss +161 -161
  16. package/scss/utilities/_containment.scss +82 -82
  17. package/scss/utilities/_css_functions.scss +34 -34
  18. package/scss/utilities/_dark_mode.scss +117 -117
  19. package/scss/utilities/_drop_shadow_colors.scss +26 -26
  20. package/scss/utilities/_experimental_css.scss +149 -149
  21. package/scss/utilities/_flexbox.scss +317 -317
  22. package/scss/utilities/_font_variants.scss +139 -139
  23. package/scss/utilities/_gap.scss +103 -103
  24. package/scss/utilities/_gradient_stops.scss +48 -48
  25. package/scss/utilities/_grid.scss +672 -672
  26. package/scss/utilities/_layout_extras.scss +171 -171
  27. package/scss/utilities/_layout_flow.scss +210 -210
  28. package/scss/utilities/_mask_extras.scss +62 -62
  29. package/scss/utilities/_motion_transforms.scss +167 -167
  30. package/scss/utilities/_scroll_animations.scss +80 -80
  31. package/scss/utilities/_scrollbar.scss +2 -1
  32. package/scss/utilities/_shadow_tokens.scss +21 -21
  33. package/scss/utilities/_shapes.scss +72 -72
  34. package/scss/utilities/_sizing_logical.scss +99 -99
  35. package/scss/utilities/_starting_style.scss +53 -53
  36. package/scss/utilities/_state_variants.scss +196 -196
  37. package/scss/utilities/_svg.scss +100 -100
  38. package/scss/utilities/_table_advanced.scss +19 -19
  39. package/scss/utilities/_typography_advanced.scss +124 -124
  40. package/scss/utilities/_typography_modern.scss +83 -83
  41. package/scss/utilities/_view_transitions.scss +64 -64
  42. package/scss/utilities/_writing_modes.scss +72 -72
  43. package/scss/variables/_hulp.scss +107 -107
  44. package/scss/variables/_variables_effects.scss +108 -108
  45. package/src/postcss.mjs +43 -43
  46. package/src/tokens.mjs +377 -377
  47. package/src/variants.mjs +278 -278
  48. package/tokens/semantic.json +80 -80
@@ -1,139 +1,139 @@
1
- // SCSS Document
2
- // File: src/scss/utilities/_font_variants.scss
3
- // Description: Font variants, variable font axes, font-size-adjust, synthesis, hyphenation, text effects,
4
- // ruby annotation and MathML typography utilities.
5
- // Copyright: 2021-2026 Birdycom
6
- // Author: Serge Cools
7
- // Version: 0.3.0
8
- // Framework: OmniaCSS
9
- // Purpose: Generate .font-caps-*, .font-lig-*, .font-east-*, .font-pos-*, .font-emoji-*, .font-alt-*,
10
- // .font-wght-*, .font-size-adjust-*, .font-synthesis-*, .hyphenate-*, .text-justify-*, .text-wrap-mode-*,
11
- // .text-combine-*, .emphasis-style-*/.emphasis-color-*, .text-stroke-*, .text-fill-*, .ruby-*, .math-*.
12
- // Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant
13
- // Note: numeric variants live in _fonts.scss (.font-num-*).
14
- // Map: caps -> ligatures -> east asian -> position -> emoji -> alternates -> variation axes -> size adjust
15
- // -> synthesis -> hyphenation -> justify/wrap-mode/combine -> emphasis -> text stroke/fill -> ruby -> math
16
-
17
- /* Font variant caps */
18
- .font-caps-normal { font-variant-caps: normal; }
19
- .font-caps-small { font-variant-caps: small-caps; }
20
- .font-caps-all-small { font-variant-caps: all-small-caps; }
21
- .font-caps-petite { font-variant-caps: petite-caps; }
22
- .font-caps-all-petite { font-variant-caps: all-petite-caps; }
23
- .font-caps-unicase { font-variant-caps: unicase; }
24
- .font-caps-titling { font-variant-caps: titling-caps; }
25
-
26
- /* Font variant ligatures */
27
- .font-lig-normal { font-variant-ligatures: normal; }
28
- .font-lig-none { font-variant-ligatures: none; }
29
- .font-lig-common { font-variant-ligatures: common-ligatures; }
30
- .font-lig-no-common { font-variant-ligatures: no-common-ligatures; }
31
- .font-lig-discretionary { font-variant-ligatures: discretionary-ligatures; }
32
- .font-lig-historical { font-variant-ligatures: historical-ligatures; }
33
- .font-lig-contextual { font-variant-ligatures: contextual; }
34
-
35
- /* Font variant east asian */
36
- .font-east-normal { font-variant-east-asian: normal; }
37
- .font-east-jis04 { font-variant-east-asian: jis04; }
38
- .font-east-simplified { font-variant-east-asian: simplified; }
39
- .font-east-traditional { font-variant-east-asian: traditional; }
40
- .font-east-full-width { font-variant-east-asian: full-width; }
41
- .font-east-proportional { font-variant-east-asian: proportional-width; }
42
- .font-east-ruby { font-variant-east-asian: ruby; }
43
-
44
- /* Font variant position (real sub/superscript glyphs) */
45
- .font-pos-normal { font-variant-position: normal; }
46
- .font-pos-sub { font-variant-position: sub; }
47
- .font-pos-super { font-variant-position: super; }
48
-
49
- /* Font variant emoji */
50
- .font-emoji-normal { font-variant-emoji: normal; }
51
- .font-emoji-text { font-variant-emoji: text; }
52
- .font-emoji-emoji { font-variant-emoji: emoji; }
53
- .font-emoji-unicode { font-variant-emoji: unicode; }
54
-
55
- /* Font variant alternates and shorthand */
56
- .font-alt-normal { font-variant-alternates: normal; }
57
- .font-alt-historical { font-variant-alternates: historical-forms; }
58
- .font-variant-normal { font-variant: normal; }
59
- .font-variant-none { font-variant: none; }
60
-
61
- /* Variable font axes (font-variation-settings) */
62
- .font-variation-normal { font-variation-settings: normal; }
63
- @each $w in (100, 200, 300, 400, 500, 600, 700, 800, 900) {
64
- .font-wght-#{$w} { font-variation-settings: "wght" #{$w}; }
65
- }
66
- .font-wdth-75 { font-variation-settings: "wdth" 75; }
67
- .font-wdth-125 { font-variation-settings: "wdth" 125; }
68
- .font-slnt-n10 { font-variation-settings: "slnt" -10; }
69
-
70
- /* Font size adjust — keep x-height consistent across fallback fonts */
71
- .font-size-adjust-none { font-size-adjust: none; }
72
- .font-size-adjust-from-font { font-size-adjust: from-font; }
73
- .font-size-adjust-0\.5 { font-size-adjust: 0.5; }
74
- .font-size-adjust-ex { font-size-adjust: ex-height 0.53; }
75
- .font-size-adjust-cap { font-size-adjust: cap-height 0.7; }
76
-
77
- /* Font synthesis longhands */
78
- .font-synthesis-weight-none { font-synthesis-weight: none; }
79
- .font-synthesis-style-none { font-synthesis-style: none; }
80
- .font-synthesis-small-caps-none { font-synthesis-small-caps: none; }
81
-
82
- /* Font language override */
83
- .font-lang-normal { font-language-override: normal; }
84
-
85
- /* Hyphenation details */
86
- .hyphenate-char-auto { hyphenate-character: auto; }
87
- .hyphenate-char-dash { hyphenate-character: "\2010"; }
88
- .hyphenate-char-equals { hyphenate-character: "="; }
89
- .hyphenate-limit-auto { hyphenate-limit-chars: auto; }
90
- .hyphenate-limit-6 { hyphenate-limit-chars: 6 3 2; }
91
- .hyphenate-limit-10 { hyphenate-limit-chars: 10 4 4; }
92
-
93
- /* Text justify, wrap mode, combine upright */
94
- .text-justify-auto { text-justify: auto; }
95
- .text-justify-none { text-justify: none; }
96
- .text-justify-inter-word { text-justify: inter-word; }
97
- .text-justify-inter-character { text-justify: inter-character; }
98
- .text-wrap-mode-wrap { text-wrap-mode: wrap; }
99
- .text-wrap-mode-nowrap { text-wrap-mode: nowrap; }
100
- .text-combine-none { text-combine-upright: none; }
101
- .text-combine-all { text-combine-upright: all; }
102
-
103
- /* Text emphasis longhands */
104
- .emphasis-style-filled { text-emphasis-style: filled; }
105
- .emphasis-style-open { text-emphasis-style: open; }
106
- .emphasis-style-double-circle { text-emphasis-style: double-circle; }
107
- .emphasis-color-current { text-emphasis-color: currentcolor; }
108
- .emphasis-color-red { text-emphasis-color: var(--color-red-100); }
109
- .emphasis-color-blue { text-emphasis-color: var(--color-blue-100); }
110
-
111
- /* Text stroke and fill (WebKit text effects, supported in all engines) */
112
- .text-stroke-0 { -webkit-text-stroke-width: 0; }
113
- .text-stroke-1 { -webkit-text-stroke-width: 1px; }
114
- .text-stroke-2 { -webkit-text-stroke-width: 2px; }
115
- .text-stroke-current { -webkit-text-stroke-color: currentcolor; }
116
- .text-stroke-white { -webkit-text-stroke-color: var(--color-white-50); }
117
- .text-stroke-black { -webkit-text-stroke-color: var(--color-black-50); }
118
- .text-fill-transparent { -webkit-text-fill-color: transparent; }
119
- .text-fill-current { -webkit-text-fill-color: currentcolor; }
120
- .text-outline { -webkit-text-stroke: 1px currentcolor; -webkit-text-fill-color: transparent; }
121
-
122
- /* Ruby annotation (<ruby> / <rt>) */
123
- .ruby-over { ruby-position: over; }
124
- .ruby-under { ruby-position: under; }
125
- .ruby-inter-character { ruby-position: inter-character; }
126
- .ruby-align-start { ruby-align: start; }
127
- .ruby-align-center { ruby-align: center; }
128
- .ruby-align-space-between { ruby-align: space-between; }
129
- .ruby-align-space-around { ruby-align: space-around; }
130
- .ruby-overhang-auto { ruby-overhang: auto; }
131
- .ruby-overhang-none { ruby-overhang: none; }
132
-
133
- /* MathML typography */
134
- .math-normal { math-style: normal; }
135
- .math-compact { math-style: compact; }
136
- .math-depth-auto { math-depth: auto-add; }
137
- .math-depth-0 { math-depth: 0; }
138
- .math-shift-normal { math-shift: normal; }
139
- .math-shift-compact { math-shift: compact; }
1
+ // SCSS Document
2
+ // File: src/scss/utilities/_font_variants.scss
3
+ // Description: Font variants, variable font axes, font-size-adjust, synthesis, hyphenation, text effects,
4
+ // ruby annotation and MathML typography utilities.
5
+ // Copyright: 2021-2026 Birdycom
6
+ // Author: Serge Cools
7
+ // Version: 0.3.0
8
+ // Framework: OmniaCSS
9
+ // Purpose: Generate .font-caps-*, .font-lig-*, .font-east-*, .font-pos-*, .font-emoji-*, .font-alt-*,
10
+ // .font-wght-*, .font-size-adjust-*, .font-synthesis-*, .hyphenate-*, .text-justify-*, .text-wrap-mode-*,
11
+ // .text-combine-*, .emphasis-style-*/.emphasis-color-*, .text-stroke-*, .text-fill-*, .ruby-*, .math-*.
12
+ // Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant
13
+ // Note: numeric variants live in _fonts.scss (.font-num-*).
14
+ // Map: caps -> ligatures -> east asian -> position -> emoji -> alternates -> variation axes -> size adjust
15
+ // -> synthesis -> hyphenation -> justify/wrap-mode/combine -> emphasis -> text stroke/fill -> ruby -> math
16
+
17
+ /* Font variant caps */
18
+ .font-caps-normal { font-variant-caps: normal; }
19
+ .font-caps-small { font-variant-caps: small-caps; }
20
+ .font-caps-all-small { font-variant-caps: all-small-caps; }
21
+ .font-caps-petite { font-variant-caps: petite-caps; }
22
+ .font-caps-all-petite { font-variant-caps: all-petite-caps; }
23
+ .font-caps-unicase { font-variant-caps: unicase; }
24
+ .font-caps-titling { font-variant-caps: titling-caps; }
25
+
26
+ /* Font variant ligatures */
27
+ .font-lig-normal { font-variant-ligatures: normal; }
28
+ .font-lig-none { font-variant-ligatures: none; }
29
+ .font-lig-common { font-variant-ligatures: common-ligatures; }
30
+ .font-lig-no-common { font-variant-ligatures: no-common-ligatures; }
31
+ .font-lig-discretionary { font-variant-ligatures: discretionary-ligatures; }
32
+ .font-lig-historical { font-variant-ligatures: historical-ligatures; }
33
+ .font-lig-contextual { font-variant-ligatures: contextual; }
34
+
35
+ /* Font variant east asian */
36
+ .font-east-normal { font-variant-east-asian: normal; }
37
+ .font-east-jis04 { font-variant-east-asian: jis04; }
38
+ .font-east-simplified { font-variant-east-asian: simplified; }
39
+ .font-east-traditional { font-variant-east-asian: traditional; }
40
+ .font-east-full-width { font-variant-east-asian: full-width; }
41
+ .font-east-proportional { font-variant-east-asian: proportional-width; }
42
+ .font-east-ruby { font-variant-east-asian: ruby; }
43
+
44
+ /* Font variant position (real sub/superscript glyphs) */
45
+ .font-pos-normal { font-variant-position: normal; }
46
+ .font-pos-sub { font-variant-position: sub; }
47
+ .font-pos-super { font-variant-position: super; }
48
+
49
+ /* Font variant emoji */
50
+ .font-emoji-normal { font-variant-emoji: normal; }
51
+ .font-emoji-text { font-variant-emoji: text; }
52
+ .font-emoji-emoji { font-variant-emoji: emoji; }
53
+ .font-emoji-unicode { font-variant-emoji: unicode; }
54
+
55
+ /* Font variant alternates and shorthand */
56
+ .font-alt-normal { font-variant-alternates: normal; }
57
+ .font-alt-historical { font-variant-alternates: historical-forms; }
58
+ .font-variant-normal { font-variant: normal; }
59
+ .font-variant-none { font-variant: none; }
60
+
61
+ /* Variable font axes (font-variation-settings) */
62
+ .font-variation-normal { font-variation-settings: normal; }
63
+ @each $w in (100, 200, 300, 400, 500, 600, 700, 800, 900) {
64
+ .font-wght-#{$w} { font-variation-settings: "wght" #{$w}; }
65
+ }
66
+ .font-wdth-75 { font-variation-settings: "wdth" 75; }
67
+ .font-wdth-125 { font-variation-settings: "wdth" 125; }
68
+ .font-slnt-n10 { font-variation-settings: "slnt" -10; }
69
+
70
+ /* Font size adjust — keep x-height consistent across fallback fonts */
71
+ .font-size-adjust-none { font-size-adjust: none; }
72
+ .font-size-adjust-from-font { font-size-adjust: from-font; }
73
+ .font-size-adjust-0\.5 { font-size-adjust: 0.5; }
74
+ .font-size-adjust-ex { font-size-adjust: ex-height 0.53; }
75
+ .font-size-adjust-cap { font-size-adjust: cap-height 0.7; }
76
+
77
+ /* Font synthesis longhands */
78
+ .font-synthesis-weight-none { font-synthesis-weight: none; }
79
+ .font-synthesis-style-none { font-synthesis-style: none; }
80
+ .font-synthesis-small-caps-none { font-synthesis-small-caps: none; }
81
+
82
+ /* Font language override */
83
+ .font-lang-normal { font-language-override: normal; }
84
+
85
+ /* Hyphenation details */
86
+ .hyphenate-char-auto { hyphenate-character: auto; }
87
+ .hyphenate-char-dash { hyphenate-character: "\2010"; }
88
+ .hyphenate-char-equals { hyphenate-character: "="; }
89
+ .hyphenate-limit-auto { hyphenate-limit-chars: auto; }
90
+ .hyphenate-limit-6 { hyphenate-limit-chars: 6 3 2; }
91
+ .hyphenate-limit-10 { hyphenate-limit-chars: 10 4 4; }
92
+
93
+ /* Text justify, wrap mode, combine upright */
94
+ .text-justify-auto { text-justify: auto; }
95
+ .text-justify-none { text-justify: none; }
96
+ .text-justify-inter-word { text-justify: inter-word; }
97
+ .text-justify-inter-character { text-justify: inter-character; }
98
+ .text-wrap-mode-wrap { text-wrap-mode: wrap; }
99
+ .text-wrap-mode-nowrap { text-wrap-mode: nowrap; }
100
+ .text-combine-none { text-combine-upright: none; }
101
+ .text-combine-all { text-combine-upright: all; }
102
+
103
+ /* Text emphasis longhands */
104
+ .emphasis-style-filled { text-emphasis-style: filled; }
105
+ .emphasis-style-open { text-emphasis-style: open; }
106
+ .emphasis-style-double-circle { text-emphasis-style: double-circle; }
107
+ .emphasis-color-current { text-emphasis-color: currentcolor; }
108
+ .emphasis-color-red { text-emphasis-color: var(--color-red-100); }
109
+ .emphasis-color-blue { text-emphasis-color: var(--color-blue-100); }
110
+
111
+ /* Text stroke and fill (WebKit text effects, supported in all engines) */
112
+ .text-stroke-0 { -webkit-text-stroke-width: 0; }
113
+ .text-stroke-1 { -webkit-text-stroke-width: 1px; }
114
+ .text-stroke-2 { -webkit-text-stroke-width: 2px; }
115
+ .text-stroke-current { -webkit-text-stroke-color: currentcolor; }
116
+ .text-stroke-white { -webkit-text-stroke-color: var(--color-white-50); }
117
+ .text-stroke-black { -webkit-text-stroke-color: var(--color-black-50); }
118
+ .text-fill-transparent { -webkit-text-fill-color: transparent; }
119
+ .text-fill-current { -webkit-text-fill-color: currentcolor; }
120
+ .text-outline { -webkit-text-stroke: 1px currentcolor; -webkit-text-fill-color: transparent; }
121
+
122
+ /* Ruby annotation (<ruby> / <rt>) */
123
+ .ruby-over { ruby-position: over; }
124
+ .ruby-under { ruby-position: under; }
125
+ .ruby-inter-character { ruby-position: inter-character; }
126
+ .ruby-align-start { ruby-align: start; }
127
+ .ruby-align-center { ruby-align: center; }
128
+ .ruby-align-space-between { ruby-align: space-between; }
129
+ .ruby-align-space-around { ruby-align: space-around; }
130
+ .ruby-overhang-auto { ruby-overhang: auto; }
131
+ .ruby-overhang-none { ruby-overhang: none; }
132
+
133
+ /* MathML typography */
134
+ .math-normal { math-style: normal; }
135
+ .math-compact { math-style: compact; }
136
+ .math-depth-auto { math-depth: auto-add; }
137
+ .math-depth-0 { math-depth: 0; }
138
+ .math-shift-normal { math-shift: normal; }
139
+ .math-shift-compact { math-shift: compact; }
@@ -1,104 +1,104 @@
1
- // SCSS Document
2
- // File: src/utilities/_gap.scss
3
- // Description: CSS gap properties
4
- // Copyright: 2021-2022 Birdycom
5
- // Autor: Serge Cools
6
- // Version: 0.2.0
7
- // Framework: OmniaCSS
8
- // Properties: gap, row-gap, column-gap
9
- // Values: value in rem
10
-
11
- @use "sass:string";
12
- @use "sass:map";
13
- @use '../utilities/' as *;
14
-
15
- /* The Gap property */
16
-
17
- ///
18
- /// The position Property
19
- /// @group Gap
20
- ///
21
-
22
- ///
23
- /// The position property specifies the type of positioning method used for an element.
24
- /// @group Gap
25
- /// @name gap
26
- /// @link src/scss/utilities/_gap.scss
27
- /// @since 1.0.0
28
- /// @author Serge Cools
29
- ///
30
- /// Applies to: multi-column elements, flex containers, grid containers
31
- ///
32
- /// @require $sizesgap
33
- /// @example scss - gap class
34
- /// $min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
35
- /// @while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
36
- /// $result: omnia-generate-sizing($min-group, 'gap', false, false);
37
- /// $min-group: map.get($result,1);
38
- /// .#{map.get($result,5)}-#{map.get($result,2)} {
39
- /// #{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
40
- /// }
41
- /// .#{map.get($result,5)+'-row'}-#{map.get($result,2)} {
42
- /// #{'row-' + map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
43
- /// }
44
- /// .#{map.get($result,5)+'-col'}-#{map.get($result,2)} {
45
- /// #{'column-' + map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
46
- /// }
47
- /// };
48
- /// @example html - use gap class
49
- /// <div class="grid grid-cols-3 gap-col-8 gap-row-4 font-mono text-white text-sm text-center font-bold leading-6 bg-stripes-sky rounded-lg">
50
- /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">01</div>
51
- /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">02</div>
52
- /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">03</div>
53
- /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">04</div>
54
- /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">05</div>
55
- /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">06</div>
56
- /// </div>
57
- //
58
- $min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
59
- @while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
60
-
61
- $result: omnia-generate-sizing($min-group, 'gap', false, false);
62
-
63
- $min-group: map.get($result,1);
64
-
65
- // margin
66
- .#{map.get($result,5)}-#{map.get($result,2)} {
67
-
68
- #{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
69
-
70
- }
71
- // gap row (y-as)
72
- .#{map.get($result,5)+'-row'}-#{map.get($result,2)} {
73
-
74
- #{'row-' + map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
75
-
76
- }
77
- // gap column (x-as)
78
- .#{map.get($result,5)+'-col'}-#{map.get($result,2)} {
79
-
80
- #{'column-' + map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
81
-
82
- }
83
- };
84
-
85
- /* ===================================================================
86
- Short gap aliases
87
- gap-x-* = gap-col-*, gap-y-* = gap-row-*
88
- =================================================================== */
89
- $min-group-alias: $DEFAULT-BASE-FIRST-MIN-GROUP;
90
- @while $min-group-alias <= $DEFAULT-BASE-SECOND-MAX-GROUP {
91
- $result: omnia-generate-sizing($min-group-alias, 'gap', false, false);
92
- $min-group-alias: map.get($result,1);
93
-
94
- /* gap-x alias for gap-col (column gap) */
95
- .gap-x-#{map.get($result,2)} {
96
- column-gap: map.get($result,3) + #{map.get($result,4)};
97
- }
98
- /* gap-y alias for gap-row (row gap) */
99
- .gap-y-#{map.get($result,2)} {
100
- row-gap: map.get($result,3) + #{map.get($result,4)};
101
- }
102
- }
103
-
1
+ // SCSS Document
2
+ // File: src/utilities/_gap.scss
3
+ // Description: CSS gap properties
4
+ // Copyright: 2021-2022 Birdycom
5
+ // Autor: Serge Cools
6
+ // Version: 0.2.0
7
+ // Framework: OmniaCSS
8
+ // Properties: gap, row-gap, column-gap
9
+ // Values: value in rem
10
+
11
+ @use "sass:string";
12
+ @use "sass:map";
13
+ @use '../utilities/' as *;
14
+
15
+ /* The Gap property */
16
+
17
+ ///
18
+ /// The position Property
19
+ /// @group Gap
20
+ ///
21
+
22
+ ///
23
+ /// The position property specifies the type of positioning method used for an element.
24
+ /// @group Gap
25
+ /// @name gap
26
+ /// @link src/scss/utilities/_gap.scss
27
+ /// @since 1.0.0
28
+ /// @author Serge Cools
29
+ ///
30
+ /// Applies to: multi-column elements, flex containers, grid containers
31
+ ///
32
+ /// @require $sizesgap
33
+ /// @example scss - gap class
34
+ /// $min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
35
+ /// @while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
36
+ /// $result: omnia-generate-sizing($min-group, 'gap', false, false);
37
+ /// $min-group: map.get($result,1);
38
+ /// .#{map.get($result,5)}-#{map.get($result,2)} {
39
+ /// #{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
40
+ /// }
41
+ /// .#{map.get($result,5)+'-row'}-#{map.get($result,2)} {
42
+ /// #{'row-' + map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
43
+ /// }
44
+ /// .#{map.get($result,5)+'-col'}-#{map.get($result,2)} {
45
+ /// #{'column-' + map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
46
+ /// }
47
+ /// };
48
+ /// @example html - use gap class
49
+ /// <div class="grid grid-cols-3 gap-col-8 gap-row-4 font-mono text-white text-sm text-center font-bold leading-6 bg-stripes-sky rounded-lg">
50
+ /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">01</div>
51
+ /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">02</div>
52
+ /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">03</div>
53
+ /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">04</div>
54
+ /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">05</div>
55
+ /// <div class="p-4 rounded-lg shadow-lg bg-deepskyblue">06</div>
56
+ /// </div>
57
+ //
58
+ $min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
59
+ @while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
60
+
61
+ $result: omnia-generate-sizing($min-group, 'gap', false, false);
62
+
63
+ $min-group: map.get($result,1);
64
+
65
+ // margin
66
+ .#{map.get($result,5)}-#{map.get($result,2)} {
67
+
68
+ #{map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
69
+
70
+ }
71
+ // gap row (y-as)
72
+ .#{map.get($result,5)+'-row'}-#{map.get($result,2)} {
73
+
74
+ #{'row-' + map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
75
+
76
+ }
77
+ // gap column (x-as)
78
+ .#{map.get($result,5)+'-col'}-#{map.get($result,2)} {
79
+
80
+ #{'column-' + map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
81
+
82
+ }
83
+ };
84
+
85
+ /* ===================================================================
86
+ Short gap aliases
87
+ gap-x-* = gap-col-*, gap-y-* = gap-row-*
88
+ =================================================================== */
89
+ $min-group-alias: $DEFAULT-BASE-FIRST-MIN-GROUP;
90
+ @while $min-group-alias <= $DEFAULT-BASE-SECOND-MAX-GROUP {
91
+ $result: omnia-generate-sizing($min-group-alias, 'gap', false, false);
92
+ $min-group-alias: map.get($result,1);
93
+
94
+ /* gap-x alias for gap-col (column gap) */
95
+ .gap-x-#{map.get($result,2)} {
96
+ column-gap: map.get($result,3) + #{map.get($result,4)};
97
+ }
98
+ /* gap-y alias for gap-row (row gap) */
99
+ .gap-y-#{map.get($result,2)} {
100
+ row-gap: map.get($result,3) + #{map.get($result,4)};
101
+ }
102
+ }
103
+
104
104
  /* End Gap property */
@@ -1,48 +1,48 @@
1
- // SCSS Document
2
- // File: src/scss/utilities/_gradient_stops.scss
3
- // Description: Stop positions for the composable gradients of _gradients.scss, extra gradient angles and anchors,
4
- // and gradients in a perceptual color space.
5
- // Copyright: 2021-2026 Birdycom
6
- // Author: Serge Cools
7
- // Version: 0.4.0
8
- // Framework: OmniaCSS
9
- // Purpose: Generate .from-pos-{n}, .via-pos-{n}, .to-pos-{n} (percent), .bg-conic-{deg}, .bg-radial-at-{bl|tr|c},
10
- // .bg-radial-{closest|farthest}-{side|corner} and .bg-linear-to-{dir}-{oklch|oklab}.
11
- // Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient
12
- // Note: Position classes set --oc-gradient-{from|via|to}-pos; _gradients.scss reads them inside the stop list,
13
- // e.g. class="bg-linear-to-r from-red from-pos-10 via-yellow to-green to-pos-90".
14
- // Map: stop positions -> conic angles -> radial anchors and sizes -> color-space gradients
15
-
16
- $_stop-positions: (0, 5, 10, 15, 20, 25, 30, 33, 35, 40, 45, 50, 55, 60, 65, 66, 70, 75, 80, 85, 90, 95, 100);
17
- $_gradient-stops: var(--oc-gradient-stops, var(--oc-gradient-from, transparent) var(--oc-gradient-from-pos,), var(--oc-gradient-to, transparent) var(--oc-gradient-to-pos,));
18
-
19
- /* Stop positions (percent) */
20
- @each $n in $_stop-positions {
21
- .from-pos-#{$n} { --oc-gradient-from-pos: #{$n}%; }
22
- .via-pos-#{$n} { --oc-gradient-via-pos: #{$n}%; }
23
- .to-pos-#{$n} { --oc-gradient-to-pos: #{$n}%; }
24
- }
25
-
26
- /* Conic gradient start angles (0, 90 and 180 live in _gradients.scss) */
27
- @each $deg in (45, 135, 225, 270, 315) {
28
- .bg-conic-#{$deg} { background-image: conic-gradient(from #{$deg}deg, #{$_gradient-stops}); }
29
- }
30
-
31
- /* Radial gradient anchors and sizes */
32
- .bg-radial-at-c { background-image: radial-gradient(at center, #{$_gradient-stops}); }
33
- .bg-radial-at-bl { background-image: radial-gradient(at bottom left, #{$_gradient-stops}); }
34
- .bg-radial-at-tr { background-image: radial-gradient(at top right, #{$_gradient-stops}); }
35
- .bg-radial-closest-side { background-image: radial-gradient(closest-side, #{$_gradient-stops}); }
36
- .bg-radial-closest-corner { background-image: radial-gradient(closest-corner, #{$_gradient-stops}); }
37
- .bg-radial-farthest-side { background-image: radial-gradient(farthest-side, #{$_gradient-stops}); }
38
- .bg-radial-farthest-corner { background-image: radial-gradient(farthest-corner, #{$_gradient-stops}); }
39
-
40
- /* Linear gradients interpolated in a perceptual color space (smoother mid tones than sRGB) */
41
- $_directions: ('t': to top, 'tr': to top right, 'r': to right, 'br': to bottom right, 'b': to bottom, 'bl': to bottom left, 'l': to left, 'tl': to top left);
42
- @each $key, $dir in $_directions {
43
- @each $space in (oklch, oklab) {
44
- @if not ($key == 'r' and $space == oklch) {
45
- .bg-linear-to-#{$key}-#{$space} { background-image: linear-gradient(#{$dir} in #{$space}, #{$_gradient-stops}); }
46
- }
47
- }
48
- }
1
+ // SCSS Document
2
+ // File: src/scss/utilities/_gradient_stops.scss
3
+ // Description: Stop positions for the composable gradients of _gradients.scss, extra gradient angles and anchors,
4
+ // and gradients in a perceptual color space.
5
+ // Copyright: 2021-2026 Birdycom
6
+ // Author: Serge Cools
7
+ // Version: 0.4.0
8
+ // Framework: OmniaCSS
9
+ // Purpose: Generate .from-pos-{n}, .via-pos-{n}, .to-pos-{n} (percent), .bg-conic-{deg}, .bg-radial-at-{bl|tr|c},
10
+ // .bg-radial-{closest|farthest}-{side|corner} and .bg-linear-to-{dir}-{oklch|oklab}.
11
+ // Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient
12
+ // Note: Position classes set --oc-gradient-{from|via|to}-pos; _gradients.scss reads them inside the stop list,
13
+ // e.g. class="bg-linear-to-r from-red from-pos-10 via-yellow to-green to-pos-90".
14
+ // Map: stop positions -> conic angles -> radial anchors and sizes -> color-space gradients
15
+
16
+ $_stop-positions: (0, 5, 10, 15, 20, 25, 30, 33, 35, 40, 45, 50, 55, 60, 65, 66, 70, 75, 80, 85, 90, 95, 100);
17
+ $_gradient-stops: var(--oc-gradient-stops, var(--oc-gradient-from, transparent) var(--oc-gradient-from-pos,), var(--oc-gradient-to, transparent) var(--oc-gradient-to-pos,));
18
+
19
+ /* Stop positions (percent) */
20
+ @each $n in $_stop-positions {
21
+ .from-pos-#{$n} { --oc-gradient-from-pos: #{$n}%; }
22
+ .via-pos-#{$n} { --oc-gradient-via-pos: #{$n}%; }
23
+ .to-pos-#{$n} { --oc-gradient-to-pos: #{$n}%; }
24
+ }
25
+
26
+ /* Conic gradient start angles (0, 90 and 180 live in _gradients.scss) */
27
+ @each $deg in (45, 135, 225, 270, 315) {
28
+ .bg-conic-#{$deg} { background-image: conic-gradient(from #{$deg}deg, #{$_gradient-stops}); }
29
+ }
30
+
31
+ /* Radial gradient anchors and sizes */
32
+ .bg-radial-at-c { background-image: radial-gradient(at center, #{$_gradient-stops}); }
33
+ .bg-radial-at-bl { background-image: radial-gradient(at bottom left, #{$_gradient-stops}); }
34
+ .bg-radial-at-tr { background-image: radial-gradient(at top right, #{$_gradient-stops}); }
35
+ .bg-radial-closest-side { background-image: radial-gradient(closest-side, #{$_gradient-stops}); }
36
+ .bg-radial-closest-corner { background-image: radial-gradient(closest-corner, #{$_gradient-stops}); }
37
+ .bg-radial-farthest-side { background-image: radial-gradient(farthest-side, #{$_gradient-stops}); }
38
+ .bg-radial-farthest-corner { background-image: radial-gradient(farthest-corner, #{$_gradient-stops}); }
39
+
40
+ /* Linear gradients interpolated in a perceptual color space (smoother mid tones than sRGB) */
41
+ $_directions: ('t': to top, 'tr': to top right, 'r': to right, 'br': to bottom right, 'b': to bottom, 'bl': to bottom left, 'l': to left, 'tl': to top left);
42
+ @each $key, $dir in $_directions {
43
+ @each $space in (oklch, oklab) {
44
+ @if not ($key == 'r' and $space == oklch) {
45
+ .bg-linear-to-#{$key}-#{$space} { background-image: linear-gradient(#{$dir} in #{$space}, #{$_gradient-stops}); }
46
+ }
47
+ }
48
+ }