zeus-css 1.0.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.
Files changed (105) hide show
  1. package/README.md +81 -0
  2. package/bin/init.js +89 -0
  3. package/dist/zeus.css +8456 -0
  4. package/dist/zeus.min.css +1 -0
  5. package/package.json +44 -0
  6. package/scss/.stylelintrc.json +41 -0
  7. package/scss/API.md +168 -0
  8. package/scss/CHANGELOG.md +281 -0
  9. package/scss/LICENSE +21 -0
  10. package/scss/README.md +160 -0
  11. package/scss/cheatsheet.md +249 -0
  12. package/scss/dist/zeus.css +8465 -0
  13. package/scss/dist/zeus.css.map +1 -0
  14. package/scss/dist/zeus.min.css +1 -0
  15. package/scss/dist/zeus.min.css.map +1 -0
  16. package/scss/foundation/core/_api.scss +10 -0
  17. package/scss/foundation/core/_design.scss +33 -0
  18. package/scss/foundation/core/_engine.scss +18 -0
  19. package/scss/foundation/core/buttons/variants.scss +72 -0
  20. package/scss/foundation/core/design/_design-system.scss +41 -0
  21. package/scss/foundation/core/design/_validate.scss +114 -0
  22. package/scss/foundation/core/design/borders/border-line.scss +29 -0
  23. package/scss/foundation/core/design/borders/border-radius.scss +31 -0
  24. package/scss/foundation/core/design/buttons/sizes.scss +32 -0
  25. package/scss/foundation/core/design/colors/_color-derivation.scss +80 -0
  26. package/scss/foundation/core/design/colors/base-colors.scss +31 -0
  27. package/scss/foundation/core/design/colors/semantic-colors.scss +130 -0
  28. package/scss/foundation/core/design/core/basic.scss +40 -0
  29. package/scss/foundation/core/design/dimensions/sizes.scss +29 -0
  30. package/scss/foundation/core/design/dimensions/spaces.scss +42 -0
  31. package/scss/foundation/core/design/effects/_z-index.scss +30 -0
  32. package/scss/foundation/core/design/effects/shadows.scss +65 -0
  33. package/scss/foundation/core/design/layout/grid.scss +86 -0
  34. package/scss/foundation/core/design/typography/typography.scss +435 -0
  35. package/scss/foundation/core/engine/_fluid-core.scss +54 -0
  36. package/scss/foundation/core/engine/animations.scss +91 -0
  37. package/scss/foundation/core/engine/buttons.scss +226 -0
  38. package/scss/foundation/core/engine/color-api.scss +37 -0
  39. package/scss/foundation/core/engine/helpers.scss +39 -0
  40. package/scss/foundation/core/engine/layout.scss +156 -0
  41. package/scss/foundation/core/engine/responsive.scss +67 -0
  42. package/scss/foundation/core/engine/shadows.scss +186 -0
  43. package/scss/foundation/core/engine/shortcuts.scss +30 -0
  44. package/scss/foundation/core/engine/sizing.scss +49 -0
  45. package/scss/foundation/core/engine/theme-builder.scss +83 -0
  46. package/scss/foundation/core/engine/typographics.scss +44 -0
  47. package/scss/foundation/core/engine/typography-calc.scss +71 -0
  48. package/scss/foundation/foundation.scss +29 -0
  49. package/scss/foundation/views/_render.scss +13 -0
  50. package/scss/foundation/views/components/_alert.scss +103 -0
  51. package/scss/foundation/views/components/_avatar.scss +84 -0
  52. package/scss/foundation/views/components/_badge.scss +100 -0
  53. package/scss/foundation/views/components/_breadcrumb.scss +70 -0
  54. package/scss/foundation/views/components/_card.scss +117 -0
  55. package/scss/foundation/views/components/_dropdown.scss +123 -0
  56. package/scss/foundation/views/components/_form.scss +209 -0
  57. package/scss/foundation/views/components/_index.scss +20 -0
  58. package/scss/foundation/views/components/_modal.scss +138 -0
  59. package/scss/foundation/views/components/_pagination.scss +82 -0
  60. package/scss/foundation/views/components/_skeleton.scss +69 -0
  61. package/scss/foundation/views/components/_table.scss +94 -0
  62. package/scss/foundation/views/components/_tabs.scss +96 -0
  63. package/scss/foundation/views/components/_toast.scss +139 -0
  64. package/scss/foundation/views/components/_tooltip.scss +100 -0
  65. package/scss/foundation/views/patterns/_hero.scss +121 -0
  66. package/scss/foundation/views/patterns/_index.scss +8 -0
  67. package/scss/foundation/views/patterns/_sidebar-layout.scss +83 -0
  68. package/scss/foundation/views/render/_layer-order.scss +11 -0
  69. package/scss/foundation/views/render/classes/_animations.scss +233 -0
  70. package/scss/foundation/views/render/classes/_aspect-ratio.scss +17 -0
  71. package/scss/foundation/views/render/classes/_borders.scss +31 -0
  72. package/scss/foundation/views/render/classes/_buttons.scss +40 -0
  73. package/scss/foundation/views/render/classes/_colors.scss +83 -0
  74. package/scss/foundation/views/render/classes/_compounds.scss +103 -0
  75. package/scss/foundation/views/render/classes/_containers.scss +20 -0
  76. package/scss/foundation/views/render/classes/_misc-utils.scss +51 -0
  77. package/scss/foundation/views/render/classes/_position.scss +56 -0
  78. package/scss/foundation/views/render/classes/_sections.scss +30 -0
  79. package/scss/foundation/views/render/classes/_shadows.scss +198 -0
  80. package/scss/foundation/views/render/classes/_sizes.scss +39 -0
  81. package/scss/foundation/views/render/classes/_sizing-utils.scss +53 -0
  82. package/scss/foundation/views/render/classes/_spacing.scss +91 -0
  83. package/scss/foundation/views/render/classes/_state-variants.scss +47 -0
  84. package/scss/foundation/views/render/classes/_typography.scss +32 -0
  85. package/scss/foundation/views/render/classes/_utilities.scss +103 -0
  86. package/scss/foundation/views/render/classes/_z-index.scss +22 -0
  87. package/scss/foundation/views/render/classes/flexbox.scss +56 -0
  88. package/scss/foundation/views/render/classes/grid.scss +195 -0
  89. package/scss/foundation/views/render/classes.scss +116 -0
  90. package/scss/foundation/views/render/html-body.scss +54 -0
  91. package/scss/foundation/views/render/property-registration.scss +77 -0
  92. package/scss/foundation/views/render/reset.scss +147 -0
  93. package/scss/foundation/views/render/root-generator.scss +166 -0
  94. package/scss/foundation/views/render/root.scss +19 -0
  95. package/scss/foundation/views/render/typography.scss +129 -0
  96. package/scss/llms.txt +247 -0
  97. package/scss/package.json +89 -0
  98. package/scss/scripts/gen-cheatsheet.mjs +178 -0
  99. package/scss/scripts/gen-tokens.mjs +91 -0
  100. package/scss/scripts/test-compile.mjs +474 -0
  101. package/scss/zeus.config.scss +99 -0
  102. package/scss/zeus.customize.scss +246 -0
  103. package/scss/zeus.scss +17 -0
  104. package/scss/zeus.token.sets.example.scss +176 -0
  105. package/scss/zeus.tokens.json +687 -0
