@tenphi/tasty 0.0.0-snapshot.a8b4749 → 0.0.0-snapshot.a8da86e

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 (125) hide show
  1. package/README.md +181 -136
  2. package/dist/babel-types-C_7kRP38.d.ts +18 -0
  3. package/dist/chunks/async-storage-CG5HnUT5.js +20 -0
  4. package/dist/chunks/async-storage-CG5HnUT5.js.map +1 -0
  5. package/dist/chunks/build-config-Betc6IB6.js +60 -0
  6. package/dist/chunks/build-config-Betc6IB6.js.map +1 -0
  7. package/dist/{collector-C-keQH9m.js → chunks/collector-DqqisglQ.js} +68 -101
  8. package/dist/chunks/collector-DqqisglQ.js.map +1 -0
  9. package/dist/chunks/config-engine-BPeROwq2.js +272 -0
  10. package/dist/chunks/config-engine-BPeROwq2.js.map +1 -0
  11. package/dist/chunks/css-definitions-IeuyJTGk.js +899 -0
  12. package/dist/chunks/css-definitions-IeuyJTGk.js.map +1 -0
  13. package/dist/chunks/css-resources-P7IBUUZs.js +142 -0
  14. package/dist/chunks/css-resources-P7IBUUZs.js.map +1 -0
  15. package/dist/chunks/debug-P1E2jkj7.js +502 -0
  16. package/dist/chunks/debug-P1E2jkj7.js.map +1 -0
  17. package/dist/chunks/dsl-DRhFWQzo.js +1378 -0
  18. package/dist/chunks/dsl-DRhFWQzo.js.map +1 -0
  19. package/dist/chunks/hydration-TRcz5vnk.js +41 -0
  20. package/dist/chunks/hydration-TRcz5vnk.js.map +1 -0
  21. package/dist/chunks/react-runtime-XMBbGRes.js +582 -0
  22. package/dist/chunks/react-runtime-XMBbGRes.js.map +1 -0
  23. package/dist/chunks/runtime-engine-CsIMtulO.js +2415 -0
  24. package/dist/chunks/runtime-engine-CsIMtulO.js.map +1 -0
  25. package/dist/chunks/runtime-state-CyKzDioI.js +141 -0
  26. package/dist/chunks/runtime-state-CyKzDioI.js.map +1 -0
  27. package/dist/{merge-styles-Cd2vBl9b.js → chunks/shared-utils-y-HjvPN4.js} +60 -55
  28. package/dist/chunks/shared-utils-y-HjvPN4.js.map +1 -0
  29. package/dist/chunks/style-engine-RbokDN6A.js +5427 -0
  30. package/dist/chunks/style-engine-RbokDN6A.js.map +1 -0
  31. package/dist/{css-writer-BWvwQzz0.js → chunks/zero-engine-DbtjMsfo.js} +81 -137
  32. package/dist/chunks/zero-engine-DbtjMsfo.js.map +1 -0
  33. package/dist/{collector-osfWTeRd.d.ts → collector-w4mBj5gd.d.ts} +64 -8
  34. package/dist/{config-BoZDUHW5.d.ts → config-CrZOfNJ5.d.ts} +489 -85
  35. package/dist/core/index.d.ts +5 -5
  36. package/dist/core/index.js +9 -6
  37. package/dist/{index-B_k47mc_.d.ts → index-CYJtAI9a.d.ts} +664 -399
  38. package/dist/index.d.ts +5 -5
  39. package/dist/index.js +11 -732
  40. package/dist/{merge-styles-BMWcH6MF.d.ts → merge-styles-VXwJ0Frr.d.ts} +2 -3
  41. package/dist/ssr/astro-client.d.ts +1 -1
  42. package/dist/ssr/astro-client.js +1 -14
  43. package/dist/ssr/astro-client.js.map +1 -1
  44. package/dist/ssr/astro-middleware-extract-static.d.ts +10 -0
  45. package/dist/ssr/astro-middleware-extract-static.js +9 -0
  46. package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
  47. package/dist/ssr/astro-middleware-extract.d.ts +10 -0
  48. package/dist/ssr/astro-middleware-extract.js +9 -0
  49. package/dist/ssr/astro-middleware-extract.js.map +1 -0
  50. package/dist/ssr/astro-middleware-static.d.ts +17 -0
  51. package/dist/ssr/astro-middleware-static.js +7 -0
  52. package/dist/ssr/astro-middleware-static.js.map +1 -0
  53. package/dist/ssr/astro-middleware.d.ts +11 -8
  54. package/dist/ssr/astro-middleware.js +2 -14
  55. package/dist/ssr/astro-middleware.js.map +1 -1
  56. package/dist/ssr/astro.d.ts +40 -10
  57. package/dist/ssr/astro.js +163 -91
  58. package/dist/ssr/astro.js.map +1 -1
  59. package/dist/ssr/index.d.ts +10 -18
  60. package/dist/ssr/index.js +5 -5
  61. package/dist/ssr/index.js.map +1 -1
  62. package/dist/ssr/next-config.d.ts +64 -0
  63. package/dist/ssr/next-config.js +134 -0
  64. package/dist/ssr/next-config.js.map +1 -0
  65. package/dist/ssr/next.d.ts +9 -9
  66. package/dist/ssr/next.js +29 -44
  67. package/dist/ssr/next.js.map +1 -1
  68. package/dist/static/index.d.ts +8 -9
  69. package/dist/static/index.js +4 -22
  70. package/dist/static/index.js.map +1 -1
  71. package/dist/static/inject.d.ts +1 -2
  72. package/dist/static/inject.js.map +1 -1
  73. package/dist/{index-tcHuMPFt.d.ts → types-JEY8PVYP.d.ts} +874 -593
  74. package/dist/zero/babel.d.ts +5 -19
  75. package/dist/zero/babel.js +74 -144
  76. package/dist/zero/babel.js.map +1 -1
  77. package/dist/zero/index.d.ts +57 -7
  78. package/dist/zero/index.js +24 -2
  79. package/dist/zero/index.js.map +1 -0
  80. package/dist/zero/next.d.ts +4 -5
  81. package/dist/zero/next.js +0 -31
  82. package/dist/zero/next.js.map +1 -1
  83. package/docs/README.md +17 -9
  84. package/docs/adoption.md +56 -31
  85. package/docs/ai-agents.md +250 -0
  86. package/docs/comparison.md +69 -40
  87. package/docs/configuration.md +487 -86
  88. package/docs/debug.md +26 -14
  89. package/docs/design-system.md +43 -24
  90. package/docs/dsl.md +558 -181
  91. package/docs/getting-started.md +64 -41
  92. package/docs/injector.md +120 -30
  93. package/docs/methodology.md +46 -40
  94. package/docs/migration-v3.md +285 -0
  95. package/docs/pipeline.md +87 -21
  96. package/docs/plugins.md +353 -0
  97. package/docs/react-api.md +151 -42
  98. package/docs/runtime-benchmarks.md +388 -0
  99. package/docs/ssr.md +252 -86
  100. package/docs/styles.md +142 -25
  101. package/docs/tasty-static.md +174 -106
  102. package/package.json +127 -35
  103. package/tasty.config.ts +5 -0
  104. package/dist/async-storage-B7_o6FKt.js +0 -44
  105. package/dist/async-storage-B7_o6FKt.js.map +0 -1
  106. package/dist/collector-C-keQH9m.js.map +0 -1
  107. package/dist/config-BBiyxMCe.js +0 -10559
  108. package/dist/config-BBiyxMCe.js.map +0 -1
  109. package/dist/context-CkSg-kDT.js +0 -24
  110. package/dist/context-CkSg-kDT.js.map +0 -1
  111. package/dist/core-BO4319td.js +0 -1598
  112. package/dist/core-BO4319td.js.map +0 -1
  113. package/dist/css-writer-BWvwQzz0.js.map +0 -1
  114. package/dist/format-global-rules-Dbc_1tc3.js +0 -22
  115. package/dist/format-global-rules-Dbc_1tc3.js.map +0 -1
  116. package/dist/format-rules-BSjeH4Z7.js +0 -143
  117. package/dist/format-rules-BSjeH4Z7.js.map +0 -1
  118. package/dist/hydrate-CcvrP4qJ.js +0 -45
  119. package/dist/hydrate-CcvrP4qJ.js.map +0 -1
  120. package/dist/index.js.map +0 -1
  121. package/dist/keyframes-BUQhdOSJ.js +0 -588
  122. package/dist/keyframes-BUQhdOSJ.js.map +0 -1
  123. package/dist/merge-styles-Cd2vBl9b.js.map +0 -1
  124. package/dist/resolve-recipes-C1nrvnYh.js +0 -144
  125. package/dist/resolve-recipes-C1nrvnYh.js.map +0 -1
