@mastors/core 1.1.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 (96) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +940 -0
  3. package/api/_index.scss +5 -0
  4. package/dist/mastors-core.css +7419 -0
  5. package/dist/mastors-core.css.map +1 -0
  6. package/package.json +73 -0
  7. package/postinstall.js +41 -0
  8. package/scripts/generate-tokens.js +259 -0
  9. package/scss/abstracts/_index.scss +6 -0
  10. package/scss/abstracts/_maps.scss +9 -0
  11. package/scss/abstracts/_placeholders.scss +7 -0
  12. package/scss/accessibility/_focus.scss +21 -0
  13. package/scss/accessibility/_index.scss +7 -0
  14. package/scss/accessibility/_motion.scss +14 -0
  15. package/scss/accessibility/_print.scss +52 -0
  16. package/scss/accessibility/_screen-reader.scss +31 -0
  17. package/scss/api/_index.scss +14 -0
  18. package/scss/base/_box-sizing.scss +6 -0
  19. package/scss/base/_index.scss +7 -0
  20. package/scss/base/_reset.scss +59 -0
  21. package/scss/base/_root.scss +43 -0
  22. package/scss/base/_typography-base.scss +40 -0
  23. package/scss/config/_flags.scss +13 -0
  24. package/scss/config/_index.scss +12 -0
  25. package/scss/config/_settings.scss +18 -0
  26. package/scss/functions/_color.scss +66 -0
  27. package/scss/functions/_em.scss +28 -0
  28. package/scss/functions/_index.scss +15 -0
  29. package/scss/functions/_map-helpers.scss +29 -0
  30. package/scss/functions/_math.scss +40 -0
  31. package/scss/functions/_rem.scss +27 -0
  32. package/scss/functions/_string.scss +57 -0
  33. package/scss/functions/_vars.scss +49 -0
  34. package/scss/generators/_class-generator.scss +83 -0
  35. package/scss/generators/_custom-property-generator.scss +29 -0
  36. package/scss/generators/_index.scss +6 -0
  37. package/scss/generators/_responsive-generator.scss +28 -0
  38. package/scss/helpers/_clearfix.scss +9 -0
  39. package/scss/helpers/_index.scss +7 -0
  40. package/scss/helpers/_ratio.scss +22 -0
  41. package/scss/helpers/_truncate.scss +25 -0
  42. package/scss/helpers/_visually-hidden.scss +39 -0
  43. package/scss/index.scss +41 -0
  44. package/scss/mixins/_breakpoint.scss +33 -0
  45. package/scss/mixins/_container.scss +20 -0
  46. package/scss/mixins/_elevation.scss +12 -0
  47. package/scss/mixins/_index.scss +9 -0
  48. package/scss/mixins/_pseudo.scss +13 -0
  49. package/scss/mixins/_theme.scss +31 -0
  50. package/scss/mixins/_transition.scss +20 -0
  51. package/scss/responsive/_container-queries.scss +31 -0
  52. package/scss/responsive/_engine.scss +65 -0
  53. package/scss/responsive/_fluid-type.scss +40 -0
  54. package/scss/responsive/_index.scss +6 -0
  55. package/scss/semantic/_colors.scss +29 -0
  56. package/scss/semantic/_index.scss +6 -0
  57. package/scss/semantic/_spacing.scss +13 -0
  58. package/scss/semantic/_typography.scss +13 -0
  59. package/scss/themes/_base-theme.scss +28 -0
  60. package/scss/themes/_dark.scss +59 -0
  61. package/scss/themes/_index.scss +6 -0
  62. package/scss/themes/_light.scss +31 -0
  63. package/scss/tokens/_color.scss +100 -0
  64. package/scss/tokens/_index.scss +12 -0
  65. package/scss/tokens/_opacity.scss +28 -0
  66. package/scss/tokens/_radii.scss +21 -0
  67. package/scss/tokens/_shadows.scss +20 -0
  68. package/scss/tokens/_sizing.scss +47 -0
  69. package/scss/tokens/_spacing.scss +48 -0
  70. package/scss/tokens/_transitions.scss +27 -0
  71. package/scss/tokens/_typography.scss +63 -0
  72. package/scss/tokens/_z-index.scss +21 -0
  73. package/scss/utilities/_animation.scss +125 -0
  74. package/scss/utilities/_borders.scss +55 -0
  75. package/scss/utilities/_colors.scss +42 -0
  76. package/scss/utilities/_cursor.scss +28 -0
  77. package/scss/utilities/_display.scss +26 -0
  78. package/scss/utilities/_index.scss +20 -0
  79. package/scss/utilities/_interaction.scss +156 -0
  80. package/scss/utilities/_layout.scss +162 -0
  81. package/scss/utilities/_opacity.scss +9 -0
  82. package/scss/utilities/_overflow.scss +36 -0
  83. package/scss/utilities/_pointer-events.scss +6 -0
  84. package/scss/utilities/_position.scss +32 -0
  85. package/scss/utilities/_shadows.scss +11 -0
  86. package/scss/utilities/_sizing.scss +40 -0
  87. package/scss/utilities/_spacing.scss +42 -0
  88. package/scss/utilities/_transform.scss +43 -0
  89. package/scss/utilities/_typography.scss +163 -0
  90. package/scss/utilities/_z-index.scss +9 -0
  91. package/scss/variables/_breakpoints.scss +14 -0
  92. package/scss/variables/_container.scss +13 -0
  93. package/scss/variables/_global.scss +8 -0
  94. package/scss/variables/_grid.scss +7 -0
  95. package/scss/variables/_index.scss +7 -0
  96. package/scss/vendors/_index.scss +15 -0
