@birdycom/omniacss 0.0.0-stage → 0.11.1

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 (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -3
  3. package/dist/oc-colors.css +4429 -0
  4. package/dist/oc-theme.css +69 -0
  5. package/dist/omnia.css +465436 -0
  6. package/dist/omnia.min.css +2 -0
  7. package/dist/omnia.starter.css +13461 -0
  8. package/dist/omnia.starter.min.css +1 -0
  9. package/dist/tokens/omnia.dtcg.json +1496 -0
  10. package/dist/tokens/omnia.tokens.json +580 -0
  11. package/dist/tokens/omnia_tokens.py +189 -0
  12. package/package.json +63 -6
  13. package/scss/base/_reset.scss +88 -0
  14. package/scss/config/omniacss.config.scss +114 -0
  15. package/scss/config/omniacss.fonts.scss +34 -0
  16. package/scss/functions/_functions.scss +407 -0
  17. package/scss/json/html-colors.json +1998 -0
  18. package/scss/json/omnia-colors.json +500 -0
  19. package/scss/json/ral-colors.json +3430 -0
  20. package/scss/layout/_media_query.scss +18 -0
  21. package/scss/omnia_colors.scss +7 -0
  22. package/scss/omnia_main.scss +143 -0
  23. package/scss/profiles/omnia_main.hsl.scss +12 -0
  24. package/scss/profiles/omnia_main.oklab.scss +12 -0
  25. package/scss/profiles/omnia_main.oklch.scss +12 -0
  26. package/scss/utilities/_accessibility.scss +42 -0
  27. package/scss/utilities/_alignment.scss +861 -0
  28. package/scss/utilities/_anchor_positioning.scss +65 -0
  29. package/scss/utilities/_animation_properties.scss +143 -0
  30. package/scss/utilities/_aspect.scss +73 -0
  31. package/scss/utilities/_backgrounds.scss +49 -0
  32. package/scss/utilities/_borders_extended.scss +97 -0
  33. package/scss/utilities/_borders_outlines.scss +161 -0
  34. package/scss/utilities/_clamp.scss +111 -0
  35. package/scss/utilities/_colors_html.scss +341 -0
  36. package/scss/utilities/_colors_mix.scss +84 -0
  37. package/scss/utilities/_colors_omnia.scss +315 -0
  38. package/scss/utilities/_colors_ral.scss +151 -0
  39. package/scss/utilities/_colors_tokens.scss +87 -0
  40. package/scss/utilities/_container.scss +58 -0
  41. package/scss/utilities/_containment.scss +82 -0
  42. package/scss/utilities/_corner_shape.scss +30 -0
  43. package/scss/utilities/_css_functions.scss +34 -0
  44. package/scss/utilities/_dark_mode.scss +117 -0
  45. package/scss/utilities/_display.scss +58 -0
  46. package/scss/utilities/_drop_shadow_colors.scss +26 -0
  47. package/scss/utilities/_effects.scss +50 -0
  48. package/scss/utilities/_effects_advanced.scss +102 -0
  49. package/scss/utilities/_experimental_css.scss +149 -0
  50. package/scss/utilities/_filters.scss +89 -0
  51. package/scss/utilities/_flexbox.scss +318 -0
  52. package/scss/utilities/_font_variants.scss +139 -0
  53. package/scss/utilities/_fonts.scss +276 -0
  54. package/scss/utilities/_gap.scss +104 -0
  55. package/scss/utilities/_gradient_stops.scss +48 -0
  56. package/scss/utilities/_gradients.scss +99 -0
  57. package/scss/utilities/_grid.scss +673 -0
  58. package/scss/utilities/_index.scss +22 -0
  59. package/scss/utilities/_interactivity.scss +198 -0
  60. package/scss/utilities/_layering.scss +24 -0
  61. package/scss/utilities/_layout_extras.scss +171 -0
  62. package/scss/utilities/_layout_flow.scss +210 -0
  63. package/scss/utilities/_mask_extras.scss +62 -0
  64. package/scss/utilities/_motion_transforms.scss +167 -0
  65. package/scss/utilities/_overflow.scss +41 -0
  66. package/scss/utilities/_position.scss +49 -0
  67. package/scss/utilities/_responsive.scss +272 -0
  68. package/scss/utilities/_scroll_animations.scss +80 -0
  69. package/scss/utilities/_scroll_spacing.scss +33 -0
  70. package/scss/utilities/_scrollbar.scss +50 -0
  71. package/scss/utilities/_shadow_tokens.scss +21 -0
  72. package/scss/utilities/_shapes.scss +72 -0
  73. package/scss/utilities/_sizing.scss +458 -0
  74. package/scss/utilities/_sizing_logical.scss +99 -0
  75. package/scss/utilities/_space_divide.scss +85 -0
  76. package/scss/utilities/_spacing_margin.scss +199 -0
  77. package/scss/utilities/_spacing_padding.scss +195 -0
  78. package/scss/utilities/_starting_style.scss +53 -0
  79. package/scss/utilities/_state_variants.scss +196 -0
  80. package/scss/utilities/_svg.scss +100 -0
  81. package/scss/utilities/_table.scss +46 -0
  82. package/scss/utilities/_table_advanced.scss +19 -0
  83. package/scss/utilities/_text.scss +1331 -0
  84. package/scss/utilities/_transforms_3d.scss +76 -0
  85. package/scss/utilities/_typography_advanced.scss +124 -0
  86. package/scss/utilities/_typography_modern.scss +83 -0
  87. package/scss/utilities/_view_transitions.scss +64 -0
  88. package/scss/utilities/_writing_modes.scss +72 -0
  89. package/scss/variables/_color_tone.scss +39 -0
  90. package/scss/variables/_hulp.scss +108 -0
  91. package/scss/variables/_mixins.scss +40 -0
  92. package/scss/variables/_modifiers.scss +32 -0
  93. package/scss/variables/_variables.scss +302 -0
  94. package/scss/variables/_variables_colors_html.scss +2019 -0
  95. package/scss/variables/_variables_colors_omnia.scss +465 -0
  96. package/scss/variables/_variables_colors_ral.scss +3472 -0
  97. package/scss/variables/_variables_effects.scss +109 -0
  98. package/scss/variables/_variables_flex_grid.scss +427 -0
  99. package/scss/variables/_variables_layout.scss +591 -0
  100. package/scss/variables/_variables_typography.scss +550 -0
  101. package/src/engine.mjs +258 -0
  102. package/src/postcss.mjs +43 -0
  103. package/src/starter-classes.mjs +124 -0
  104. package/src/tokens.mjs +377 -0
  105. package/src/variants.mjs +278 -0
  106. package/tokens/semantic.json +80 -0
@@ -0,0 +1,111 @@
1
+ // SCSS Document
2
+ // File: src/scss/utilities/_clamp.scss
3
+ // Description: Fluid values using CSS clamp(), min(), max() for font-size, width, padding, margin
4
+ // Copyright: 2021-2026 Birdycom
5
+ // Author: Serge Cools
6
+ // Version: 0.2.0
7
+ // Framework: OmniaCSS
8
+ // References: MDN clamp(), min(), max()
9
+ // Properties: font-size, width, padding, margin
10
+ // Values: clamp(), min(), max(), vw, ch, rem, calc()
11
+
12
+ @use '../utilities/' as *;
13
+
14
+ /* =======================================================================
15
+ Fluid / clamp defaults (override in project if needed)
16
+ Used for .text-fluid (body-like), .text-fluid-heading, .text-fluid-heading-wide.
17
+ ======================================================================= */
18
+ $fluid-font-min: 1rem !default;
19
+ $fluid-font-preferred: 1.2vw !default;
20
+ $fluid-font-max: 1.25rem !default;
21
+
22
+ $fluid-heading-min: 1.5rem !default;
23
+ $fluid-heading-preferred: 2.5vw !default;
24
+ $fluid-heading-max: 2rem !default;
25
+
26
+ /* Wide heading: clamp(1.8rem, 7vw + 1rem, 5rem) */
27
+ $fluid-heading-wide-min: 1.8rem !default;
28
+ $fluid-heading-wide-max: 5rem !default;
29
+
30
+ $fluid-width-min: 20rem !default;
31
+ $fluid-width-preferred: 90vw !default;
32
+ $fluid-width-max: 65ch !default;
33
+
34
+ /* =======================================================================
35
+ Mixin: apply clamp() to any property
36
+ ======================================================================= */
37
+ @mixin fluid-clamp($property, $min, $preferred, $max) {
38
+ #{$property}: clamp(#{$min}, #{$preferred}, #{$max});
39
+ }
40
+
41
+ /* =======================================================================
42
+ Fluid font-size utilities
43
+ ======================================================================= */
44
+ .text-fluid {
45
+ font-size: clamp(#{$fluid-font-min}, #{$fluid-font-preferred}, #{$fluid-font-max});
46
+ }
47
+
48
+ .text-fluid-heading {
49
+ font-size: clamp(#{$fluid-heading-min}, #{$fluid-heading-preferred}, #{$fluid-heading-max});
50
+ }
51
+
52
+ .text-fluid-heading-wide {
53
+ font-size: clamp(#{$fluid-heading-wide-min}, calc(7vw + 1rem), #{$fluid-heading-wide-max});
54
+ }
55
+
56
+ /* =======================================================================
57
+ min() / max() utilities (.w-min/.w-max reserved in _sizing.scss for min-content/max-content)
58
+ ======================================================================= */
59
+ .text-min {
60
+ font-size: max(1rem, 1.2vw);
61
+ }
62
+
63
+ .w-fluid-cap {
64
+ width: min(var(--w-cap-a, 90vw), var(--w-cap-b, 65ch));
65
+ }
66
+
67
+ .w-fluid-floor {
68
+ width: max(var(--w-floor-a, 20rem), var(--w-floor-b, 50vw));
69
+ }
70
+
71
+ .p-min {
72
+ padding: min(1rem, 5vw);
73
+ }
74
+
75
+ .m-min {
76
+ margin: min(1rem, 5vw);
77
+ }
78
+
79
+ .p-max {
80
+ padding: max(0.5rem, 2vw);
81
+ }
82
+
83
+ .m-max {
84
+ margin: max(0.5rem, 2vw);
85
+ }
86
+
87
+ /* =======================================================================
88
+ Fluid width (clamp) and fixed vw/ch width classes
89
+ ======================================================================= */
90
+ .w-fluid {
91
+ width: clamp(#{$fluid-width-min}, #{$fluid-width-preferred}, #{$fluid-width-max});
92
+ }
93
+
94
+ .max-w-fluid {
95
+ max-width: clamp(#{$fluid-width-min}, #{$fluid-width-preferred}, #{$fluid-width-max});
96
+ }
97
+
98
+ $fluid-w-vw: (25, 40, 50, 60, 75, 90, 100) !default;
99
+ $fluid-w-ch: (45, 50, 55, 65, 70, 75, 80) !default;
100
+
101
+ @each $v in $fluid-w-vw {
102
+ .w-#{$v}vw {
103
+ width: #{$v}vw;
104
+ }
105
+ }
106
+
107
+ @each $v in $fluid-w-ch {
108
+ .w-#{$v}ch {
109
+ width: #{$v}ch;
110
+ }
111
+ }
@@ -0,0 +1,341 @@
1
+ // SCSS Document
2
+ // File: src/scss/utilities/_colors_html.scss
3
+ // Description: colors properties
4
+ // Copyright: 2021-2022 Birdycom
5
+ // Autor: Serge Cools
6
+ // Version: 0.2.0
7
+ // Framework: OmniaCSS
8
+ // Properties: background-color, color
9
+ // Values: rgb, rgba, hsl, hsla, #
10
+
11
+ @use "sass:string";
12
+ @use "sass:color";
13
+ @use "sass:list";
14
+ @use "sass:math";
15
+ @use "sass:map";
16
+ @use '../utilities/' as *;
17
+ // Tone scale for color steps 5..95.
18
+ // This keeps low steps vivid (no gray overlay) and darkens high steps.
19
+ $oc-tone-scale: (
20
+ 2: (lightness: 56%, chroma: -18%),
21
+ 10: (lightness: 38%, chroma: -12%),
22
+ 20: (lightness: 30%, chroma: -10%),
23
+ 30: (lightness: 22%, chroma: -8%),
24
+ 40: (lightness: 14%, chroma: -6%),
25
+ 50: (lightness: 6%, chroma: -4%),
26
+ 60: (lightness: -6%, chroma: 2%),
27
+ 70: (lightness: -12%, chroma: 4%),
28
+ 80: (lightness: -18%, chroma: 6%),
29
+ 90: (lightness: -24%, chroma: 8%),
30
+ 95: (lightness: -32%, chroma: 10%)
31
+ );
32
+
33
+ @function oc-tone-color($source-color, $step) {
34
+ $tone: map.get($oc-tone-scale, $step);
35
+ @if $tone == null {
36
+ @return $source-color;
37
+ }
38
+
39
+ @return color.scale(
40
+ $source-color,
41
+ $lightness: map.get($tone, lightness),
42
+ $chroma: map.get($tone, chroma)
43
+ );
44
+ }
45
+
46
+
47
+ /* The HTML Colors properties */
48
+ ///
49
+ /// @group ColorsHTML
50
+ ///
51
+
52
+ ///
53
+ /// This code defines a series of nested Sass @each loops that generate CSS background colors
54
+ /// and text colors based on a set of predefined color palettes.
55
+ /// The @each loops iterate through several arrays of color properties,
56
+ /// starting with a top-level array called $html-colors, and dig into subsequent arrays of
57
+ /// maincolorshtml-prop, colorname-prop, pseudoclasses-prop, and opacitycolor-prop
58
+ /// to generate CSS classes for each color with different opacity and/or pseudo-class options.
59
+ ///
60
+ /// The code then generates CSS code block and sets the appropriate background-color
61
+ /// and color properties based on the selected color and opacity value.
62
+ /// The $DEFAULT-COLOR-TYPE-VALUE variable determines whether the color being iterated
63
+ /// through is set as a hexadecimal value, HSL, or RGB.
64
+ ///
65
+ /// @group ColorsHTML
66
+ /// @name colorshtml
67
+ /// @link src/scss/utilities/_colors_html.scss
68
+ /// @since 1.0.0
69
+ /// @author Serge Cools
70
+ ///
71
+ /// Applies to: all elements
72
+ ///
73
+ /// @require {variable} $colorshtml
74
+ /// @require {variable} $pseudoclasses
75
+ /// @require {variable} $opacitycolor
76
+ /// @require str-replace
77
+ /// @example scss - colors class
78
+ /// @each $colorshtml-prop, $colorshtml-value in $html-colors { // first list 'htmlcolors'
79
+ /// @each $maincolorshtml-prop, $maincolorshtml-value in $colorshtml-value { // first list 'htmlcolors'
80
+ /// @each $colorname-prop, $colorname-value in $maincolorshtml-value { // second list 'colors name'
81
+ /// @each $pseudoclasses-prop, $pseudoclasses-value in $pseudoclasses { // make the pseudo classes
82
+ /// @each $opacitycolor-prop, $opacitycolor-value in $opacitycolor { // set the opacity off the colors
83
+ /// #{".#{$pseudoclasses-value}" + "bg-" + to-lower-case("#{$colorname-prop}") + if($opacitycolor-value <= 90, "#{$opacitycolor-prop}#{$pseudoclasses-prop}","#{$pseudoclasses-prop}")}{
84
+ /// @each $colorhtml-prop, $colorhtml-value in $colorname-value {
85
+ /// @if $colorhtml-prop == $DEFAULT-COLOR-TYPE-VALUE {
86
+ /// @if $DEFAULT-COLOR-TYPE-VALUE == 'hex' or $DEFAULT-COLOR-TYPE-VALUE == 'websafe' {
87
+ /// @if $opacitycolor-value <= 90 {
88
+ /// background-color: $coloromnia-value+#{$opacitycolor-value};
89
+ /// } @else {
90
+ /// background-color: $coloromnia-value;
91
+ /// };
92
+ /// };
93
+ /// @if $DEFAULT-COLOR-TYPE-VALUE == 'hsl' {
94
+ /// $h:(); $s:(); $l:();
95
+ /// @each $color-prop, $color-value in $colorhtml-value {
96
+ /// @if $color-prop == 'h' { $h: #{$color-value}; }
97
+ /// @if $color-prop == 's' { $s: #{$color-value}+'%'; }
98
+ /// @if $color-prop == 'l' { $l: #{$color-value}+'%'; }
99
+ /// };
100
+ /// @if $opacitycolor-value <= 90 {
101
+ /// background-color: #{'hsl('+ $h + ', ' + $s + ', ' + $l + ', #{$opacitycolor-value}% )' };
102
+ /// } @else {
103
+ /// background-color: #{'hsl('+ $h + ', ' + $s + ', ' + $l + ' )' };
104
+ /// };
105
+ /// };
106
+ /// @if $DEFAULT-COLOR-TYPE-VALUE == 'rgb' {
107
+ /// $r:(); $g:(); $b:();
108
+ /// @each $color-prop, $color-value in $colorhtml-value {
109
+ /// @if $color-prop == 'r' { $r: #{$color-value}; }
110
+ /// @if $color-prop == 'g' { $g: #{$color-value}; }
111
+ /// @if $color-prop == 'b' { $b: #{$color-value}; }
112
+ /// };
113
+ /// @if $opacitycolor-value <= 90 {
114
+ /// background-color: #{'rgb('+ $r $g $b + ' / #{$opacitycolor-value}% )' };
115
+ /// } @else {
116
+ /// background-color: #{'rgb('+ $r $g $b + ' )' };
117
+ /// };
118
+ /// };
119
+ /// };
120
+ /// };
121
+ /// };
122
+ /// #{".#{$pseudoclasses-value}" + "text-" + to-lower-case("#{$colorname-prop}") + if($opacitycolor-value <= 90, "#{$opacitycolor-prop}#{$pseudoclasses-prop}","#{$pseudoclasses-prop}")}{
123
+ /// @each $colorhtml-prop, $colorhtml-value in $colorname-value {
124
+ /// @if $colorhtml-prop == $DEFAULT-COLOR-TYPE-VALUE {
125
+ /// @if $DEFAULT-COLOR-TYPE-VALUE == 'hex' or $DEFAULT-COLOR-TYPE-VALUE == 'websafe' {
126
+ /// @if $opacitycolor-value <= 90 {
127
+ /// color: $coloromnia-value+#{$opacitycolor-value};
128
+ /// } @else {
129
+ /// color: $coloromnia-value;
130
+ /// };
131
+ /// };
132
+ /// @if $DEFAULT-COLOR-TYPE-VALUE == 'hsl' {
133
+ /// $h:(); $s:(); $l:();
134
+ /// @each $color-prop, $color-value in $colorhtml-value {
135
+ /// @if $color-prop == 'h' { $h: #{$color-value}; }
136
+ /// @if $color-prop == 's' { $s: #{$color-value}+'%'; }
137
+ /// @if $color-prop == 'l' { $l: #{$color-value}+'%'; }
138
+ /// };
139
+ /// @if $opacitycolor-value <= 90 {
140
+ /// color: #{'hsl('+$h + ', ' + $s + ', ' + $l + ', #{$opacitycolor-value}% )' };
141
+ /// } @else {
142
+ /// color: #{'hsl('+ $h + ', ' + $s + ', ' + $l + ' )' };
143
+ /// };
144
+ /// };
145
+ /// @if $DEFAULT-COLOR-TYPE-VALUE == 'rgb' {
146
+ /// $r:(); $g:(); $b:();
147
+ /// @each $color-prop, $color-value in $colorhtml-value {
148
+ /// @if $color-prop == 'r' { $r: #{$color-value}; }
149
+ /// @if $color-prop == 'g' { $g: #{$color-value}; }
150
+ /// @if $color-prop == 'b' { $b: #{$color-value}; }
151
+ /// };
152
+ /// @if $opacitycolor-value <= 90 {
153
+ /// color: #{'rgb('+ $r $g $b + ' / #{$opacitycolor-value}% )' };
154
+ /// } @else {
155
+ /// color: #{'rgb('+ $r $g $b + ' )' };
156
+ /// };
157
+ /// };
158
+ /// };
159
+ /// };
160
+ /// };
161
+ /// };
162
+ /// };
163
+ /// };
164
+ /// };
165
+ /// };
166
+ /// @example html - use background, text and hover-color class
167
+ /// <div class="bg-darkgreen w-12 h-10 p-0.5 hover:bg-orange text-cyan">
168
+ /// <p>text = Cyan</p>
169
+ /// <p>background = darkgreen</p>
170
+ /// <p>hover background = orange </p>
171
+ /// </div>
172
+ @each $colorshtml-prop, $colorshtml-value in $html-colors { // first list 'htmlcolors'
173
+
174
+ @each $maincolorshtml-prop, $maincolorshtml-value in $colorshtml-value { // first list 'htmlcolors'
175
+
176
+ @each $colorname-prop, $colorname-value in $maincolorshtml-value { // second list 'colors name'
177
+
178
+ @each $pseudoclasses-prop, $pseudoclasses-value in $pseudoclasses { // make the pseudo classes
179
+
180
+ @each $opacitycolor-prop, $opacitycolor-value in $opacitycolor { // set the opacity off the colors
181
+ $step: list.nth($opacitycolor-value, 1);
182
+ $color-name: string.to-lower-case(#{$colorname-prop});
183
+
184
+ $opacity-suffix: "#{$pseudoclasses-prop}";
185
+ @if $opacitycolor-value <= 95 {
186
+ $opacity-suffix: "#{$opacitycolor-prop}#{$pseudoclasses-prop}";
187
+ }
188
+
189
+ #{".#{$pseudoclasses-value}" + "bg-" + string.to-lower-case("#{$colorname-prop}") + $opacity-suffix}{
190
+
191
+ @each $colorhtml-prop, $colorhtml-value in $colorname-value {
192
+
193
+ @if $colorhtml-prop == $DEFAULT-COLOR-TYPE-VALUE or (($DEFAULT-COLOR-TYPE-VALUE == 'oklch' or $DEFAULT-COLOR-TYPE-VALUE == 'oklab') and $colorhtml-prop == 'hex') {
194
+
195
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'hex' or $DEFAULT-COLOR-TYPE-VALUE == 'websafe' {
196
+
197
+ @if $opacitycolor-value <= 95 {
198
+
199
+ background-color: $colorhtml-value+#{$opacitycolor-value};
200
+
201
+ } @else {
202
+
203
+ background-color: $colorhtml-value;
204
+ }
205
+ }
206
+
207
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'hsl' {
208
+
209
+ $h:(); $s:(); $l:();
210
+
211
+ @each $color-prop, $color-value in $colorhtml-value {
212
+
213
+ @if $color-prop == 'h' { $h: #{$color-value}; }
214
+ @if $color-prop == 's' { $s: #{$color-value}+'%'; }
215
+ @if $color-prop == 'l' { $l: #{$color-value}+'%'; }
216
+
217
+ }
218
+
219
+ @if $opacitycolor-value <= 95 {
220
+
221
+ background-color: #{'hsl('+ $h + ', ' + $s + ', ' + $l + ', #{$opacitycolor-value}% )' };
222
+
223
+ } @else {
224
+
225
+ background-color: #{'hsl('+ $h + ', ' + $s + ', ' + $l + ' )' };
226
+ }
227
+ }
228
+
229
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'rgb' {
230
+
231
+ $r:(); $g:(); $b:();
232
+
233
+ @each $color-prop, $color-value in $colorhtml-value {
234
+
235
+ @if $color-prop == 'r' { $r: #{$color-value}; }
236
+ @if $color-prop == 'g' { $g: #{$color-value}; }
237
+ @if $color-prop == 'b' { $b: #{$color-value}; }
238
+
239
+ }
240
+
241
+ @if $opacitycolor-value <= 95 {
242
+
243
+ background-color: #{'rgb('+ $r $g $b + ' / #{$opacitycolor-value}% )' };
244
+
245
+ } @else {
246
+
247
+ background-color: #{'rgb('+ $r $g $b + ' )' };
248
+ }
249
+ }
250
+
251
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'oklch' {
252
+ background-color: var(--color-#{$color-name}-#{$step});
253
+ }
254
+
255
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'oklab' {
256
+ background-color: var(--color-#{$color-name}-#{$step});
257
+ }
258
+ }
259
+ }
260
+ }
261
+
262
+ #{".#{$pseudoclasses-value}" + "text-" + string.to-lower-case("#{$colorname-prop}") + $opacity-suffix}{
263
+
264
+ // @extend .#{$colorshtml-prop};
265
+
266
+ @each $colorhtml-prop, $colorhtml-value in $colorname-value {
267
+
268
+ @if $colorhtml-prop == $DEFAULT-COLOR-TYPE-VALUE or (($DEFAULT-COLOR-TYPE-VALUE == 'oklch' or $DEFAULT-COLOR-TYPE-VALUE == 'oklab') and $colorhtml-prop == 'hex') {
269
+
270
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'hex' or $DEFAULT-COLOR-TYPE-VALUE == 'websafe' {
271
+
272
+ @if $opacitycolor-value <= 95 {
273
+
274
+ color: $colorhtml-value+#{$opacitycolor-value};
275
+
276
+ } @else {
277
+
278
+ color: $colorhtml-value;
279
+ }
280
+ }
281
+
282
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'hsl' {
283
+
284
+ $h:(); $s:(); $l:();
285
+
286
+ @each $color-prop, $color-value in $colorhtml-value {
287
+
288
+ @if $color-prop == 'h' { $h: #{$color-value}; }
289
+ @if $color-prop == 's' { $s: #{$color-value}+'%'; }
290
+ @if $color-prop == 'l' { $l: #{$color-value}+'%'; }
291
+
292
+ }
293
+
294
+ @if $opacitycolor-value <= 95 {
295
+
296
+ color: #{'hsl('+$h + ', ' + $s + ', ' + $l + ', #{$opacitycolor-value}% )' };
297
+
298
+ } @else {
299
+
300
+ color: #{'hsl('+ $h + ', ' + $s + ', ' + $l + ' )' };
301
+ }
302
+ }
303
+
304
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'rgb' {
305
+
306
+ $r:(); $g:(); $b:();
307
+
308
+ @each $color-prop, $color-value in $colorhtml-value {
309
+
310
+ @if $color-prop == 'r' { $r: #{$color-value}; }
311
+ @if $color-prop == 'g' { $g: #{$color-value}; }
312
+ @if $color-prop == 'b' { $b: #{$color-value}; }
313
+
314
+ }
315
+
316
+ @if $opacitycolor-value <= 95 {
317
+
318
+ color: #{'rgb('+ $r $g $b + ' / #{$opacitycolor-value}% )' };
319
+
320
+ } @else {
321
+
322
+ color: #{'rgb('+ $r $g $b + ' )' };
323
+ }
324
+ }
325
+
326
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'oklch' {
327
+ color: var(--color-#{$color-name}-#{$step});
328
+ }
329
+
330
+ @if $DEFAULT-COLOR-TYPE-VALUE == 'oklab' {
331
+ color: var(--color-#{$color-name}-#{$step});
332
+ }
333
+ }
334
+ }
335
+ }
336
+ }
337
+ }
338
+ }
339
+ }
340
+ };
341
+ /* End html Colors properties */
@@ -0,0 +1,84 @@
1
+ // SCSS Document
2
+ // File: src/scss/utilities/_colors_mix.scss
3
+ // Description: color-mix(in oklch, color X%, transparent) utilities for Omnia, HTML, and RAL. Omnia/HTML use var(--color-{name}-mix-{step}); RAL uses color-mix(in oklch, var(--color-{name}) step%, transparent) (one token per RAL).
4
+ // Copyright: 2021-2026 Birdycom
5
+ // Author: Serge Cools
6
+ // Version: 0.2.0
7
+ // Framework: OmniaCSS
8
+ // Purpose: Generate .bg-{color}-mix-{step} and .text-{color}-mix-{step} (step: 0,5,10,20,...,100).
9
+ // Uses var(--color-{name}-mix-{step}) from oc-colors.css so one source of truth (tokens in _colors_tokens.scss).
10
+
11
+ @use "sass:string";
12
+ @use "sass:map";
13
+ @use '../utilities/' as *;
14
+
15
+ /* ===================================================================
16
+ COLOR-MIX (with transparent)
17
+ Per color: .bg-{name}-mix-{step} and .text-{name}-mix-{step} reference
18
+ var(--color-{name}-mix-{step}) from oc-colors.css (tokens emitted in _colors_tokens.scss).
19
+ =================================================================== */
20
+
21
+ @mixin _generate-color-mix($color-map) {
22
+ @each $colors-prop, $colors-value in $color-map {
23
+ @each $main-prop, $main-value in $colors-value {
24
+ @each $colorname-prop, $colorname-value in $main-value {
25
+ $hex: map.get($colorname-value, hex);
26
+ @if $hex {
27
+ $name: string.to-lower-case(#{$colorname-prop});
28
+ @each $pseudoclasses-prop, $pseudoclasses-value in $pseudoclasses {
29
+ @each $step in $color-mix-steps {
30
+ $suffix: "-#{$step}#{$pseudoclasses-prop}";
31
+ #{".#{$pseudoclasses-value}bg-" + $name + "-mix" + $suffix} {
32
+ background-color: var(--color-#{$name}-mix-#{$step});
33
+ }
34
+ #{".#{$pseudoclasses-value}text-" + $name + "-mix" + $suffix} {
35
+ color: var(--color-#{$name}-mix-#{$step});
36
+ }
37
+ #{".#{$pseudoclasses-value}border-" + $name + "-mix" + $suffix} {
38
+ border-color: var(--color-#{$name}-mix-#{$step});
39
+ }
40
+ #{".#{$pseudoclasses-value}outline-" + $name + "-mix" + $suffix} {
41
+ outline-color: var(--color-#{$name}-mix-#{$step});
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+
51
+ /// RAL: one token per color; mix utilities use color-mix(in oklch, var(--color-{name}) step%, transparent) (no -mix-{step} token).
52
+ @mixin _generate-ral-color-mix($ral-map) {
53
+ @each $colors-prop, $colors-value in $ral-map {
54
+ @each $main-prop, $main-value in $colors-value {
55
+ @each $colorname-prop, $colorname-value in $main-value {
56
+ $hex: map.get($colorname-value, hex);
57
+ @if $hex {
58
+ $name: string.to-lower-case(#{$colorname-prop});
59
+ @each $pseudoclasses-prop, $pseudoclasses-value in $pseudoclasses {
60
+ @each $step in $color-mix-steps {
61
+ $suffix: "-#{$step}#{$pseudoclasses-prop}";
62
+ #{".#{$pseudoclasses-value}bg-" + $name + "-mix" + $suffix} {
63
+ background-color: color-mix(in oklch, var(--color-#{$name}) #{$step * 1%}, transparent);
64
+ }
65
+ #{".#{$pseudoclasses-value}text-" + $name + "-mix" + $suffix} {
66
+ color: color-mix(in oklch, var(--color-#{$name}) #{$step * 1%}, transparent);
67
+ }
68
+ #{".#{$pseudoclasses-value}border-" + $name + "-mix" + $suffix} {
69
+ border-color: color-mix(in oklch, var(--color-#{$name}) #{$step * 1%}, transparent);
70
+ }
71
+ #{".#{$pseudoclasses-value}outline-" + $name + "-mix" + $suffix} {
72
+ outline-color: color-mix(in oklch, var(--color-#{$name}) #{$step * 1%}, transparent);
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+
82
+ @include _generate-color-mix($omnia-colors);
83
+ @include _generate-color-mix($html-colors);
84
+ @include _generate-ral-color-mix($ral-colors);