package/docs/styles.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Style Properties Reference
2
2
 
3
- All standard CSS properties are supported in Tasty and benefit from its syntax sugar: design tokens (`$name`, `#name`), custom units (`2x`, `1r`, `1bw`), color opacity (`#purple.5`), auto-calc (`(100% - 2x)`), and custom functions. Values are parsed through the Tasty engine automatically.
3
+ All standard CSS properties are supported in Tasty and benefit from its syntax sugar: design tokens (`$name`, `#name`), custom units (`2x`, `1r`, `1bw`), color opacity (`#purple.5`), auto-calc (`(100% - 2x)`), and [custom functions](dsl.md#functions-function) (`$$negative(10px)`). Values are parsed through the Tasty engine automatically.
4
4
 
5
5
  The properties documented below have **custom handlers** with enhanced syntax. They should be **preferred** over their raw CSS equivalents because they:
6
6
 
@@ -20,9 +20,10 @@ Use these instead of their raw CSS counterparts:
20
20
  |-----|------------|
21
21
  | `fill` | `backgroundColor`, `background` |
22
22
  | `image` | `backgroundImage` |
23
- | `padding` (with direction modifiers) | `paddingTop`, `paddingRight`, `paddingBottom`, `paddingLeft` |
24
- | `margin` (with direction modifiers) | `marginTop`, `marginRight`, `marginBottom`, `marginLeft` |
25
- | `width` (with `min`/`max` modifiers) | `minWidth`, `maxWidth` |
23
+ | `padding` (with physical direction modifiers) | `paddingTop`, `paddingRight`, `paddingBottom`, `paddingLeft` |
24
+ | `margin` (with physical direction modifiers) | `marginTop`, `marginRight`, `marginBottom`, `marginLeft` |
25
+ | Logical block/inline category styles (with `start`/`end` modifiers) | Native logical axis/edge declarations |
26
+ | `width` / `blockSize` / `inlineSize` (with `min`/`max` modifiers) | Their separate min/max declarations when one state map is sufficient |
26
27
  | `height` (with `min`/`max` modifiers) | `minHeight`, `maxHeight` |
27
28
  | `border` | `borderColor`, `borderWidth`, `borderStyle` |
28
29
  | `radius` | `borderRadius` |
@@ -36,6 +37,24 @@ Use these instead of their raw CSS counterparts:
36
37
 
37
38
  ## Layout
38
39
 
40
+ ### `overscrollBehavior`
41
+
42
+ The native `overscrollBehavior` shorthand and its `overscrollBehaviorBlock`,
43
+ `overscrollBehaviorInline`, `overscrollBehaviorX`, and `overscrollBehaviorY`
44
+ longhands support `auto`, `contain`, `none`, and `chain`. The shorthand can set
45
+ separate X and Y values, for example `overscrollBehavior: 'chain contain'`.
46
+
47
+ `chain` allows scroll chaining to another scrollable area while suppressing
48
+ boundary effects such as bounce. It requires browser support; use a feature
49
+ query and a fallback floor when targeting browsers without it:
50
+
51
+ ```jsx
52
+ overscrollBehaviorBlock: {
53
+ _: 'auto',
54
+ '@supports(overscroll-behavior-block: chain)': 'chain',
55
+ }
56
+ ```
57
+
39
58
  ### `display`
40
59
 
41
60
  Standard CSS display values. Handled together with `hide`, `textOverflow`, `overflow`, and `whiteSpace` for priority resolution.
@@ -100,18 +119,23 @@ For flex/grid layouts, outputs native `gap`. For block layouts, emulates gap usi
100
119
 
101
120
  Element padding with directional modifiers and multi-group support. Use **comma-separated groups** to set a base value and then override specific directions.
102
121
 
103
- **Syntax:** `[value]` | `[top right]` | `[top right bottom left]` | `[value directions...]` — comma-separated for multiple groups
122
+ **Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
104
123
 
105
124
  **Direction modifiers:** `top`, `right`, `bottom`, `left`
106
125
 
107
126
  **Output modifier:** `longhand` — forces output as individual CSS longhand properties (`padding-top`, `padding-right`, `padding-bottom`, `padding-left`) instead of the `padding` shorthand. Useful when children need to selectively inherit individual directions.
108
127
 
128
+ **One value per directional group.** A group that names direction modifiers takes **exactly one** value, applied to every direction it names. For different values per side, use comma-separated groups: `padding: '2x top, 4x right'`. Writing `padding: '2x 4x top right'` ignores `4x` and warns in development — the parser keeps values and modifiers in separate buckets, so their interleaving in the source is not recoverable and `'2x 4x top right'`, `'2x top 4x right'` and `'top 2x right 4x'` are all the same input.
129
+
130
+ A group that names *no* direction keeps plain CSS shorthand order, which is unambiguous and unchanged.
131
+
109
132
  | Value | Effect |
110
133
  |-------|--------|
111
134
  | `"2x"` | All sides `2x` |
112
135
  | `"2x 1x"` | Top/bottom `2x`, left/right `1x` |
113
136
  | `"2x top"` | Top `2x`, right/bottom/left `0` |
114
137
  | `"1x left right"` | Left and right `1x`, top/bottom `0` |
138
+ | `"2x top, 4x right"` | Top `2x`, right `4x`, bottom/left `0` |
115
139
  | `"1x, 2x top"` | All sides `1x`, then top overridden to `2x` |
116
140
  | `"1x, 2x top bottom"` | Left/right `1x`, top/bottom `2x` |
117
141
  | `"2x longhand"` | All sides `2x`, output as 4 individual `padding-*` properties |
@@ -120,34 +144,33 @@ Element padding with directional modifiers and multi-group support. Use **comma-
120
144
 
121
145
  Later comma-separated groups override earlier groups for conflicting directions.
122
146
 
123
- Individual props `paddingTop`, `paddingRight`, `paddingBottom`, `paddingLeft`, `paddingBlock`, `paddingInline` are supported but `padding` with modifiers is recommended.
124
-
125
- **Priority:** `padding` < `paddingBlock`/`paddingInline` < `paddingTop`/`paddingRight`/`paddingBottom`/`paddingLeft`
147
+ Individual physical props `paddingTop`, `paddingRight`, `paddingBottom`, and `paddingLeft` are supported, but `padding` with modifiers is recommended. Use `blockPadding` or `inlinePadding` for an enhanced logical-axis shorthand; native declarations such as `paddingInlineStart` remain ordinary CSS properties. See [Logical properties](#logical-properties).
126
148
 
127
149
  ### `margin`
128
150
 
129
151
  Element margin. Same syntax, modifiers, and multi-group support as `padding`.
130
152
 
131
- **Syntax:** `[value]` | `[top right]` | `[top right bottom left]` | `[value directions...]` — comma-separated for multiple groups
153
+ **Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
132
154
 
133
155
  **Direction modifiers:** `top`, `right`, `bottom`, `left`
134
156
 
135
157
  **Output modifier:** `longhand` — forces output as individual CSS longhand properties (`margin-top`, etc.) instead of the `margin` shorthand.
136
158
 
159
+ The [one-value-per-directional-group rule](#padding) from `padding` applies here too.
160
+
137
161
  | Value | Effect |
138
162
  |-------|--------|
139
163
  | `"2x"` | All sides `2x` |
140
164
  | `"2x 1x"` | Top/bottom `2x`, left/right `1x` |
141
165
  | `"2x top"` | Top `2x`, right/bottom/left `0` |
166
+ | `"2x top, 4x right"` | Top `2x`, right `4x`, bottom/left `0` |
142
167
  | `"auto left right, 1x top bottom"` | Left/right `auto`, top/bottom `1x` |
143
168
  | `true` | All sides `1x` |
144
169
  | Number | Converted to `px` |
145
170
 
146
171
  Later comma-separated groups override earlier groups for conflicting directions.
147
172
 
148
- Individual props `marginTop`, `marginRight`, `marginBottom`, `marginLeft`, `marginBlock`, `marginInline` are supported but `margin` with modifiers is recommended.
149
-
150
- **Priority:** `margin` < `marginBlock`/`marginInline` < `marginTop`/`marginRight`/`marginBottom`/`marginLeft`
173
+ Individual physical props `marginTop`, `marginRight`, `marginBottom`, and `marginLeft` are supported, but `margin` with modifiers is recommended. Use `blockMargin` or `inlineMargin` for an enhanced logical-axis shorthand; native declarations such as `marginInlineStart` remain ordinary CSS properties. See [Logical properties](#logical-properties).
151
174
 
152
175
  ### `width`
153
176
 
@@ -191,10 +214,23 @@ Separate `minHeight` and `maxHeight` props are supported and override values fro
191
214
 
192
215
  Positioning offsets with directional modifiers and multi-group support. Same directional syntax as `padding`.
193
216
 
194
- **Syntax:** `[value]` | `[top right]` | `[top right bottom left]` | `[value directions...]` — comma-separated for multiple groups
217
+ **Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
195
218
 
196
219
  **Direction modifiers:** `top`, `right`, `bottom`, `left`
197
220
 
221
+ The [one-value-per-directional-group rule](#padding) from `padding` applies here too, with `dock`
222
+ as the single exception.
223
+
224
+ **`dock` modifier:** pins the named edge and spans its full length, by also applying the value
225
+ to the two perpendicular sides. `inset: 'bottom dock'` gives `inset: auto 0 0 0` — anchored to
226
+ the bottom, full width. Without a direction, `dock` fills every side.
227
+
228
+ `dock` is the one place a directional group takes **two** values: the first insets the named
229
+ edge, the second the sides it spans. `inset: '2x 4x bottom dock'` pins the bottom at `2x` and
230
+ insets the sides by `4x`. A third value, or a second value without `dock`, is ignored and warns
231
+ in development. With several directions the first value applies to each named edge and the
232
+ second to every side they span.
233
+
198
234
  **Output modifier:** `longhand` — forces output as individual CSS properties (`top`, `right`, `bottom`, `left`) instead of the `inset` shorthand.
199
235
 
200
236
  | Value | Effect |
@@ -205,12 +241,52 @@ Positioning offsets with directional modifiers and multi-group support. Same dir
205
241
  | `"0, 2x top"` | All sides `0`, then top overridden to `2x` |
206
242
  | `"0 longhand"` | All sides `0`, output as individual `top`/`right`/`bottom`/`left` |
207
243
  | `true` | All sides `0` |
244
+ | `"bottom dock"` | Bottom/left/right `0`, top `auto` — bottom-anchored, full width |
245
+ | `"right dock"` | Right/top/bottom `0`, left `auto` — right-anchored, full height |
246
+ | `"2x bottom dock"` | Bottom/left/right `2x`, top `auto` |
247
+ | `"2x 4x bottom dock"` | Bottom `2x`, left/right `4x`, top `auto` |
248
+ | `"dock"` | All sides `0` |
208
249
 
209
250
  Later comma-separated groups override earlier groups for conflicting directions.
210
251
 
211
- Individual props `top`, `right`, `bottom`, `left`, `insetBlock`, `insetInline` are supported. When only individual direction props are used (without `inset`), individual CSS properties are output for correct cascade behavior with state overrides.
252
+ Individual physical props `top`, `right`, `bottom`, and `left` are supported. When only those props are used (without `inset`), individual CSS properties are output for correct cascade behavior with state overrides. Use `blockInset` or `inlineInset` for logical axes; native declarations such as `insetInlineStart` remain ordinary CSS properties.
253
+
254
+ ### Logical properties
255
+
256
+ Tasty provides one enhanced handler for each logical axis/category pair. Each handler emits native logical CSS instead of converting values to `top`, `right`, `bottom`, `left`, `width`, or `height`. The browser therefore resolves `block`, `inline`, `start`, and `end` from the element's `writingMode` and `direction`.
257
+
258
+ ```jsx
259
+ styles: {
260
+ direction: 'rtl',
261
+ inlinePadding: '1x start, 2x end',
262
+ inlineBorder: '1bw solid #accent start',
263
+ blockInset: '0 end',
264
+ }
265
+ ```
266
+
267
+ An axis handler accepts one value for both edges or two values in logical **start/end** order. Use `start` and `end` modifiers, with comma-separated groups for different edge values. Unspecified padding, margin, and scroll edges reset to `0`; unspecified inset edges reset to `auto`. The `longhand` modifier emits the two native start/end declarations.
268
+
269
+ | Category | Block axis | Inline axis |
270
+ |----------|------------|-------------|
271
+ | Size | `blockSize` | `inlineSize` |
272
+ | Padding | `blockPadding` | `inlinePadding` |
273
+ | Margin | `blockMargin` | `inlineMargin` |
274
+ | Inset | `blockInset` | `inlineInset` |
275
+ | Scroll margin | `blockScrollMargin` | `inlineScrollMargin` |
276
+ | Scroll padding | `blockScrollPadding` | `inlineScrollPadding` |
277
+ | Border | `blockBorder` | `inlineBorder` |
278
+
279
+ `blockSize` and `inlineSize` use the same enhanced one/two/three-value and `min`/`max`/`fixed` syntax as `width`. Separate `minBlockSize`, `maxBlockSize`, `minInlineSize`, and `maxInlineSize` declarations override constraints produced by that shorthand.
280
+
281
+ `blockBorder` and `inlineBorder` use the same width/style/color parsing and defaults as `border`, including `1bw`, color tokens, and `true`. Logical padding, margin, scroll margin, and scroll padding default to `1x` for `true`; logical inset defaults to `0`.
282
+
283
+ Native logical CSS names—such as `paddingInlineStart`, `borderBlockColor`, and `borderStartStartRadius`—remain available as ordinary CSS properties. They support Tasty tokens and units through the normal value parser, but do not get category defaults or directional shorthand behavior.
284
+
285
+ The physical `scrollMargin` and `scrollPadding` shorthands support the same values and physical direction modifiers as `padding`. Their logical counterparts stay in separate axis handlers.
286
+
287
+ `writingMode`, `direction`, and `textOrientation` are standard CSS control properties. They use Tasty's normal value parser and need no special handler.
212
288
 
213
- **Priority:** `inset` < `insetBlock`/`insetInline` < `top`/`right`/`bottom`/`left`
289
+ Avoid setting physical and logical declarations that resolve to the same edge in one style block. Tasty keeps them separate and lets the native CSS cascade resolve the overlap, whose result also depends on writing mode and direction.
214
290
 
215
291
  ---
216
292
 
@@ -228,6 +304,7 @@ Background color with design token support. Preferred over `backgroundColor` and
228
304
  | `"#purple.10"` | Token color at 10% opacity |
229
305
  | `"#surface #primary.10"` | Background `#surface` with `#primary.10` overlay (two colors enable smooth transitions between both) |
230
306
  | `"rgb(255 128 0)"` | CSS color value |
307
+ | `"color-mix(in oklab, #primary 50%, #surface)"` | CSS color function — see [CSS Color Functions](dsl.md#css-color-functions) |
231
308
  | `true` | Default fill color |
232
309
 
233
310
  When two colors are provided, the first sets the background color and the second is applied as an overlay gradient layer. This enables independent CSS transitions on each color. The overlay is only applied when no explicit `image` or `backgroundImage` is set.
@@ -260,9 +337,17 @@ Text color with design token support.
260
337
  | `"#current"` | Current inherited color |
261
338
  | `"#current.5"` | Current inherited color at 50% opacity |
262
339
  | `"(#primary, #secondary)"` | Fallback: use `#primary`, fall back to `#secondary` |
340
+ | `"light-dark(#dark, #light)"` | CSS color function — see [CSS Color Functions](dsl.md#css-color-functions) |
263
341
  | `true` | `currentColor` |
264
342
 
265
- When set to a named color token, also sets `$current-color` and `$current-color-{colorSpace}` custom properties for downstream use (suffix depends on the configured `colorSpace`, default `oklch`).
343
+ Also sets `$current-color` to the same color, for anything that needs the
344
+ inherited color as a color rather than as the `currentcolor` keyword. Every color
345
+ publishes it, not just a named token, so a reader below always takes the nearest
346
+ `color` rather than the nearest *token* color. A value that already reads the
347
+ inherited color — `#current` itself, a `#current` fade, a bare `currentColor` —
348
+ is not republished: resolving it a second time one level down would fade it
349
+ twice, and the variable into itself is a self-reference. `#current` does not go
350
+ through it; it is the keyword.
266
351
 
267
352
  ### `svgFill`
268
353
 
@@ -270,7 +355,7 @@ SVG fill color. Same color token syntax as `fill` and `color`. Outputs the nativ
270
355
 
271
356
  ```jsx
272
357
  svgFill="#purple.10"
273
- svgFill="currentColor"
358
+ svgFill="#current"
274
359
  ```
275
360
 
276
361
  ---
@@ -319,7 +404,11 @@ Border radius with shape presets and directional modifiers.
319
404
  | `"backleaf"` | Asymmetric: round, sharp, round, sharp |
320
405
  | `"inherit"` | Inherit border-radius from parent |
321
406
 
322
- **Direction modifiers:** `top`, `right`, `bottom`, `left` — rounds only the specified corners.
407
+ **Edge modifiers:** `top`, `right`, `bottom`, `left` — rounds the *pair* of corners along that edge.
408
+
409
+ **Corner modifiers:** `top-left`, `top-right`, `bottom-right`, `bottom-left` — rounds a single corner.
410
+ Use these when an edge modifier would round one corner too many. Edge and corner modifiers combine
411
+ (`radius: 'top bottom-right'`).
323
412
 
324
413
  **Output modifier:** `longhand` — forces output as individual CSS longhand properties (`border-top-left-radius`, `border-top-right-radius`, `border-bottom-right-radius`, `border-bottom-left-radius`) instead of the `border-radius` shorthand. Useful when children need to selectively inherit individual corners via `radius: 'inherit left'`.
325
414
 
@@ -334,6 +423,9 @@ Border radius with shape presets and directional modifiers.
334
423
  | `"1r longhand"` | All corners `1r`, output as 4 individual `border-*-radius` properties |
335
424
  | `"inherit"` | All corners inherit from parent (`border-radius: inherit`) |
336
425
  | `"inherit right"` | Right corners inherit from parent (uses longhand properties) |
426
+ | `"top-right"` | Top-right corner `1r`, every other corner `0` |
427
+ | `"4px top-left"` | Top-left corner `4px`, every other corner `0` |
428
+ | `"top bottom-right"` | Both top corners and bottom-right `1r`, bottom-left `0` |
337
429
 
338
430
  ### `outline`
339
431
 
@@ -492,15 +584,17 @@ When easing is provided without a duration, the default timing variable is used
492
584
  | `zIndex` | `z-index` |
493
585
  | `inset` | `inset`, `top`, `right`, `bottom`, `left` |
494
586
 
495
- Default timing: `$transition` (or `${name}-transition` with `$transition` fallback per semantic name).
587
+ When two entries cover the same property, an entry that names that one property wins over a group such as `theme`, in either order: `opacity 120ms ease-in-out, theme` keeps the opacity timing. Otherwise the later entry wins, as in CSS.
588
+
589
+ Default timing: `$transition` (or `${name}-transition` with `$transition` fallback per semantic name). Prefer omitting the duration or using a duration token instead of repeating raw time values across components. Explicit zero can disable motion.
496
590
 
497
591
  ```jsx
498
- transition="theme 0.3s"
499
- transition="fill 0.2s, radius 0.3s"
500
- transition="fade 0.15s ease-in"
592
+ transition="theme"
593
+ transition="fill, radius"
594
+ transition="fade $transition ease-in"
501
595
  transition="fill ease-in" // easing without duration (uses default timing)
502
596
  transition="radius ease-in-out" // easing keyword only
503
- transition="$$custom-prop 0.3s" // custom property transition
597
+ transition="$$custom-prop" // custom property transition
504
598
  ```
505
599
 
506
600
  **Recognized easing keywords:** `ease`, `ease-in`, `ease-out`, `ease-in-out`, `linear`, `step-start`, `step-end`. CSS easing functions (`cubic-bezier(...)`, `steps(...)`, `linear(...)`) are also recognized.
@@ -509,6 +603,24 @@ If the name is not a semantic name, it is used as a literal CSS property name.
509
603
 
510
604
  ---
511
605
 
606
+ ### `animation`
607
+
608
+ `animation` is the native CSS shorthand. Tasty parses tokens in its value and
609
+ tracks local `@keyframes` names referenced by it, so it needs no custom style
610
+ handler. Define a complete animation with the shorthand, using a configured
611
+ duration token where appropriate (for example,
612
+ `animation: 'pulse $animation-duration ease-in infinite'`).
613
+
614
+ Use `animationDuration`, `animationTimeline`, `animationRange`, and other CSS
615
+ longhands when changing just one part of an existing animation in a state or
616
+ component extension. Setting `animation` resets omitted parts, including its
617
+ timeline and range. The same principle applies to `transitionDuration` and
618
+ other transition longhands when a base `transition` is already defined.
619
+ `transitionBehavior` remains a separate CSS longhand; Tasty's semantic
620
+ `transition` syntax covers name, timing, easing, and delay.
621
+
622
+ ---
623
+
512
624
  ## Scrollbar & Overflow
513
625
 
514
626
  ### `scrollbar`
@@ -552,15 +664,20 @@ Scrollbar styling using CSS standard properties (`scrollbar-width`, `scrollbar-c
552
664
 
553
665
  Gradient-based edge fading using CSS masks. Use **comma-separated groups** to set different widths and colors per direction.
554
666
 
555
- **Syntax:** `[width] [directions...] [#from-color] [#to-color]` — comma-separated for multiple groups
667
+ **Syntax:** `[width] [direction...] [#from-color] [#to-color]` — comma-separated for multiple groups
556
668
 
557
669
  **Direction modifiers:** `top`, `right`, `bottom`, `left`
558
670
 
671
+ A group that names edges takes a **single** width, applied to every edge it names — different
672
+ widths per edge come from comma groups. A group that names no edge covers all four and keeps
673
+ plain CSS shorthand order, like `padding`. See the [`padding` rule](#padding).
674
+
559
675
  | Value | Effect |
560
676
  |-------|--------|
561
677
  | `"top"` | Fade top edge, default width (`2x`), all other edges unfaded |
562
678
  | `"2x left right"` | Fade left and right edges with `2x` width, top/bottom unfaded |
563
- | `"3x 1x top bottom"` | Fade top with `3x` width, bottom with `1x` width |
679
+ | `"3x 1x"` | All edges faded — top/bottom `3x`, left/right `1x` (CSS shorthand order) |
680
+ | `"3x top, 1x bottom"` | Fade top with `3x` width, bottom with `1x` width |
564
681
  | `"2x #transparent #dark"` | All edges faded with `2x` width, from `#transparent` to `#dark` |
565
682
  | `"top #a #b, bottom #c #d"` | Top fades from `#a` to `#b`, bottom fades from `#c` to `#d` |
566
683