@@ -0,0 +1,125 @@
1
+ // utilities/_animation.scss
2
+ // Transition and animation utility classes.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "../tokens/transitions" as tr;
6
+ @use "../generators/class-generator" as gen;
7
+
8
+ // ── Transition property ───────────────────────────────────────────────────────
9
+
10
+ .transition-none { transition-property: none; }
11
+ .transition-all { transition-property: all; }
12
+ .transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; }
13
+ .transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; }
14
+ .transition-opacity { transition-property: opacity; }
15
+ .transition-shadow { transition-property: box-shadow; }
16
+ .transition-transform { transition-property: transform; }
17
+
18
+ // ── Transition duration ───────────────────────────────────────────────────────
19
+
20
+ @each $key, $val in tr.$duration-tokens {
21
+ .duration-#{$key} { transition-duration: $val; }
22
+ }
23
+
24
+ // ── Transition timing function ────────────────────────────────────────────────
25
+
26
+ @each $key, $val in tr.$easing-tokens {
27
+ .ease-#{$key} { transition-timing-function: $val; }
28
+ }
29
+
30
+ // ── Transition delay ──────────────────────────────────────────────────────────
31
+
32
+ @each $key, $val in tr.$duration-tokens {
33
+ .delay-#{$key} { transition-delay: $val; }
34
+ }
35
+
36
+ // ── Animation ────────────────────────────────────────────────────────────────
37
+
38
+ .animate-none { animation: none; }
39
+ .animate-spin { animation: mastors-spin 1s linear infinite; }
40
+ .animate-ping { animation: mastors-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
41
+ .animate-pulse { animation: mastors-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
42
+ .animate-bounce { animation: mastors-bounce 1s infinite; }
43
+ .animate-fade-in { animation: mastors-fade-in 0.3s ease-out both; }
44
+ .animate-fade-out{ animation: mastors-fade-out 0.3s ease-in both; }
45
+ .animate-slide-up { animation: mastors-slide-up 0.3s ease-out both; }
46
+ .animate-slide-down { animation: mastors-slide-down 0.3s ease-out both; }
47
+ .animate-scale-in { animation: mastors-scale-in 0.2s ease-out both; }
48
+
49
+ // ── Keyframe definitions ─────────────────────────────────────────────────────
50
+
51
+ @keyframes mastors-spin {
52
+ from { transform: rotate(0deg); }
53
+ to { transform: rotate(360deg); }
54
+ }
55
+
56
+ @keyframes mastors-ping {
57
+ 75%, 100% { transform: scale(2); opacity: 0%; }
58
+ }
59
+
60
+ @keyframes mastors-pulse {
61
+ 0%, 100% { opacity: 100%; }
62
+ 50% { opacity: 50%; }
63
+ }
64
+
65
+ @keyframes mastors-bounce {
66
+ 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
67
+ 50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
68
+ }
69
+
70
+ @keyframes mastors-fade-in {
71
+ from { opacity: 0%; }
72
+ to { opacity: 100%; }
73
+ }
74
+
75
+ @keyframes mastors-fade-out {
76
+ from { opacity: 100%; }
77
+ to { opacity: 0%; }
78
+ }
79
+
80
+ @keyframes mastors-slide-up {
81
+ from { opacity: 0%; transform: translateY(0.5rem); }
82
+ to { opacity: 100%; transform: translateY(0); }
83
+ }
84
+
85
+ @keyframes mastors-slide-down {
86
+ from { opacity: 0%; transform: translateY(-0.5rem); }
87
+ to { opacity: 100%; transform: translateY(0); }
88
+ }
89
+
90
+ @keyframes mastors-scale-in {
91
+ from { opacity: 0%; transform: scale(0.95); }
92
+ to { opacity: 100%; transform: scale(1); }
93
+ }
94
+
95
+ // ── Animation control utilities ───────────────────────────────────────────────
96
+
97
+ @include gen.generate-utilities((
98
+ "animation-fill-mode": (
99
+ property: animation-fill-mode,
100
+ prefix: "fill",
101
+ values: (
102
+ "none": none,
103
+ "forwards": forwards,
104
+ "backwards": backwards,
105
+ "both": both,
106
+ ),
107
+ ),
108
+ "animation-play-state": (
109
+ property: animation-play-state,
110
+ prefix: "animation",
111
+ values: (
112
+ "running": running,
113
+ "paused": paused,
114
+ ),
115
+ ),
116
+ "animation-iteration": (
117
+ property: animation-iteration-count,
118
+ prefix: "animate-repeat",
119
+ values: (
120
+ "0": 0,
121
+ "1": 1,
122
+ "infinite": infinite,
123
+ ),
124
+ ),
125
+ ));
@@ -0,0 +1,55 @@
1
+ // utilities/_borders.scss
2
+ // Border width, style, and radius utility classes.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "sass:list";
6
+ @use "../tokens/color" as ct;
7
+ @use "../tokens/radii" as ra;
8
+
9
+ // Border width
10
+ .border { border-width: 1px; border-style: solid; }
11
+ .border-0 { border-width: 0; }
12
+ .border-2 { border-width: 2px; border-style: solid; }
13
+ .border-4 { border-width: 4px; border-style: solid; }
14
+ .border-8 { border-width: 8px; border-style: solid; }
15
+
16
+ .border-t { border-top-width: 1px; border-top-style: solid; }
17
+ .border-r { border-right-width: 1px; border-right-style: solid; }
18
+ .border-b { border-bottom-width: 1px; border-bottom-style: solid; }
19
+ .border-l { border-left-width: 1px; border-left-style: solid; }
20
+
21
+ // Border style
22
+ .border-solid { border-style: solid; }
23
+ .border-dashed { border-style: dashed; }
24
+ .border-dotted { border-style: dotted; }
25
+ .border-none { border-style: none; }
26
+
27
+ // Border color (semantic + key primitive steps)
28
+ .border-transparent { border-color: transparent; }
29
+ .border-current { border-color: currentColor; }
30
+ .border-default { border-color: var(--mastors-border); }
31
+ .border-strong { border-color: var(--mastors-border-strong); }
32
+
33
+ // Border radius — all scale steps from token map
34
+ @each $key, $val in ra.$radius-tokens {
35
+ .rounded-#{$key} { border-radius: $val; }
36
+ }
37
+ // Shorthand: .rounded = base radius
38
+ .rounded { border-radius: ra.radius("base"); }
39
+
40
+ // Directional border radius
41
+ $-radius-sides: (
42
+ "t": ("border-top-left-radius", "border-top-right-radius"),
43
+ "b": ("border-bottom-left-radius", "border-bottom-right-radius"),
44
+ "l": ("border-top-left-radius", "border-bottom-left-radius"),
45
+ "r": ("border-top-right-radius", "border-bottom-right-radius"),
46
+ );
47
+
48
+ @each $side, $props in $-radius-sides {
49
+ @each $key, $val in ra.$radius-tokens {
50
+ .rounded-#{$side}-#{$key} {
51
+ #{list.nth($props, 1)}: $val;
52
+ #{list.nth($props, 2)}: $val;
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,42 @@
1
+ // utilities/_colors.scss
2
+ // Color utility classes (text, background, border color).
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "../tokens/color" as ct;
6
+
7
+ // Text color utilities — semantic
8
+ .text-default { color: var(--mastors-text); }
9
+ .text-muted { color: var(--mastors-text-muted); }
10
+ .text-subtle { color: var(--mastors-text-subtle); }
11
+ .text-inverse { color: var(--mastors-text-inverse); }
12
+ .text-accent { color: var(--mastors-accent); }
13
+
14
+ // Text color utilities — primitives (primary, neutral, success, warning, error, info)
15
+ $-text-palettes: "primary", "neutral", "success", "warning", "error", "info";
16
+ $-text-shades: "50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950";
17
+
18
+ @each $palette in $-text-palettes {
19
+ @each $shade in $-text-shades {
20
+ .text-#{$palette}-#{$shade} { color: ct.color($palette, $shade); }
21
+ }
22
+ }
23
+ .text-white { color: ct.color("white"); }
24
+ .text-black { color: ct.color("black"); }
25
+ .text-current { color: currentColor; }
26
+ .text-transparent { color: transparent; }
27
+
28
+ // Background color utilities — semantic
29
+ .bg-default { background-color: var(--mastors-bg); }
30
+ .bg-subtle { background-color: var(--mastors-bg-subtle); }
31
+ .bg-surface { background-color: var(--mastors-surface); }
32
+ .bg-accent { background-color: var(--mastors-accent); }
33
+
34
+ // Background color utilities — primitives
35
+ @each $palette in $-text-palettes {
36
+ @each $shade in $-text-shades {
37
+ .bg-#{$palette}-#{$shade} { background-color: ct.color($palette, $shade); }
38
+ }
39
+ }
40
+ .bg-white { background-color: ct.color("white"); }
41
+ .bg-black { background-color: ct.color("black"); }
42
+ .bg-transparent { background-color: transparent; }
@@ -0,0 +1,28 @@
1
+ // utilities/_cursor.scss
2
+ // Cursor utility classes.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "../generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "cursor": (
9
+ property: cursor,
10
+ prefix: "cursor",
11
+ values: (
12
+ "auto": auto,
13
+ "default": default,
14
+ "pointer": pointer,
15
+ "wait": wait,
16
+ "text": text,
17
+ "move": move,
18
+ "help": help,
19
+ "not-allowed": not-allowed,
20
+ "none": none,
21
+ "grab": grab,
22
+ "grabbing": grabbing,
23
+ "crosshair": crosshair,
24
+ "zoom-in": zoom-in,
25
+ "zoom-out": zoom-out,
26
+ ),
27
+ ),
28
+ ));
@@ -0,0 +1,26 @@
1
+ // utilities/_display.scss
2
+ // Display utility classes.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "../generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "display": (
9
+ property: display,
10
+ values: (
11
+ "block": block,
12
+ "inline-block": inline-block,
13
+ "inline": inline,
14
+ "flex": flex,
15
+ "inline-flex": inline-flex,
16
+ "grid": grid,
17
+ "inline-grid": inline-grid,
18
+ "table": table,
19
+ "table-cell": table-cell,
20
+ "table-row": table-row,
21
+ "contents": contents,
22
+ "hidden": none,
23
+ ),
24
+ responsive: true,
25
+ ),
26
+ ));
@@ -0,0 +1,20 @@
1
+ // utilities/_index.scss
2
+ // ─────────────────────────────────────────────────────────────
3
+
4
+ @forward "display";
5
+ @forward "position";
6
+ @forward "overflow";
7
+ @forward "spacing";
8
+ @forward "sizing";
9
+ @forward "colors";
10
+ @forward "borders";
11
+ @forward "shadows";
12
+ @forward "opacity";
13
+ @forward "cursor";
14
+ @forward "pointer-events";
15
+ @forward "z-index";
16
+ @forward "transform";
17
+ @forward "typography";
18
+ @forward "layout";
19
+ @forward "interaction";
20
+ @forward "animation";
@@ -0,0 +1,156 @@
1
+ // utilities/_interaction.scss
2
+ // Interaction and user-experience utilities:
3
+ // user-select, resize, scroll-behavior, scroll-snap, touch-action,
4
+ // and state-variant prefixes (hover:, focus:, active:, disabled:).
5
+ // ─────────────────────────────────────────────────────────────
6
+
7
+ @use "../generators/class-generator" as gen;
8
+
9
+ // ── User select ───────────────────────────────────────────────────────────────
10
+
11
+ @include gen.generate-utilities((
12
+ "select": (
13
+ property: user-select,
14
+ prefix: "select",
15
+ values: (
16
+ "none": none,
17
+ "text": text,
18
+ "all": all,
19
+ "auto": auto,
20
+ ),
21
+ ),
22
+ ));
23
+
24
+ // ── Resize ────────────────────────────────────────────────────────────────────
25
+
26
+ @include gen.generate-utilities((
27
+ "resize": (
28
+ property: resize,
29
+ prefix: "resize",
30
+ values: (
31
+ "none": none,
32
+ "x": horizontal,
33
+ "y": vertical,
34
+ "": both, // .resize
35
+ ),
36
+ ),
37
+ ));
38
+
39
+ // ── Scroll behavior ───────────────────────────────────────────────────────────
40
+
41
+ .scroll-auto { scroll-behavior: auto; }
42
+ .scroll-smooth { scroll-behavior: smooth; }
43
+
44
+ // ── Scroll snap ───────────────────────────────────────────────────────────────
45
+
46
+ // Container
47
+ @include gen.generate-utilities((
48
+ "snap-type": (
49
+ property: scroll-snap-type,
50
+ prefix: "snap",
51
+ values: (
52
+ "none": none,
53
+ "x": x var(--mastors-snap-strictness, mandatory),
54
+ "y": y var(--mastors-snap-strictness, mandatory),
55
+ "both": both var(--mastors-snap-strictness, mandatory),
56
+ "mandatory": x mandatory,
57
+ "proximity": x proximity,
58
+ ),
59
+ ),
60
+ ));
61
+
62
+ // Item
63
+ @include gen.generate-utilities((
64
+ "snap-align": (
65
+ property: scroll-snap-align,
66
+ prefix: "snap",
67
+ values: (
68
+ "start": start,
69
+ "end": end,
70
+ "center": center,
71
+ "align-none": none,
72
+ ),
73
+ ),
74
+ ));
75
+
76
+ .snap-stop-always { scroll-snap-stop: always; }
77
+ .snap-stop-normal { scroll-snap-stop: normal; }
78
+
79
+ // ── Scroll margin/padding ─────────────────────────────────────────────────────
80
+
81
+ $-scroll-values: ("0": 0px, "4": 1rem, "8": 2rem, "16": 4rem);
82
+
83
+ @each $key, $val in $-scroll-values {
84
+ .scroll-m-#{$key} { scroll-margin: $val; }
85
+ .scroll-mt-#{$key} { scroll-margin-top: $val; }
86
+ .scroll-mb-#{$key} { scroll-margin-bottom: $val; }
87
+ .scroll-p-#{$key} { scroll-padding: $val; }
88
+ .scroll-pt-#{$key} { scroll-padding-top: $val; }
89
+ .scroll-pb-#{$key} { scroll-padding-bottom: $val; }
90
+ }
91
+
92
+ // ── Touch action ──────────────────────────────────────────────────────────────
93
+
94
+ @include gen.generate-utilities((
95
+ "touch": (
96
+ property: touch-action,
97
+ prefix: "touch",
98
+ values: (
99
+ "auto": auto,
100
+ "none": none,
101
+ "pan-x": pan-x,
102
+ "pan-y": pan-y,
103
+ "pan-left": pan-left,
104
+ "pan-right": pan-right,
105
+ "pan-up": pan-up,
106
+ "pan-down": pan-down,
107
+ "pinch-zoom": pinch-zoom,
108
+ "manipulation": manipulation,
109
+ ),
110
+ ),
111
+ ));
112
+
113
+ // ── State-variant pseudo-class utilities ─────────────────────────────────────
114
+ // Hover, focus, active, disabled, and group-hover variants.
115
+ // Pattern: .hover\:{utility}:hover { ... }
116
+ // These are the most commonly used interactive overrides. For full
117
+ // state-variant coverage, use a PostCSS/Vite plugin or the responsive engine.
118
+
119
+ // Hover: opacity
120
+ @each $key, $val in ("0": 0, "50": 0.5, "75": 0.75, "100": 1) {
121
+ .hover\:opacity-#{$key}:hover { opacity: $val; }
122
+ }
123
+
124
+ // Hover: background accent
125
+ .hover\:bg-accent:hover { background-color: var(--mastors-accent-hover); }
126
+ .hover\:text-accent:hover { color: var(--mastors-accent-hover); }
127
+ .hover\:underline:hover { text-decoration-line: underline; }
128
+ .hover\:no-underline:hover { text-decoration-line: none; }
129
+ .hover\:shadow-lg:hover { box-shadow: var(--mastors-shadow-lg); }
130
+ .hover\:scale-105:hover { transform: scale(1.05); }
131
+ .hover\:scale-110:hover { transform: scale(1.1); }
132
+ .hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }
133
+
134
+ // Focus-visible: ring utilities
135
+ .focus\:ring:focus-visible {
136
+ outline: 2px solid var(--mastors-accent);
137
+ outline-offset: 2px;
138
+ }
139
+
140
+ .focus\:ring-2:focus-visible {
141
+ outline: 2px solid var(--mastors-accent);
142
+ outline-offset: 2px;
143
+ }
144
+
145
+ .focus\:ring-offset-2:focus-visible {
146
+ outline-offset: 4px;
147
+ }
148
+
149
+ .focus\:ring-none:focus-visible {
150
+ outline: none;
151
+ }
152
+
153
+ // Disabled: dim + block interaction
154
+ .disabled\:opacity-50:disabled { opacity: 50%; }
155
+ .disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
156
+ .disabled\:pointer-events-none:disabled { pointer-events: none; }
@@ -0,0 +1,162 @@
1
+ // utilities/_layout.scss
2
+ // Layout utilities — aspect-ratio, object-fit, object-position, float, clear,
3
+ // isolation, mix-blend-mode, box-decoration, appearance.
4
+ // ─────────────────────────────────────────────────────────────
5
+
6
+ @use "../generators/class-generator" as gen;
7
+
8
+ // ── Aspect ratio ──────────────────────────────────────────────────────────────
9
+ // Use calc() for ratio values — bare slash division is deprecated in Sass 2+.
10
+ $-aspect-ratios: (
11
+ "auto": auto,
12
+ "square": calc(1 / 1),
13
+ "video": calc(16 / 9),
14
+ "4-3": calc(4 / 3),
15
+ "3-2": calc(3 / 2),
16
+ "21-9": calc(21 / 9),
17
+ "9-16": calc(9 / 16),
18
+ "golden": 1.618,
19
+ ) !default;
20
+
21
+ @each $key, $value in $-aspect-ratios {
22
+ .aspect-#{$key} { aspect-ratio: $value; }
23
+ }
24
+
25
+ // ── Object fit ───────────────────────────────────────────────────────────────
26
+
27
+ @include gen.generate-utilities((
28
+ "object-fit": (
29
+ property: object-fit,
30
+ prefix: "object",
31
+ values: (
32
+ "contain": contain,
33
+ "cover": cover,
34
+ "fill": fill,
35
+ "none": none,
36
+ "scale-down": scale-down,
37
+ ),
38
+ ),
39
+ ));
40
+
41
+ // ── Object position ──────────────────────────────────────────────────────────
42
+
43
+ @include gen.generate-utilities((
44
+ "object-position": (
45
+ property: object-position,
46
+ prefix: "object",
47
+ values: (
48
+ "bottom": bottom,
49
+ "center": center,
50
+ "left": left,
51
+ "left-bottom": left bottom,
52
+ "left-top": left top,
53
+ "right": right,
54
+ "right-bottom": right bottom,
55
+ "right-top": right top,
56
+ "top": top,
57
+ ),
58
+ ),
59
+ ));
60
+
61
+ // ── Float ─────────────────────────────────────────────────────────────────────
62
+
63
+ @include gen.generate-utilities((
64
+ "float": (
65
+ property: float,
66
+ prefix: "float",
67
+ values: (
68
+ "right": right,
69
+ "left": left,
70
+ "none": none,
71
+ "start": inline-start,
72
+ "end": inline-end,
73
+ ),
74
+ responsive: true,
75
+ ),
76
+ ));
77
+
78
+ // ── Clear ─────────────────────────────────────────────────────────────────────
79
+
80
+ @include gen.generate-utilities((
81
+ "clear": (
82
+ property: clear,
83
+ prefix: "clear",
84
+ values: (
85
+ "left": left,
86
+ "right": right,
87
+ "both": both,
88
+ "none": none,
89
+ "start": inline-start,
90
+ "end": inline-end,
91
+ ),
92
+ ),
93
+ ));
94
+
95
+ // ── Isolation ─────────────────────────────────────────────────────────────────
96
+
97
+ .isolate { isolation: isolate; }
98
+ .isolation-auto { isolation: auto; }
99
+
100
+ // ── Mix blend mode ────────────────────────────────────────────────────────────
101
+
102
+ @include gen.generate-utilities((
103
+ "mix-blend": (
104
+ property: mix-blend-mode,
105
+ prefix: "mix-blend",
106
+ values: (
107
+ "normal": normal,
108
+ "multiply": multiply,
109
+ "screen": screen,
110
+ "overlay": overlay,
111
+ "darken": darken,
112
+ "lighten": lighten,
113
+ "hard-light": hard-light,
114
+ "soft-light": soft-light,
115
+ "difference": difference,
116
+ "exclusion": exclusion,
117
+ "hue": hue,
118
+ "saturation": saturation,
119
+ "color": color,
120
+ "luminosity": luminosity,
121
+ "plus-lighter": plus-lighter,
122
+ ),
123
+ ),
124
+ ));
125
+
126
+ // ── Background blend mode ─────────────────────────────────────────────────────
127
+
128
+ @include gen.generate-utilities((
129
+ "bg-blend": (
130
+ property: background-blend-mode,
131
+ prefix: "bg-blend",
132
+ values: (
133
+ "normal": normal,
134
+ "multiply": multiply,
135
+ "screen": screen,
136
+ "overlay": overlay,
137
+ "darken": darken,
138
+ "lighten": lighten,
139
+ "difference": difference,
140
+ "exclusion": exclusion,
141
+ "color": color,
142
+ "luminosity": luminosity,
143
+ ),
144
+ ),
145
+ ));
146
+
147
+ // ── Box decoration break ──────────────────────────────────────────────────────
148
+
149
+ .box-decoration-clone { box-decoration-break: clone; }
150
+ .box-decoration-slice { box-decoration-break: slice; }
151
+
152
+ // ── Appearance ───────────────────────────────────────────────────────────────
153
+
154
+ .appearance-none { appearance: none; }
155
+ .appearance-auto { appearance: auto; }
156
+
157
+ // ── Will-change ──────────────────────────────────────────────────────────────
158
+
159
+ .will-change-auto { will-change: auto; }
160
+ .will-change-scroll { will-change: scroll-position; }
161
+ .will-change-contents { will-change: contents; }
162
+ .will-change-transform { will-change: transform; }
@@ -0,0 +1,9 @@
1
+ // utilities/_opacity.scss
2
+ // Opacity utility classes from opacity tokens.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "../tokens/opacity" as op;
6
+
7
+ @each $key, $val in op.$opacity-tokens {
8
+ .opacity-#{$key} { opacity: $val; }
9
+ }
@@ -0,0 +1,36 @@
1
+ // utilities/_overflow.scss
2
+ // Overflow utility classes.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ @use "../generators/class-generator" as gen;
6
+
7
+ @include gen.generate-utilities((
8
+ "overflow": (
9
+ property: overflow,
10
+ values: (
11
+ "auto": auto,
12
+ "hidden": hidden,
13
+ "scroll": scroll,
14
+ "visible": visible,
15
+ "clip": clip,
16
+ ),
17
+ ),
18
+ "overflow-x": (
19
+ property: overflow-x,
20
+ prefix: "overflow-x",
21
+ values: (
22
+ "auto": auto,
23
+ "hidden": hidden,
24
+ "scroll": scroll,
25
+ ),
26
+ ),
27
+ "overflow-y": (
28
+ property: overflow-y,
29
+ prefix: "overflow-y",
30
+ values: (
31
+ "auto": auto,
32
+ "hidden": hidden,
33
+ "scroll": scroll,
34
+ ),
35
+ ),
36
+ ));
@@ -0,0 +1,6 @@
1
+ // utilities/_pointer-events.scss
2
+ // Pointer-events utility classes.
3
+ // ─────────────────────────────────────────────────────────────
4
+
5
+ .pointer-events-none { pointer-events: none; }
6
+ .pointer-events-auto { pointer-events: auto; }