@@ -0,0 +1,195 @@
1
+ // ╔══════════════════════════════════════════════════════════════╗
2
+ // ║ ⚡ Zeus CSS — Grid ║
3
+ // ║ ║
4
+ // ║ Generates utility classes for grid based on the framework's design tokens. ║
5
+ // ╚══════════════════════════════════════════════════════════════╝
6
+ // ========================================================================================
7
+ // ZEUS GRID SYSTEM - Modern CSS Grid Based Layout
8
+ // ========================================================================================
9
+ // Zeus Grid System is based on classes that apply to parent divs, so they affect all children.
10
+ // This is different from other classes that apply to individual elements (e.g. typography, borders, spacing, etc).
11
+ // This approach is different from bootstrap and similar frameworks, but it allows for more flexibility and easier maintenance.
12
+ // Bootstrap's approach is to apply classes to individual elements, which can lead to a lot of repetitive code and harder maintenance.
13
+ // In Zeus, we apply classes to parent divs, which allows us to change the layout of multiple elements by changing a single class on the parent div.
14
+ // This also allows for easier responsive design, as we can change the layout of multiple elements by
15
+ // changing a single class on the parent div for different screen sizes.
16
+ //
17
+ // Examples:
18
+ // <div class="grid grid-cols-3 gap-4">...</div>
19
+ // <div class="grid grid-auto-fit gap-3">...</div>
20
+ // <div class="grid grid-cols-1 grid-cols-md-2 grid-cols-lg-3">...</div>
21
+ // ========================================================================================
22
+
23
+ @use "sass:map";
24
+ @use "../../../../zeus.config" as config;
25
+ @use "../../../core/design/layout/grid" as *;
26
+ @use "../../../core/engine/responsive" as *;
27
+ @use "../../../core/design/dimensions/spaces" as spacing-tokens;
28
+ @use "../../../core/engine/layout" as layout-engine;
29
+
30
+ @mixin load-grid($prefix: "") {
31
+ @if config.$zeus-enable-grid-system {
32
+
33
+ // ========================================================================================
34
+ // BASE GRID DISPLAY UTILITIES
35
+ // ========================================================================================
36
+ .#{$prefix}d-grid {
37
+ display: grid;
38
+ }
39
+
40
+ .#{$prefix}d-inline-grid {
41
+ display: inline-grid;
42
+ }
43
+
44
+ // ========================================================================================
45
+ // GRID COLUMNS - Fixed column layouts (1-12 columns)
46
+ // ========================================================================================
47
+ .#{$prefix}grid {
48
+ display: grid;
49
+
50
+ // Fixed columns 1-12
51
+ // minmax(0, 1fr) — not bare 1fr. Bare 1fr means minmax(auto, 1fr): a child
52
+ // with wide min-content (pre/code blocks, long monospace strings, unbroken
53
+ // URLs) becomes a hard floor and the whole grid blows out past its container,
54
+ // forcing a page-level horizontal scrollbar. minmax(0, 1fr) keeps columns
55
+ // truly equal and lets the child's own overflow handling take over.
56
+ &-cols-1 {
57
+ grid-template-columns: repeat(1, minmax(0, 1fr));
58
+ }
59
+ &-cols-2 {
60
+ grid-template-columns: repeat(2, minmax(0, 1fr));
61
+ }
62
+ &-cols-3 {
63
+ grid-template-columns: repeat(3, minmax(0, 1fr));
64
+ }
65
+ &-cols-4 {
66
+ grid-template-columns: repeat(4, minmax(0, 1fr));
67
+ }
68
+ &-cols-5 {
69
+ grid-template-columns: repeat(5, minmax(0, 1fr));
70
+ }
71
+ &-cols-6 {
72
+ grid-template-columns: repeat(6, minmax(0, 1fr));
73
+ }
74
+ &-cols-7 {
75
+ grid-template-columns: repeat(7, minmax(0, 1fr));
76
+ }
77
+ &-cols-8 {
78
+ grid-template-columns: repeat(8, minmax(0, 1fr));
79
+ }
80
+ &-cols-9 {
81
+ grid-template-columns: repeat(9, minmax(0, 1fr));
82
+ }
83
+ &-cols-10 {
84
+ grid-template-columns: repeat(10, minmax(0, 1fr));
85
+ }
86
+ &-cols-11 {
87
+ grid-template-columns: repeat(11, minmax(0, 1fr));
88
+ }
89
+ &-cols-12 {
90
+ grid-template-columns: repeat(12, minmax(0, 1fr));
91
+ }
92
+
93
+ // ========================================================================================
94
+ // AUTO-FIT & AUTO-FILL - Smart responsive grids
95
+ // ========================================================================================
96
+ &-auto-fit {
97
+ grid-template-columns: repeat(auto-fit, minmax(var(--grid-auto-min, 250px), 1fr));
98
+ }
99
+
100
+ &-auto-fill {
101
+ grid-template-columns: repeat(auto-fill, minmax(var(--grid-auto-min, 250px), 1fr));
102
+ }
103
+
104
+ // ========================================================================================
105
+ // ADVANCED GRID FEATURES
106
+ // ========================================================================================
107
+ &-dense {
108
+ grid-auto-flow: dense;
109
+ }
110
+ }
111
+
112
+ // ========================================================================================
113
+ // GRID COLUMN SPANS
114
+ // ========================================================================================
115
+ @for $i from 1 through 12 {
116
+ .#{$prefix}col-span-#{$i} {
117
+ grid-column: span #{$i} / span #{$i};
118
+ }
119
+ }
120
+ .#{$prefix}col-span-full {
121
+ grid-column: 1 / -1;
122
+ }
123
+
124
+ @for $i from 2 through 12 {
125
+ .#{$prefix}col-start-#{$i} {
126
+ grid-column-start: #{$i};
127
+ }
128
+ }
129
+
130
+ @for $i from 1 through 13 {
131
+ .#{$prefix}col-end-#{$i} {
132
+ grid-column-end: #{$i};
133
+ }
134
+ }
135
+
136
+ } // end @if zeus-enable-grid-system
137
+
138
+ }
139
+
140
+ // ========================================================================================
141
+ // COMMON GRID PATTERNS - Pre-built layouts
142
+ // ========================================================================================
143
+ // These are complete, self-contained components with their own internal breakpoint
144
+ // behavior — NOT meant to have breakpoint-prefixed variants (e.g. "md:grid-sidebar"
145
+ // is meaningless, since the responsive behavior is already baked in below).
146
+ // Emitted ONCE at the base level only — never inside the responsive breakpoint loop
147
+ // in classes.scss, otherwise the internal screen-below() gets nested inside an outer
148
+ // screen-above() and can produce impossible/dead media queries at higher breakpoints.
149
+ @mixin load-grid-patterns($prefix: "") {
150
+ @if config.$zeus-enable-grid-system {
151
+
152
+ // Cards layout with auto-fit
153
+ .#{$prefix}grid-cards {
154
+ display: grid;
155
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
156
+ gap: var(--col-gap-md);
157
+ }
158
+
159
+ // Sidebar layout (250px sidebar + fluid main)
160
+ // minmax(0, 1fr) everywhere below (not bare 1fr) — see .grid-cols-* comment.
161
+ .#{$prefix}grid-sidebar {
162
+ display: grid;
163
+ grid-template-columns: 250px minmax(0, 1fr);
164
+ gap: var(--col-gap-md);
165
+
166
+ @include screen-below(lg) {
167
+ grid-template-columns: minmax(0, 1fr);
168
+ }
169
+ }
170
+
171
+ // Two column layout (equal width)
172
+ .#{$prefix}grid-split {
173
+ display: grid;
174
+ grid-template-columns: repeat(2, minmax(0, 1fr));
175
+ gap: var(--col-gap-md);
176
+
177
+ @include screen-below(lg) {
178
+ grid-template-columns: minmax(0, 1fr);
179
+ }
180
+ }
181
+
182
+ // Three column layout
183
+ .#{$prefix}grid-thirds {
184
+ display: grid;
185
+ grid-template-columns: repeat(3, minmax(0, 1fr));
186
+ gap: var(--col-gap-md);
187
+
188
+ @include screen-below(lg) {
189
+ grid-template-columns: minmax(0, 1fr);
190
+ }
191
+ }
192
+
193
+ } // end @if zeus-enable-grid-system
194
+
195
+ }
@@ -0,0 +1,116 @@
1
+ // ╔══════════════════════════════════════════════════════════════╗
2
+ // ║ ⚡ Zeus CSS — Classes ║
3
+ // ║ ║
4
+ // ║ Core styles and definitions for classes. ║
5
+ // ╚══════════════════════════════════════════════════════════════╝
6
+
7
+ @use "../../../zeus.config" as config;
8
+ @use "../../core/engine/responsive" as *;
9
+
10
+ @use "./classes/typography";
11
+ @use "./classes/colors";
12
+ @use "./classes/state-variants";
13
+ @use "./classes/borders";
14
+ @use "./classes/shadows";
15
+ @use "./classes/z-index";
16
+ @use "./classes/sizes";
17
+ @use "./classes/sizing-utils";
18
+ @use "./classes/position";
19
+ @use "./classes/misc-utils";
20
+ @use "./classes/spacing";
21
+ @use "./classes/sections";
22
+ @use "./classes/buttons";
23
+ @use "./classes/utilities";
24
+ @use "./classes/containers";
25
+ @use "./classes/flexbox";
26
+ @use "./classes/grid";
27
+ @use "./classes/animations";
28
+ @use "./classes/aspect-ratio";
29
+ @use "./classes/compounds";
30
+
31
+ // ============================================================================
32
+ // MIXINS FOR DIFFERENT UTILITY GROUPS
33
+ // ============================================================================
34
+
35
+ // 1. Heavy components that do NOT need responsive breakpoints
36
+ @mixin load-components($prefix: "") {
37
+ @include buttons.load-buttons($prefix);
38
+ @include animations.load-animations($prefix);
39
+ @include compounds.load-compounds($prefix);
40
+ @include aspect-ratio.load-aspect-ratio($prefix);
41
+ @include sections.load-sections($prefix);
42
+ @include grid.load-grid-patterns($prefix);
43
+ }
44
+
45
+ // 2. Fluid & Static utilities (clamp() based or binary) that do NOT need breakpoints
46
+ // .container and the .hidden-*/.article/.highlight utilities live here too:
47
+ // they have no breakpoint-dependent variants of their own (hidden-* already encodes
48
+ // its breakpoint in the class name via its own screen-*() call), so generating
49
+ // "md:hidden-desktops" etc. inside the responsive loop below would nest an outer
50
+ // breakpoint check around an already-fixed inner one — producing impossible/dead
51
+ // media queries at higher breakpoints (e.g. min-width:2560px AND max-width:1279px).
52
+ @mixin load-base-only-utilities($prefix: "") {
53
+ @include typography.load-typography($prefix);
54
+ @include colors.load-colors($prefix);
55
+ @include state-variants.load-state-variants($prefix);
56
+ @include borders.load-borders($prefix);
57
+ @include shadows.load-shadows($prefix);
58
+ @include z-index.load-z-index($prefix);
59
+ @include spacing.load-spacing($prefix);
60
+ @include utilities.load-utilities($prefix);
61
+ @include containers.load-containers($prefix);
62
+ }
63
+
64
+ // 3. Structural & Layout utilities that MUST be responsive (breakpoints)
65
+ @mixin load-responsive-utilities($prefix: "") {
66
+ @include sizes.load-sizes($prefix);
67
+ @include sizing-utils.load-sizing-utils($prefix);
68
+ @include position.load-position($prefix);
69
+ @include misc-utils.load-misc-utils($prefix);
70
+ @include flexbox.load-flexbox($prefix);
71
+ @include grid.load-grid($prefix);
72
+ }
73
+
74
+ // Global mixin to load EVERYTHING for the base level
75
+ @mixin load-all-classes($prefix: "") {
76
+ @include load-components($prefix);
77
+ @include load-base-only-utilities($prefix);
78
+ @include load-responsive-utilities($prefix);
79
+ }
80
+
81
+ // ============================================================================
82
+ // GENERATE CSS CLASSES
83
+ // ============================================================================
84
+
85
+ $_zp: "";
86
+ @if config.$zeus-use-prefix {
87
+ $_zp: config.$zeus-class-prefix;
88
+ }
89
+
90
+ // STEP 1: Generate Components
91
+ @layer components {
92
+ @include load-components($_zp);
93
+ }
94
+
95
+ // STEP 2: Generate Utilities (Base & Responsive)
96
+ @layer utilities {
97
+ @include load-base-only-utilities($_zp);
98
+ @include load-responsive-utilities($_zp);
99
+
100
+ // STEP 3: Generate Breakpoint Responsive Classes
101
+ // By looping breakpoints at the top level, we guarantee that all `lg:` classes
102
+ // come after all `md:` classes, completely eliminating CSS specificity bugs.
103
+ //
104
+ // OPTIMIZATION: We ONLY load structural utilities (Grid, Flex, etc) inside
105
+ // breakpoints to drastically reduce CSS bloat. Colors, Spacing, and Typography
106
+ // are intentionally excluded because they are handled by the Fluid Engine.
107
+ @if config.$zeus-enable-responsive-classes {
108
+ @each $bp-name, $bp-value in config.$zeus-breakpoints {
109
+ @if $bp-value != 0 {
110
+ @include screen-above($bp-name) {
111
+ @include load-responsive-utilities("#{$bp-name}\\:#{$_zp}");
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,54 @@
1
+ // ╔══════════════════════════════════════════════════════════════╗
2
+ // ║ ⚡ Zeus CSS — Html Body ║
3
+ // ║ ║
4
+ // ║ Core styles and definitions for html body. ║
5
+ // ╚══════════════════════════════════════════════════════════════╝
6
+
7
+ @use "sass:map";
8
+ @use "../../core/design" as *;
9
+ @use "../../core/engine" as *;
10
+ @use "../../../zeus.config" as config;
11
+
12
+ $_zp: "";
13
+ @if config.$zeus-use-prefix {
14
+ $_zp: config.$zeus-class-prefix;
15
+ }
16
+
17
+ @layer base {
18
+ html {
19
+ box-sizing: border-box;
20
+ // 100% respects the user's browser font-size preference.
21
+ // $root-font-size (basic.scss) is only the px→rem conversion base, not an override.
22
+ font-size: 100%;
23
+ -ms-overflow-style: scrollbar;
24
+ // scroll-behavior is handled by reset.scss under a prefers-reduced-motion guard
25
+ //
26
+ // No global overflow-x/max-width clipping here — that hides real horizontal
27
+ // overflow bugs instead of surfacing them, and can break position: sticky in
28
+ // some browsers. Use the opt-in .no-overflow-x utility (classes/_utilities.scss)
29
+ // if a specific project genuinely needs it.
30
+ }
31
+
32
+ // Container Context for CQI typography & sizing.
33
+ // .grid is deliberately NOT included: it's a structural/layout tool, not a
34
+ // "give me a reference frame" tool. Including it caused compounding shrink —
35
+ // every nested .grid reset the fluid reference frame, so a grid inside a
36
+ // grid inside a narrow column made every token (spacing/borders/icons/
37
+ // typography) smaller with each level. Use the opt-in .cq class below on
38
+ // any specific .grid that should size its own contents.
39
+ body, main, .#{$_zp}container {
40
+ container-type: inline-size;
41
+ }
42
+
43
+ // Opt-in Container Queries for Developers
44
+ .#{$_zp}cq { container-type: inline-size; }
45
+ .#{$_zp}cq-size { container-type: size; }
46
+
47
+ body {
48
+ color: var(--color-text);
49
+ background-color: var(--color-background);
50
+ overflow-wrap: anywhere;
51
+ word-break: break-word;
52
+ @include text(body);
53
+ }
54
+ }
@@ -0,0 +1,77 @@
1
+ // ╔══════════════════════════════════════════════════════════════╗
2
+ // ║ ⚡ Zeus CSS — Property Registration ║
3
+ // ║ ║
4
+ // ║ Core styles and definitions for property registration. ║
5
+ // ╚══════════════════════════════════════════════════════════════╝
6
+
7
+ @use "sass:map";
8
+ @use "sass:meta";
9
+ @use "../../../zeus.config" as config;
10
+ @use "../../core/design/dimensions/spaces" as *;
11
+ @use "../../core/design/dimensions/sizes" as *;
12
+ @use "../../core/design/borders/border-radius" as *;
13
+ @use "../../core/design/borders/border-line" as *;
14
+ @use "../../core/design/typography/typography" as *;
15
+ @use "../../core/design/colors/semantic-colors" as *;
16
+
17
+ // ── Private generators ──────────────────────────────────────────
18
+ //
19
+ // These mixins are called at TOP LEVEL below (outside any selector),
20
+ // which is the only valid location for @property rules per CSS spec.
21
+ // SCSS mixins called at top level DO output top-level @property rules.
22
+
23
+ // Registers all tokens from a (floor, ceil) map as <length> @property.
24
+ // initial-value = min value (mobile baseline).
25
+ // Adding a token to the source map auto-registers it here.
26
+ @mixin _register-length-tokens($prefix, $token-map) {
27
+ @each $name, $config in $token-map {
28
+ $min: map.get($config, "floor");
29
+ @property --#{$prefix}-#{$name} {
30
+ syntax: "<length>";
31
+ inherits: true;
32
+ initial-value: #{$min}px;
33
+ }
34
+ }
35
+ }
36
+
37
+ // Registers all color tokens from the universal palette map as <color> @property.
38
+ // Structure: flat $zeus-colors map
39
+ // initial-value = the color value.
40
+ // ╔══════════════════════════════════════════════════════════════╗
41
+ // ║ WHAT IS @property ║
42
+ // ║ ║
43
+ // ║ Standard CSS custom property: ║
44
+ // ║ :root { --space-sm: 8px; } ║
45
+ // ║ → The browser DOES NOT know the type and accepts anything.║
46
+ // ║ ║
47
+ // ║ With @property: ║
48
+ // ║ @property --space-sm { syntax: "<length>"; } ║
49
+ // ║ → The browser KNOWS the type. Invalid values are rejected ║
50
+ // ║ and replaced by the initial-value fallback. ║
51
+ // ║ ║
52
+ // ║ WHAT IT PROVIDES: ║
53
+ // ║ 1. TYPE SAFETY - Rejects invalid values ║
54
+ // ║ 2. FALLBACK - Initial value acts as a safe baseline ║
55
+ // ║ 3. TRANSITIONS - Enables CSS transitions on custom properties║
56
+ // ╚══════════════════════════════════════════════════════════════╝
57
+ @mixin _register-color-tokens($colors-map) {
58
+ @each $name, $value in $colors-map {
59
+ @if meta.type-of($value) == "color" or meta.type-of($value) == "string" {
60
+ @property --color-#{$name} {
61
+ syntax: "<color>";
62
+ inherits: true;
63
+ initial-value: #{$value};
64
+ }
65
+ }
66
+ }
67
+ }
68
+
69
+ // ── Registration — runs only if flag is enabled ─────────────────
70
+
71
+ @if config.$zeus-enable-property-registration {
72
+ @layer tokens {
73
+ // 🎨 Colors — all $zeus-colors universal tokens → --color-{name}
74
+ // Provides CSS type safety and enables smooth transitions for color variables.
75
+ @include _register-color-tokens(config.$zeus-colors);
76
+ }
77
+ } // end @if zeus-enable-property-registration
@@ -0,0 +1,147 @@
1
+ // ╔══════════════════════════════════════════════════════════════╗
2
+ // ║ ⚡ Zeus CSS — Reset ║
3
+ // ║ ║
4
+ // ║ Core styles and definitions for reset. ║
5
+ // ╚══════════════════════════════════════════════════════════════╝
6
+
7
+ @use "../../../zeus.config" as config;
8
+ @use "../../core/design" as *;
9
+
10
+ /**
11
+ * Zeus CSS Reset
12
+ */
13
+
14
+ @layer reset {
15
+ // Document normalization
16
+ :where(html) {
17
+ -webkit-text-size-adjust: 100%;
18
+ -webkit-tap-highlight-color: transparent;
19
+ text-rendering: optimizeLegibility;
20
+ }
21
+
22
+ // Smooth scrolling with motion preference
23
+ @media (prefers-reduced-motion: no-preference) {
24
+ :where(html) {
25
+ scroll-behavior: smooth;
26
+ }
27
+ }
28
+
29
+ // Body foundation
30
+ :where(html, body) {
31
+ margin: 0;
32
+ padding: 0;
33
+ }
34
+
35
+ // Universal box-sizing
36
+ *,
37
+ *::before,
38
+ *::after {
39
+ box-sizing: border-box;
40
+ }
41
+
42
+ // Remove default margins
43
+ :where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre) {
44
+ margin: 0;
45
+ }
46
+
47
+ :where(iframe) {
48
+ border: 0;
49
+ }
50
+
51
+ // Form elements inherit font
52
+ :where(input, button, textarea, select) {
53
+ font: inherit;
54
+ color: inherit;
55
+ }
56
+
57
+ // Button reset
58
+ :where(button) {
59
+ background: none;
60
+ border: 0;
61
+ padding: 0;
62
+ cursor: pointer;
63
+
64
+ &:disabled {
65
+ cursor: not-allowed;
66
+ }
67
+ }
68
+
69
+ // Input reset
70
+ :where(input, textarea, select) {
71
+ background: transparent;
72
+ border: 0;
73
+ }
74
+
75
+ // Remove fieldset borders
76
+ :where(fieldset) {
77
+ border: 0;
78
+ padding: 0;
79
+ margin: 0;
80
+ min-width: 0;
81
+ }
82
+
83
+ // List reset for semantic lists
84
+ :where(ul, ol)[role="list"] {
85
+ list-style: none;
86
+ padding: 0;
87
+ }
88
+
89
+ // Table normalization
90
+ :where(table) {
91
+ border-collapse: collapse;
92
+ border-spacing: 0;
93
+ }
94
+
95
+ // Anchor Elements and Hyperlinks
96
+ :where(a) {
97
+ color: inherit;
98
+ text-decoration-skip-ink: auto;
99
+ }
100
+
101
+ // Hidden elements
102
+ :where([hidden]) {
103
+ display: none !important;
104
+ }
105
+
106
+ // Focus visible
107
+ :where(:focus-visible) {
108
+ outline: #{config.$zeus-focus-ring};
109
+ outline-offset: 2px;
110
+ }
111
+
112
+ :where(:focus:not(:focus-visible)) {
113
+ outline: none;
114
+ }
115
+
116
+ // Remove number input spinners
117
+ :where(input[type="number"]::-webkit-inner-spin-button),
118
+ :where(input[type="number"]::-webkit-outer-spin-button) {
119
+ appearance: none;
120
+ }
121
+
122
+ :where(input[type="number"]) {
123
+ appearance: textfield;
124
+ }
125
+
126
+ // Search input
127
+ :where(input[type="search"]::-webkit-search-decoration) {
128
+ appearance: none;
129
+ }
130
+
131
+ // Code elements
132
+ :where(pre, code, kbd, samp) {
133
+ font-family: ui-monospace, monospace;
134
+ }
135
+
136
+ // Small text
137
+ :where(small) {
138
+ font-size: 0.875em;
139
+ }
140
+
141
+ // HR element
142
+ :where(hr) {
143
+ border: 0;
144
+ border-top: 1px solid;
145
+ color: inherit;
146
+ }
147
+ }