@tenphi/tasty 0.0.0-snapshot.fafcbfe → 0.0.0-snapshot.fdb16ea

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 (309) hide show
  1. package/README.md +397 -185
  2. package/dist/async-storage-DKK-wTD4.js +44 -0
  3. package/dist/async-storage-DKK-wTD4.js.map +1 -0
  4. package/dist/babel-CMYf4JZ2.d.ts +83 -0
  5. package/dist/collector-Ctn5s74s.d.ts +145 -0
  6. package/dist/collector-DMSR6ANK.js +304 -0
  7. package/dist/collector-DMSR6ANK.js.map +1 -0
  8. package/dist/config-B23gZrfP.js +12317 -0
  9. package/dist/config-B23gZrfP.js.map +1 -0
  10. package/dist/config-CZx8_DCu.d.ts +1296 -0
  11. package/dist/context-CA8YKeMn.js +24 -0
  12. package/dist/context-CA8YKeMn.js.map +1 -0
  13. package/dist/core/index.d.ts +5 -33
  14. package/dist/core/index.js +6 -26
  15. package/dist/core-B1tyn69d.js +1573 -0
  16. package/dist/core-B1tyn69d.js.map +1 -0
  17. package/dist/css-writer-CvAxkR6S.js +390 -0
  18. package/dist/css-writer-CvAxkR6S.js.map +1 -0
  19. package/dist/format-global-rules-DklyaXv-.js +22 -0
  20. package/dist/format-global-rules-DklyaXv-.js.map +1 -0
  21. package/dist/format-rules-BCTWVvcS.js +130 -0
  22. package/dist/format-rules-BCTWVvcS.js.map +1 -0
  23. package/dist/hydrate-BCPvkJj3.js +37 -0
  24. package/dist/hydrate-BCPvkJj3.js.map +1 -0
  25. package/dist/index-B3o0aCYV.d.ts +1538 -0
  26. package/dist/index-CsvB0EXZ.d.ts +1909 -0
  27. package/dist/index.d.ts +5 -40
  28. package/dist/index.js +921 -32
  29. package/dist/index.js.map +1 -0
  30. package/dist/keyframes-Dxdx3KOo.js +493 -0
  31. package/dist/keyframes-Dxdx3KOo.js.map +1 -0
  32. package/dist/{utils/merge-styles.js → merge-styles-C-uwpoNW.js} +4 -6
  33. package/dist/merge-styles-C-uwpoNW.js.map +1 -0
  34. package/dist/{utils/merge-styles.d.ts → merge-styles-DJTSfz_M.d.ts} +3 -3
  35. package/dist/{utils/resolve-recipes.js → resolve-recipes-BuOvSEa2.js} +5 -8
  36. package/dist/resolve-recipes-BuOvSEa2.js.map +1 -0
  37. package/dist/ssr/astro-client.d.ts +1 -0
  38. package/dist/ssr/astro-client.js +19 -0
  39. package/dist/ssr/astro-client.js.map +1 -0
  40. package/dist/ssr/astro-middleware-static.d.ts +16 -0
  41. package/dist/ssr/astro-middleware-static.js +18 -0
  42. package/dist/ssr/astro-middleware-static.js.map +1 -0
  43. package/dist/ssr/astro-middleware.d.ts +17 -0
  44. package/dist/ssr/astro-middleware.js +19 -0
  45. package/dist/ssr/astro-middleware.js.map +1 -0
  46. package/dist/ssr/astro.d.ts +93 -0
  47. package/dist/ssr/astro.js +157 -0
  48. package/dist/ssr/astro.js.map +1 -0
  49. package/dist/ssr/index.d.ts +37 -0
  50. package/dist/ssr/index.js +10 -0
  51. package/dist/ssr/index.js.map +1 -0
  52. package/dist/ssr/next.d.ts +45 -0
  53. package/dist/ssr/next.js +74 -0
  54. package/dist/ssr/next.js.map +1 -0
  55. package/dist/static/index.d.ts +91 -5
  56. package/dist/static/index.js +49 -4
  57. package/dist/static/index.js.map +1 -0
  58. package/dist/static/inject.d.ts +5 -0
  59. package/dist/static/inject.js +17 -0
  60. package/dist/static/inject.js.map +1 -0
  61. package/dist/zero/babel.d.ts +2 -108
  62. package/dist/zero/babel.js +235 -39
  63. package/dist/zero/babel.js.map +1 -1
  64. package/dist/zero/index.d.ts +81 -3
  65. package/dist/zero/index.js +2 -4
  66. package/dist/zero/next.d.ts +56 -30
  67. package/dist/zero/next.js +106 -41
  68. package/dist/zero/next.js.map +1 -1
  69. package/docs/README.md +39 -0
  70. package/docs/adoption.md +323 -0
  71. package/docs/ai-agents.md +224 -0
  72. package/docs/comparison.md +448 -0
  73. package/docs/configuration.md +823 -0
  74. package/docs/debug.md +322 -0
  75. package/docs/design-system.md +455 -0
  76. package/docs/dsl.md +1021 -0
  77. package/docs/getting-started.md +238 -0
  78. package/docs/injector.md +614 -0
  79. package/docs/methodology.md +648 -0
  80. package/docs/migration-v3.md +285 -0
  81. package/docs/pipeline.md +741 -0
  82. package/docs/plugins.md +353 -0
  83. package/docs/react-api.md +681 -0
  84. package/docs/runtime-benchmarks.md +216 -0
  85. package/docs/ssr.md +451 -0
  86. package/docs/styles.md +645 -0
  87. package/docs/tasty-static.md +582 -0
  88. package/package.json +149 -40
  89. package/tasty.config.ts +6 -0
  90. package/dist/_virtual/_rolldown/runtime.js +0 -8
  91. package/dist/chunks/cacheKey.js +0 -70
  92. package/dist/chunks/cacheKey.js.map +0 -1
  93. package/dist/chunks/definitions.d.ts +0 -37
  94. package/dist/chunks/definitions.js +0 -260
  95. package/dist/chunks/definitions.js.map +0 -1
  96. package/dist/chunks/renderChunk.js +0 -61
  97. package/dist/chunks/renderChunk.js.map +0 -1
  98. package/dist/config.d.ts +0 -280
  99. package/dist/config.js +0 -403
  100. package/dist/config.js.map +0 -1
  101. package/dist/debug.d.ts +0 -204
  102. package/dist/debug.js +0 -733
  103. package/dist/debug.js.map +0 -1
  104. package/dist/hooks/useGlobalStyles.d.ts +0 -27
  105. package/dist/hooks/useGlobalStyles.js +0 -56
  106. package/dist/hooks/useGlobalStyles.js.map +0 -1
  107. package/dist/hooks/useKeyframes.d.ts +0 -56
  108. package/dist/hooks/useKeyframes.js +0 -54
  109. package/dist/hooks/useKeyframes.js.map +0 -1
  110. package/dist/hooks/useProperty.d.ts +0 -79
  111. package/dist/hooks/useProperty.js +0 -91
  112. package/dist/hooks/useProperty.js.map +0 -1
  113. package/dist/hooks/useRawCSS.d.ts +0 -53
  114. package/dist/hooks/useRawCSS.js +0 -28
  115. package/dist/hooks/useRawCSS.js.map +0 -1
  116. package/dist/hooks/useStyles.d.ts +0 -40
  117. package/dist/hooks/useStyles.js +0 -169
  118. package/dist/hooks/useStyles.js.map +0 -1
  119. package/dist/injector/index.d.ts +0 -157
  120. package/dist/injector/index.js +0 -154
  121. package/dist/injector/index.js.map +0 -1
  122. package/dist/injector/injector.d.ts +0 -139
  123. package/dist/injector/injector.js +0 -404
  124. package/dist/injector/injector.js.map +0 -1
  125. package/dist/injector/sheet-manager.d.ts +0 -127
  126. package/dist/injector/sheet-manager.js +0 -714
  127. package/dist/injector/sheet-manager.js.map +0 -1
  128. package/dist/injector/types.d.ts +0 -135
  129. package/dist/keyframes/index.js +0 -206
  130. package/dist/keyframes/index.js.map +0 -1
  131. package/dist/parser/classify.js +0 -319
  132. package/dist/parser/classify.js.map +0 -1
  133. package/dist/parser/const.js +0 -33
  134. package/dist/parser/const.js.map +0 -1
  135. package/dist/parser/lru.js +0 -109
  136. package/dist/parser/lru.js.map +0 -1
  137. package/dist/parser/parser.d.ts +0 -25
  138. package/dist/parser/parser.js +0 -116
  139. package/dist/parser/parser.js.map +0 -1
  140. package/dist/parser/tokenizer.js +0 -69
  141. package/dist/parser/tokenizer.js.map +0 -1
  142. package/dist/parser/types.d.ts +0 -51
  143. package/dist/parser/types.js +0 -46
  144. package/dist/parser/types.js.map +0 -1
  145. package/dist/pipeline/conditions.d.ts +0 -134
  146. package/dist/pipeline/conditions.js +0 -400
  147. package/dist/pipeline/conditions.js.map +0 -1
  148. package/dist/pipeline/exclusive.js +0 -231
  149. package/dist/pipeline/exclusive.js.map +0 -1
  150. package/dist/pipeline/index.d.ts +0 -53
  151. package/dist/pipeline/index.js +0 -641
  152. package/dist/pipeline/index.js.map +0 -1
  153. package/dist/pipeline/materialize.js +0 -908
  154. package/dist/pipeline/materialize.js.map +0 -1
  155. package/dist/pipeline/parseStateKey.d.ts +0 -15
  156. package/dist/pipeline/parseStateKey.js +0 -430
  157. package/dist/pipeline/parseStateKey.js.map +0 -1
  158. package/dist/pipeline/simplify.js +0 -557
  159. package/dist/pipeline/simplify.js.map +0 -1
  160. package/dist/plugins/okhsl-plugin.d.ts +0 -35
  161. package/dist/plugins/okhsl-plugin.js +0 -371
  162. package/dist/plugins/okhsl-plugin.js.map +0 -1
  163. package/dist/plugins/types.d.ts +0 -69
  164. package/dist/properties/index.js +0 -158
  165. package/dist/properties/index.js.map +0 -1
  166. package/dist/states/index.d.ts +0 -49
  167. package/dist/states/index.js +0 -416
  168. package/dist/states/index.js.map +0 -1
  169. package/dist/static/tastyStatic.d.ts +0 -46
  170. package/dist/static/tastyStatic.js +0 -31
  171. package/dist/static/tastyStatic.js.map +0 -1
  172. package/dist/static/types.d.ts +0 -49
  173. package/dist/static/types.js +0 -24
  174. package/dist/static/types.js.map +0 -1
  175. package/dist/styles/align.d.ts +0 -15
  176. package/dist/styles/align.js +0 -14
  177. package/dist/styles/align.js.map +0 -1
  178. package/dist/styles/border.d.ts +0 -25
  179. package/dist/styles/border.js +0 -114
  180. package/dist/styles/border.js.map +0 -1
  181. package/dist/styles/color.d.ts +0 -14
  182. package/dist/styles/color.js +0 -23
  183. package/dist/styles/color.js.map +0 -1
  184. package/dist/styles/createStyle.js +0 -77
  185. package/dist/styles/createStyle.js.map +0 -1
  186. package/dist/styles/dimension.js +0 -97
  187. package/dist/styles/dimension.js.map +0 -1
  188. package/dist/styles/display.d.ts +0 -37
  189. package/dist/styles/display.js +0 -67
  190. package/dist/styles/display.js.map +0 -1
  191. package/dist/styles/fade.d.ts +0 -15
  192. package/dist/styles/fade.js +0 -58
  193. package/dist/styles/fade.js.map +0 -1
  194. package/dist/styles/fill.d.ts +0 -44
  195. package/dist/styles/fill.js +0 -51
  196. package/dist/styles/fill.js.map +0 -1
  197. package/dist/styles/flow.d.ts +0 -16
  198. package/dist/styles/flow.js +0 -12
  199. package/dist/styles/flow.js.map +0 -1
  200. package/dist/styles/gap.d.ts +0 -31
  201. package/dist/styles/gap.js +0 -37
  202. package/dist/styles/gap.js.map +0 -1
  203. package/dist/styles/height.d.ts +0 -17
  204. package/dist/styles/height.js +0 -20
  205. package/dist/styles/height.js.map +0 -1
  206. package/dist/styles/index.d.ts +0 -2
  207. package/dist/styles/index.js +0 -9
  208. package/dist/styles/index.js.map +0 -1
  209. package/dist/styles/inset.d.ts +0 -52
  210. package/dist/styles/inset.js +0 -150
  211. package/dist/styles/inset.js.map +0 -1
  212. package/dist/styles/justify.d.ts +0 -15
  213. package/dist/styles/justify.js +0 -14
  214. package/dist/styles/justify.js.map +0 -1
  215. package/dist/styles/list.d.ts +0 -16
  216. package/dist/styles/list.js +0 -98
  217. package/dist/styles/list.js.map +0 -1
  218. package/dist/styles/margin.d.ts +0 -24
  219. package/dist/styles/margin.js +0 -104
  220. package/dist/styles/margin.js.map +0 -1
  221. package/dist/styles/outline.d.ts +0 -29
  222. package/dist/styles/outline.js +0 -65
  223. package/dist/styles/outline.js.map +0 -1
  224. package/dist/styles/padding.d.ts +0 -24
  225. package/dist/styles/padding.js +0 -104
  226. package/dist/styles/padding.js.map +0 -1
  227. package/dist/styles/predefined.d.ts +0 -73
  228. package/dist/styles/predefined.js +0 -241
  229. package/dist/styles/predefined.js.map +0 -1
  230. package/dist/styles/preset.d.ts +0 -47
  231. package/dist/styles/preset.js +0 -126
  232. package/dist/styles/preset.js.map +0 -1
  233. package/dist/styles/radius.d.ts +0 -14
  234. package/dist/styles/radius.js +0 -51
  235. package/dist/styles/radius.js.map +0 -1
  236. package/dist/styles/scrollbar.d.ts +0 -21
  237. package/dist/styles/scrollbar.js +0 -105
  238. package/dist/styles/scrollbar.js.map +0 -1
  239. package/dist/styles/shadow.d.ts +0 -14
  240. package/dist/styles/shadow.js +0 -24
  241. package/dist/styles/shadow.js.map +0 -1
  242. package/dist/styles/styledScrollbar.d.ts +0 -47
  243. package/dist/styles/styledScrollbar.js +0 -38
  244. package/dist/styles/styledScrollbar.js.map +0 -1
  245. package/dist/styles/transition.d.ts +0 -14
  246. package/dist/styles/transition.js +0 -158
  247. package/dist/styles/transition.js.map +0 -1
  248. package/dist/styles/types.d.ts +0 -498
  249. package/dist/styles/width.d.ts +0 -17
  250. package/dist/styles/width.js +0 -20
  251. package/dist/styles/width.js.map +0 -1
  252. package/dist/tasty.d.ts +0 -982
  253. package/dist/tasty.js +0 -191
  254. package/dist/tasty.js.map +0 -1
  255. package/dist/tokens/typography.d.ts +0 -19
  256. package/dist/tokens/typography.js +0 -237
  257. package/dist/tokens/typography.js.map +0 -1
  258. package/dist/types.d.ts +0 -184
  259. package/dist/utils/cache-wrapper.js +0 -26
  260. package/dist/utils/cache-wrapper.js.map +0 -1
  261. package/dist/utils/case-converter.js +0 -8
  262. package/dist/utils/case-converter.js.map +0 -1
  263. package/dist/utils/colors.d.ts +0 -5
  264. package/dist/utils/colors.js +0 -9
  265. package/dist/utils/colors.js.map +0 -1
  266. package/dist/utils/css-types.d.ts +0 -7
  267. package/dist/utils/dotize.d.ts +0 -26
  268. package/dist/utils/dotize.js +0 -122
  269. package/dist/utils/dotize.js.map +0 -1
  270. package/dist/utils/filter-base-props.d.ts +0 -15
  271. package/dist/utils/filter-base-props.js +0 -45
  272. package/dist/utils/filter-base-props.js.map +0 -1
  273. package/dist/utils/get-display-name.d.ts +0 -7
  274. package/dist/utils/get-display-name.js +0 -10
  275. package/dist/utils/get-display-name.js.map +0 -1
  276. package/dist/utils/hsl-to-rgb.js +0 -38
  277. package/dist/utils/hsl-to-rgb.js.map +0 -1
  278. package/dist/utils/is-dev-env.js +0 -19
  279. package/dist/utils/is-dev-env.js.map +0 -1
  280. package/dist/utils/is-valid-element-type.js +0 -15
  281. package/dist/utils/is-valid-element-type.js.map +0 -1
  282. package/dist/utils/merge-styles.js.map +0 -1
  283. package/dist/utils/mod-attrs.d.ts +0 -8
  284. package/dist/utils/mod-attrs.js +0 -21
  285. package/dist/utils/mod-attrs.js.map +0 -1
  286. package/dist/utils/okhsl-to-rgb.js +0 -296
  287. package/dist/utils/okhsl-to-rgb.js.map +0 -1
  288. package/dist/utils/process-tokens.d.ts +0 -31
  289. package/dist/utils/process-tokens.js +0 -171
  290. package/dist/utils/process-tokens.js.map +0 -1
  291. package/dist/utils/resolve-recipes.d.ts +0 -17
  292. package/dist/utils/resolve-recipes.js.map +0 -1
  293. package/dist/utils/string.js +0 -8
  294. package/dist/utils/string.js.map +0 -1
  295. package/dist/utils/styles.d.ts +0 -183
  296. package/dist/utils/styles.js +0 -585
  297. package/dist/utils/styles.js.map +0 -1
  298. package/dist/utils/typography.d.ts +0 -36
  299. package/dist/utils/typography.js +0 -53
  300. package/dist/utils/typography.js.map +0 -1
  301. package/dist/utils/warnings.d.ts +0 -16
  302. package/dist/utils/warnings.js +0 -16
  303. package/dist/utils/warnings.js.map +0 -1
  304. package/dist/zero/css-writer.d.ts +0 -45
  305. package/dist/zero/css-writer.js +0 -74
  306. package/dist/zero/css-writer.js.map +0 -1
  307. package/dist/zero/extractor.d.ts +0 -24
  308. package/dist/zero/extractor.js +0 -150
  309. package/dist/zero/extractor.js.map +0 -1
package/docs/styles.md ADDED
@@ -0,0 +1,645 @@
1
+ # Style Properties Reference
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](dsl.md#functions-function) (`$$negative(10px)`). Values are parsed through the Tasty engine automatically.
4
+
5
+ The properties documented below have **custom handlers** with enhanced syntax. They should be **preferred** over their raw CSS equivalents because they:
6
+
7
+ - Provide concise, declarative syntax for common patterns
8
+ - Simplify overrides when extending components
9
+ - Keep style definitions predictable and composable
10
+
11
+ Other CSS properties (e.g. `opacity`, `transform`, `cursor`, `position`, `zIndex`) are passed through with standard Tasty value parsing but no special handler logic.
12
+
13
+ ---
14
+
15
+ ## Recommended Props
16
+
17
+ Use these instead of their raw CSS counterparts:
18
+
19
+ | Use | Instead of |
20
+ |-----|------------|
21
+ | `fill` | `backgroundColor`, `background` |
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` |
26
+ | `height` (with `min`/`max` modifiers) | `minHeight`, `maxHeight` |
27
+ | `border` | `borderColor`, `borderWidth`, `borderStyle` |
28
+ | `radius` | `borderRadius` |
29
+ | `flow` | `flexDirection`, `gridAutoFlow` |
30
+ | `preset` | `fontSize`, `lineHeight`, `letterSpacing`, `fontWeight`, `fontStyle`, `textTransform` |
31
+ | `font` | `fontFamily` |
32
+ | `inset` (with direction modifiers) | `top`, `right`, `bottom`, `left` |
33
+ | `scrollbar` | Raw scrollbar CSS properties |
34
+
35
+ ---
36
+
37
+ ## Layout
38
+
39
+ ### `display`
40
+
41
+ Standard CSS display values. Handled together with `hide`, `textOverflow`, `overflow`, and `whiteSpace` for priority resolution.
42
+
43
+ | Prop | Values | Notes |
44
+ |------|--------|-------|
45
+ | `display` | Any CSS display value | Overridden by `hide` or multi-line `textOverflow` |
46
+ | `hide` | `true` / `false` | Shortcut for `display: none`. Highest priority |
47
+ | `overflow` | Any CSS overflow value | Overridden when `textOverflow` sets `hidden` |
48
+ | `whiteSpace` | Any CSS white-space value | Overridden when `textOverflow` sets `nowrap` or `initial` |
49
+
50
+ ### `textOverflow`
51
+
52
+ Text truncation with optional multi-line clamping.
53
+
54
+ **Syntax:** `[ellipsis|clip]` or `[ellipsis|clip] / [lines]`
55
+
56
+ | Value | Effect |
57
+ |-------|--------|
58
+ | `"ellipsis"` | Single-line truncation with ellipsis, sets `overflow: hidden` and `white-space: nowrap` |
59
+ | `"ellipsis / 3"` | Multi-line clamp (3 lines) with ellipsis, sets `overflow: hidden` and `white-space: initial` |
60
+ | `"clip"` | Single-line truncation without ellipsis, sets `overflow: hidden` and `white-space: nowrap` |
61
+ | `"clip / 2"` | Multi-line clip (2 lines), sets `overflow: hidden` and `white-space: initial` |
62
+ | `true` or `"initial"` | Reset text-overflow to initial |
63
+
64
+ Explicit `whiteSpace` overrides the default white-space set by `textOverflow`.
65
+
66
+ ### `flow`
67
+
68
+ Unified direction control for flex and grid layouts.
69
+
70
+ **Syntax:** `[direction] [wrap|dense]`
71
+
72
+ | Layout | CSS output |
73
+ |--------|------------|
74
+ | Flex | `flex-flow` (direction + wrap) |
75
+ | Grid | `grid-auto-flow` (direction + density) |
76
+ | Block | No CSS output (used by `gap` for direction) |
77
+
78
+ ```jsx
79
+ flow="row wrap" // flex: row wrap
80
+ flow="column dense" // grid: column dense
81
+ flow="column" // flex: column; or grid: column
82
+ ```
83
+
84
+ ### `gap`
85
+
86
+ Spacing between child elements. Adapts to layout type.
87
+
88
+ **Syntax:** `[row-gap]` or `[row-gap column-gap]`
89
+
90
+ | Value | Effect |
91
+ |-------|--------|
92
+ | `"2x"` | Gap of `2x` |
93
+ | `"1x 2x"` | Row gap `1x`, column gap `2x` |
94
+ | `true` | Default gap (`1x`) |
95
+ | Number | Converted to `px` |
96
+
97
+ For flex/grid layouts, outputs native `gap`. For block layouts, emulates gap using `margin` on children based on `flow` direction.
98
+
99
+ ### `padding`
100
+
101
+ Element padding with directional modifiers and multi-group support. Use **comma-separated groups** to set a base value and then override specific directions.
102
+
103
+ **Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
104
+
105
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
106
+
107
+ **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
+
109
+ **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.
110
+
111
+ A group that names *no* direction keeps plain CSS shorthand order, which is unambiguous and unchanged.
112
+
113
+ | Value | Effect |
114
+ |-------|--------|
115
+ | `"2x"` | All sides `2x` |
116
+ | `"2x 1x"` | Top/bottom `2x`, left/right `1x` |
117
+ | `"2x top"` | Top `2x`, right/bottom/left `0` |
118
+ | `"1x left right"` | Left and right `1x`, top/bottom `0` |
119
+ | `"2x top, 4x right"` | Top `2x`, right `4x`, bottom/left `0` |
120
+ | `"1x, 2x top"` | All sides `1x`, then top overridden to `2x` |
121
+ | `"1x, 2x top bottom"` | Left/right `1x`, top/bottom `2x` |
122
+ | `"2x longhand"` | All sides `2x`, output as 4 individual `padding-*` properties |
123
+ | `true` | All sides `1x` |
124
+ | Number | Converted to `px` |
125
+
126
+ Later comma-separated groups override earlier groups for conflicting directions.
127
+
128
+ Individual props `paddingTop`, `paddingRight`, `paddingBottom`, `paddingLeft`, `paddingBlock`, `paddingInline` are supported but `padding` with modifiers is recommended.
129
+
130
+ **Priority:** `padding` < `paddingBlock`/`paddingInline` < `paddingTop`/`paddingRight`/`paddingBottom`/`paddingLeft`
131
+
132
+ ### `margin`
133
+
134
+ Element margin. Same syntax, modifiers, and multi-group support as `padding`.
135
+
136
+ **Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
137
+
138
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
139
+
140
+ **Output modifier:** `longhand` — forces output as individual CSS longhand properties (`margin-top`, etc.) instead of the `margin` shorthand.
141
+
142
+ The [one-value-per-directional-group rule](#padding) from `padding` applies here too.
143
+
144
+ | Value | Effect |
145
+ |-------|--------|
146
+ | `"2x"` | All sides `2x` |
147
+ | `"2x 1x"` | Top/bottom `2x`, left/right `1x` |
148
+ | `"2x top"` | Top `2x`, right/bottom/left `0` |
149
+ | `"2x top, 4x right"` | Top `2x`, right `4x`, bottom/left `0` |
150
+ | `"auto left right, 1x top bottom"` | Left/right `auto`, top/bottom `1x` |
151
+ | `true` | All sides `1x` |
152
+ | Number | Converted to `px` |
153
+
154
+ Later comma-separated groups override earlier groups for conflicting directions.
155
+
156
+ Individual props `marginTop`, `marginRight`, `marginBottom`, `marginLeft`, `marginBlock`, `marginInline` are supported but `margin` with modifiers is recommended.
157
+
158
+ **Priority:** `margin` < `marginBlock`/`marginInline` < `marginTop`/`marginRight`/`marginBottom`/`marginLeft`
159
+
160
+ ### `width`
161
+
162
+ Element width with min/max control. One, two, or three values set `min-width`, `width`, and `max-width` together.
163
+
164
+ **Positional syntax:**
165
+
166
+ | Value | min-width | width | max-width |
167
+ |-------|-----------|-------|-----------|
168
+ | `"10x"` | initial | `10x` | initial |
169
+ | `"1x 10x"` | `1x` | auto | `10x` |
170
+ | `"1x 5x 10x"` | `1x` | `5x` | `10x` |
171
+ | `"0 100% 800px"` | `0` | `100%` | `800px` |
172
+ | `"initial 100% 1400px"` | initial | `100%` | `1400px` |
173
+
174
+ **Modifier syntax:**
175
+
176
+ | Value | min-width | width | max-width |
177
+ |-------|-----------|-------|-----------|
178
+ | `"min 2x"` | `2x` | auto | initial |
179
+ | `"max 100%"` | initial | auto | `100%` |
180
+ | `"fixed 200px"` | `200px` | `200px` | `200px` |
181
+
182
+ **Keywords:** `stretch`, `max-content`, `min-content`, `fit-content`
183
+
184
+ | Value | Effect |
185
+ |-------|--------|
186
+ | `"stretch"` | Fill available space (cross-browser) |
187
+ | `true` | Reset to `auto` / `initial` / `initial` |
188
+ | Number | Converted to `px` |
189
+
190
+ Separate `minWidth` and `maxWidth` props are supported and override values from the `width` syntax.
191
+
192
+ ### `height`
193
+
194
+ Element height. Same syntax, modifiers, and positional patterns as `width`.
195
+
196
+ Separate `minHeight` and `maxHeight` props are supported and override values from the `height` syntax.
197
+
198
+ ### `inset`
199
+
200
+ Positioning offsets with directional modifiers and multi-group support. Same directional syntax as `padding`.
201
+
202
+ **Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
203
+
204
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
205
+
206
+ The [one-value-per-directional-group rule](#padding) from `padding` applies here too, with `dock`
207
+ as the single exception.
208
+
209
+ **`dock` modifier:** pins the named edge and spans its full length, by also applying the value
210
+ to the two perpendicular sides. `inset: 'bottom dock'` gives `inset: auto 0 0 0` — anchored to
211
+ the bottom, full width. Without a direction, `dock` fills every side.
212
+
213
+ `dock` is the one place a directional group takes **two** values: the first insets the named
214
+ edge, the second the sides it spans. `inset: '2x 4x bottom dock'` pins the bottom at `2x` and
215
+ insets the sides by `4x`. A third value, or a second value without `dock`, is ignored and warns
216
+ in development. With several directions the first value applies to each named edge and the
217
+ second to every side they span.
218
+
219
+ **Output modifier:** `longhand` — forces output as individual CSS properties (`top`, `right`, `bottom`, `left`) instead of the `inset` shorthand.
220
+
221
+ | Value | Effect |
222
+ |-------|--------|
223
+ | `"0"` | All sides `0` |
224
+ | `"2x top"` | Top `2x`, right/bottom/left `auto` |
225
+ | `"1x left right"` | Left and right `1x`, top/bottom `auto` |
226
+ | `"0, 2x top"` | All sides `0`, then top overridden to `2x` |
227
+ | `"0 longhand"` | All sides `0`, output as individual `top`/`right`/`bottom`/`left` |
228
+ | `true` | All sides `0` |
229
+ | `"bottom dock"` | Bottom/left/right `0`, top `auto` — bottom-anchored, full width |
230
+ | `"right dock"` | Right/top/bottom `0`, left `auto` — right-anchored, full height |
231
+ | `"2x bottom dock"` | Bottom/left/right `2x`, top `auto` |
232
+ | `"2x 4x bottom dock"` | Bottom `2x`, left/right `4x`, top `auto` |
233
+ | `"dock"` | All sides `0` |
234
+
235
+ Later comma-separated groups override earlier groups for conflicting directions.
236
+
237
+ 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.
238
+
239
+ **Priority:** `inset` < `insetBlock`/`insetInline` < `top`/`right`/`bottom`/`left`
240
+
241
+ ---
242
+
243
+ ## Color & Background
244
+
245
+ ### `fill`
246
+
247
+ Background color with design token support. Preferred over `backgroundColor` and `background`.
248
+
249
+ **Syntax:** `[color]` or `[base-color] [overlay-color]`
250
+
251
+ | Value | Effect |
252
+ |-------|--------|
253
+ | `"#purple"` | Token-based background color |
254
+ | `"#purple.10"` | Token color at 10% opacity |
255
+ | `"#surface #primary.10"` | Background `#surface` with `#primary.10` overlay (two colors enable smooth transitions between both) |
256
+ | `"rgb(255 128 0)"` | CSS color value |
257
+ | `"color-mix(in oklab, #primary 50%, #surface)"` | CSS color function — see [CSS Color Functions](dsl.md#css-color-functions) |
258
+ | `true` | Default fill color |
259
+
260
+ 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.
261
+
262
+ **Related deprecated props:** `backgroundColor` (use `fill`), `background` (overrides all background props when set — avoid).
263
+
264
+ ### `image`
265
+
266
+ Background image. Preferred over `backgroundImage`.
267
+
268
+ **Syntax:** Any CSS background-image value (parsed for token support).
269
+
270
+ ```jsx
271
+ image="url(/path/to/image.png)"
272
+ image="linear-gradient(to right, #purple, #danger)"
273
+ ```
274
+
275
+ Other background props (`backgroundPosition`, `backgroundSize`, `backgroundRepeat`, `backgroundAttachment`, `backgroundOrigin`, `backgroundClip`) are supported as separate props with standard Tasty value parsing.
276
+
277
+ ### `color`
278
+
279
+ Text color with design token support.
280
+
281
+ **Syntax:** Color token, CSS color, `true`, or fallback syntax
282
+
283
+ | Value | Effect |
284
+ |-------|--------|
285
+ | `"#purple"` | Token-based text color |
286
+ | `"#purple.5"` | Token at 50% opacity |
287
+ | `"#current"` | Current inherited color |
288
+ | `"#current.5"` | Current inherited color at 50% opacity |
289
+ | `"(#primary, #secondary)"` | Fallback: use `#primary`, fall back to `#secondary` |
290
+ | `"light-dark(#dark, #light)"` | CSS color function — see [CSS Color Functions](dsl.md#css-color-functions) |
291
+ | `true` | `currentColor` |
292
+
293
+ Also sets `$current-color` to the same color, for anything that needs the
294
+ inherited color as a color rather than as the `currentcolor` keyword. Every color
295
+ publishes it, not just a named token, so a reader below always takes the nearest
296
+ `color` rather than the nearest *token* color. A value that already reads the
297
+ inherited color — `#current` itself, a `#current` fade, a bare `currentColor` —
298
+ is not republished: resolving it a second time one level down would fade it
299
+ twice, and the variable into itself is a self-reference. `#current` does not go
300
+ through it; it is the keyword.
301
+
302
+ ### `svgFill`
303
+
304
+ SVG fill color. Same color token syntax as `fill` and `color`. Outputs the native CSS `fill` property.
305
+
306
+ ```jsx
307
+ svgFill="#purple.10"
308
+ svgFill="#current"
309
+ ```
310
+
311
+ ---
312
+
313
+ ## Border & Outline
314
+
315
+ ### `border`
316
+
317
+ Border shorthand with directional and multi-group support. Use **comma-separated groups** to set different values per direction — this is the recommended approach for directional borders.
318
+
319
+ **Syntax:** `[width] [style] [color] [directions...]` — comma-separated for multiple groups
320
+
321
+ **Defaults:** width = `1bw`, style = `solid`, color = `#border`
322
+
323
+ **Styles:** `none`, `hidden`, `dotted`, `dashed`, `solid`, `double`, `groove`, `ridge`, `inset`, `outset`
324
+
325
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
326
+
327
+ **Output modifier:** `longhand` — forces output as individual CSS properties (`border-top`, `border-right`, `border-bottom`, `border-left`) instead of the `border` shorthand. Useful when children need to selectively inherit individual sides.
328
+
329
+ | Value | Effect |
330
+ |-------|--------|
331
+ | `true` | Default border (`1bw solid #border`) on all sides |
332
+ | `"2bw dashed #purple"` | All sides: 2bw dashed purple |
333
+ | `"2bw top"` | Top only: 2bw solid `#border`, others: 0 |
334
+ | `"dotted #danger left right"` | Left/right: 1bw dotted `#danger`, others: 0 |
335
+ | `"1bw longhand"` | All sides: 1bw solid `#border`, output as 4 individual `border-*` properties |
336
+ | `"1bw #red, 2bw #blue top"` | All sides: 1bw solid `#red`, top overridden to 2bw solid `#blue` |
337
+ | `"1bw, dashed top bottom, #purple left right"` | Base: 1bw solid `#border`, top/bottom: 1bw dashed `#border`, left/right: 1bw solid `#purple` |
338
+
339
+ Later comma-separated groups override earlier groups for conflicting directions.
340
+
341
+ ### `radius`
342
+
343
+ Border radius with shape presets and directional modifiers.
344
+
345
+ **Syntax:** `[value] [modifiers...]` | `[shape]` | `true`
346
+
347
+ **Shapes:**
348
+
349
+ | Shape | Effect |
350
+ |-------|--------|
351
+ | `"round"` | Fully rounded (`9999rem`) |
352
+ | `"ellipse"` | Circular (`50%`) |
353
+ | `"leaf"` | Asymmetric: sharp, round, sharp, round |
354
+ | `"backleaf"` | Asymmetric: round, sharp, round, sharp |
355
+ | `"inherit"` | Inherit border-radius from parent |
356
+
357
+ **Edge modifiers:** `top`, `right`, `bottom`, `left` — rounds the *pair* of corners along that edge.
358
+
359
+ **Corner modifiers:** `top-left`, `top-right`, `bottom-right`, `bottom-left` — rounds a single corner.
360
+ Use these when an edge modifier would round one corner too many. Edge and corner modifiers combine
361
+ (`radius: 'top bottom-right'`).
362
+
363
+ **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'`.
364
+
365
+ | Value | Effect |
366
+ |-------|--------|
367
+ | `"2r"` | All corners `2r` |
368
+ | `true` | All corners `1r` |
369
+ | `"round"` | All corners `9999rem` (pill shape) |
370
+ | `"1r top"` | Top-left and top-right `1r`, bottom-left and bottom-right `0` |
371
+ | `"leaf"` | Alternating sharp/round corners (top-left `0`, top-right `1r`, bottom-right `0`, bottom-left `1r`) |
372
+ | `"backleaf"` | Inverse leaf (top-left `1r`, top-right `0`, bottom-right `1r`, bottom-left `0`) |
373
+ | `"1r longhand"` | All corners `1r`, output as 4 individual `border-*-radius` properties |
374
+ | `"inherit"` | All corners inherit from parent (`border-radius: inherit`) |
375
+ | `"inherit right"` | Right corners inherit from parent (uses longhand properties) |
376
+ | `"top-right"` | Top-right corner `1r`, every other corner `0` |
377
+ | `"4px top-left"` | Top-left corner `4px`, every other corner `0` |
378
+ | `"top bottom-right"` | Both top corners and bottom-right `1r`, bottom-left `0` |
379
+
380
+ ### `outline`
381
+
382
+ Outline with inline offset support.
383
+
384
+ **Syntax:** `[width] [style] [color] / [offset]`
385
+
386
+ **Defaults:** width = `1ow`, style = `solid`, color = `#outline`
387
+
388
+ **Styles:** Same as `border` (`none`, `dotted`, `dashed`, `solid`, etc.)
389
+
390
+ | Value | Effect |
391
+ |-------|--------|
392
+ | `true` | Default outline (`1ow solid #outline`) |
393
+ | `"2ow dashed #purple"` | 2ow dashed `#purple` outline |
394
+ | `"2ow #danger / 1x"` | 2ow solid `#danger` outline with 1x offset |
395
+ | `"2ow / 1x"` | 2ow solid `#outline` with 1x offset |
396
+ | `0` | No outline |
397
+
398
+ The `/` separator separates outline from offset. A separate `outlineOffset` prop is also supported but the slash syntax takes precedence.
399
+
400
+ ### `shadow`
401
+
402
+ Box shadow. Supports multiple shadows comma-separated.
403
+
404
+ **Syntax:** `[inset] [x] [y] [blur] [spread] [color]`
405
+
406
+ | Value | Effect |
407
+ |-------|--------|
408
+ | `true` | Default shadow (uses `var(--shadow)` — define a `$shadow` token in your design system) |
409
+ | `"1x .5x .5x #dark.50"` | Custom shadow with Tasty units/colors |
410
+ | `"0 1x 2x #dark.20"` | Standard shadow |
411
+ | `"inset 0 1x 2x #dark.10"` | Inset shadow |
412
+
413
+ Multiple shadows: `shadow="1x 1x 2x #dark.20, inset 0 0 4x #dark.10"`
414
+
415
+ ---
416
+
417
+ ## Typography
418
+
419
+ ### `preset`
420
+
421
+ Typography preset that sets font-size, line-height, letter-spacing, font-weight, font-style, and text-transform from named design tokens.
422
+
423
+ **Syntax:** `name`, `name / modifier...`, or `modifier...` (shorthand)
424
+
425
+ Preset names are project-specific (e.g. `h1`–`h6`, `t1`–`t4`, `p1`–`p4`). Register them for autocomplete by augmenting `TastyPresetNames`.
426
+
427
+ Use `/` to separate the preset name from one or more space-separated modifiers. When modifiers are used alone (without a name), the preset name defaults to `inherit`. Modifiers can be combined freely because they target different properties.
428
+
429
+ **Modifiers:**
430
+
431
+ | Modifier | Effect |
432
+ |----------|--------|
433
+ | `strong` (or `bold`) | Sets `font-weight` to bold (from `$bold-font-weight` token) |
434
+ | `italic` | Sets `font-style: italic` |
435
+ | `icon` | Sets font-size and line-height to icon size |
436
+ | `tight` | Sets line-height equal to font-size |
437
+
438
+ ```jsx
439
+ preset="h1" // heading 1
440
+ preset="h2 / strong" // bold heading 2
441
+ preset="h2 / strong italic" // bold + italic heading 2
442
+ preset="t3 / italic" // italic text 3
443
+ preset="t2 / strong tight" // bold text 2 with tight line-height
444
+ preset="bold" // inherit preset with bold (shorthand)
445
+ preset="bold italic" // inherit preset with bold + italic (shorthand)
446
+ ```
447
+
448
+ Individual typography props (`fontSize`, `lineHeight`, `letterSpacing`, `fontWeight`, `fontStyle`, `textTransform`) can be used alongside `preset` to override specific values, but using `preset` alone is recommended.
449
+
450
+ ### `font`
451
+
452
+ Font family with design-system fallback. Preferred over `fontFamily`.
453
+
454
+ | Value | Effect |
455
+ |-------|--------|
456
+ | `"monospace"` | Monospace font stack (from `$monospace-font` token) |
457
+ | `true` | Default system font (from `$font` token) |
458
+ | `"CustomFont"` | Custom font with system font fallback |
459
+
460
+ `fontFamily` is supported as a direct pass-through without fallback logic.
461
+
462
+ ---
463
+
464
+ ## Alignment
465
+
466
+ Use the individual CSS properties (`alignItems`, `alignContent`, `justifyItems`, `justifyContent`, `placeItems`, `placeContent`) for precise control. The shorthands below set both the `-items` and `-content` variants to the same value, which is convenient but less flexible.
467
+
468
+ ### `align`
469
+
470
+ Shorthand that sets both `align-items` and `align-content` to the same value.
471
+
472
+ ```jsx
473
+ align="center"
474
+ align="flex-start"
475
+ align="space-between"
476
+ ```
477
+
478
+ ### `justify`
479
+
480
+ Shorthand that sets both `justify-items` and `justify-content` to the same value.
481
+
482
+ ```jsx
483
+ justify="center"
484
+ justify="space-between"
485
+ justify="flex-end"
486
+ ```
487
+
488
+ ### `place`
489
+
490
+ Shorthand that sets both `place-items` and `place-content` to the same value.
491
+
492
+ ```jsx
493
+ place="center"
494
+ place="stretch"
495
+ ```
496
+
497
+ Individual props `placeContent` and `placeItems` are also available for separate control.
498
+
499
+ ---
500
+
501
+ ## Animation & Transition
502
+
503
+ ### `transition`
504
+
505
+ Semantic transition names that expand to groups of CSS properties.
506
+
507
+ **Syntax:** `[name] [timing] [easing] [delay]` or `[name] [easing] [delay]` — comma-separated for multiple transitions.
508
+
509
+ When easing is provided without a duration, the default timing variable is used automatically.
510
+
511
+ **Semantic names:**
512
+
513
+ | Name | CSS properties |
514
+ |------|---------------|
515
+ | `fill` | `background-color`, `background-image`, `--tasty-second-fill-color` |
516
+ | `color` | `color` |
517
+ | `theme` | `color`, `background-color`, `background-image`, `box-shadow`, `border`, `border-radius`, `outline`, `opacity`, `--tasty-second-fill-color` |
518
+ | `border` | `border`, `border-top`, `border-right`, `border-bottom`, `border-left` |
519
+ | `radius` | `border-radius` |
520
+ | `shadow` | `box-shadow` |
521
+ | `outline` | `outline`, `outline-offset` |
522
+ | `preset` | `font-size`, `line-height`, `letter-spacing`, `font-weight`, `font-style` |
523
+ | `text` | `font-weight`, `text-decoration-color` |
524
+ | `fade` | `mask`, `mask-composite` |
525
+ | `opacity` | `opacity` |
526
+ | `translate` | `transform`, `translate` |
527
+ | `rotate` | `transform`, `rotate` |
528
+ | `scale` | `transform`, `scale` |
529
+ | `filter` | `filter`, `backdrop-filter` |
530
+ | `image` / `background` | All background-related properties |
531
+ | `width` | `width`, `min-width`, `max-width` |
532
+ | `height` | `height`, `min-height`, `max-height` |
533
+ | `gap` | `gap`, `margin` |
534
+ | `zIndex` | `z-index` |
535
+ | `inset` | `inset`, `top`, `right`, `bottom`, `left` |
536
+
537
+ Default timing: `$transition` (or `${name}-transition` with `$transition` fallback per semantic name).
538
+
539
+ ```jsx
540
+ transition="theme 0.3s"
541
+ transition="fill 0.2s, radius 0.3s"
542
+ transition="fade 0.15s ease-in"
543
+ transition="fill ease-in" // easing without duration (uses default timing)
544
+ transition="radius ease-in-out" // easing keyword only
545
+ transition="$$custom-prop 0.3s" // custom property transition
546
+ ```
547
+
548
+ **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.
549
+
550
+ If the name is not a semantic name, it is used as a literal CSS property name.
551
+
552
+ ---
553
+
554
+ ## Scrollbar & Overflow
555
+
556
+ ### `scrollbar`
557
+
558
+ Scrollbar styling using CSS standard properties (`scrollbar-width`, `scrollbar-color`, `scrollbar-gutter`).
559
+
560
+ **Syntax:** `[width] [modifiers...] [thumb-color] [track-color]`
561
+
562
+ **Width values** (controls `scrollbar-width`, default is `thin`):
563
+
564
+ | Value | Effect |
565
+ |-------|--------|
566
+ | `thin` | Thin scrollbar (default) |
567
+ | `auto` | Browser-default scrollbar width |
568
+ | `none` | Hide scrollbar (still scrollable, no colors applied) |
569
+
570
+ **Modifiers** (controls gutter and overflow behavior):
571
+
572
+ | Modifier | Effect |
573
+ |----------|--------|
574
+ | `stable` | Reserve space for scrollbar (`scrollbar-gutter: stable`) |
575
+ | `both-edges` | Reserve space on both sides (`scrollbar-gutter: stable both-edges`) |
576
+ | `always` | Force scrollbars visible (`overflow: scroll` + `scrollbar-gutter: stable`) |
577
+
578
+ **Colors:** Up to 2 color values for thumb and track (optional), applied via `scrollbar-color`.
579
+
580
+ **Defaults:** When no colors are specified, the thumb color comes from `var(--scrollbar-thumb-color)` and the track color from `var(--scrollbar-track-color, transparent)`. These are not built-in — your design system should define `#scrollbar-thumb` and `#scrollbar-track` tokens (e.g. `'#text.5'` and `'#dark-bg'`). If neither token is defined, the track falls back to `transparent` via a CSS fallback, while the thumb has no CSS-level fallback — the browser treats the entire `scrollbar-color` declaration as invalid and reverts to the platform-default scrollbar appearance.
581
+
582
+ **Note:** `none` takes precedence over all other modifiers and colors. Combining `none` with other tokens (e.g., `"none always #red"`) produces a warning, and only `scrollbar-width: none` is applied.
583
+
584
+ | Value | Effect |
585
+ |-------|--------|
586
+ | `true` | Thin scrollbar with default thumb/track colors |
587
+ | `"none"` | Hidden scrollbar (still scrollable) |
588
+ | `"thin #purple.40 #dark.04"` | Thin scrollbar with custom colors |
589
+ | `"auto #red #blue"` | Browser-default width with custom colors |
590
+ | `"always #primary.50 #white.02"` | Always visible with custom colors |
591
+ | `"thin stable #red #blue"` | Thin, gutter reserved, custom colors |
592
+
593
+ ### `fade`
594
+
595
+ Gradient-based edge fading using CSS masks. Use **comma-separated groups** to set different widths and colors per direction.
596
+
597
+ **Syntax:** `[width] [direction...] [#from-color] [#to-color]` — comma-separated for multiple groups
598
+
599
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
600
+
601
+ A group that names edges takes a **single** width, applied to every edge it names — different
602
+ widths per edge come from comma groups. A group that names no edge covers all four and keeps
603
+ plain CSS shorthand order, like `padding`. See the [`padding` rule](#padding).
604
+
605
+ | Value | Effect |
606
+ |-------|--------|
607
+ | `"top"` | Fade top edge, default width (`2x`), all other edges unfaded |
608
+ | `"2x left right"` | Fade left and right edges with `2x` width, top/bottom unfaded |
609
+ | `"3x 1x"` | All edges faded — top/bottom `3x`, left/right `1x` (CSS shorthand order) |
610
+ | `"3x top, 1x bottom"` | Fade top with `3x` width, bottom with `1x` width |
611
+ | `"2x #transparent #dark"` | All edges faded with `2x` width, from `#transparent` to `#dark` |
612
+ | `"top #a #b, bottom #c #d"` | Top fades from `#a` to `#b`, bottom fades from `#c` to `#d` |
613
+
614
+ Colors are optional: first = transparent mask start, second = opaque mask end.
615
+
616
+ ---
617
+
618
+ ## Grid Aliases
619
+
620
+ ### `gridColumns`
621
+
622
+ Alias for `grid-template-columns`.
623
+
624
+ | Value | Effect |
625
+ |-------|--------|
626
+ | `"1fr 2fr 1fr"` | Three columns with ratios |
627
+ | `3` (number) | Three equal `minmax(1px, 1fr)` columns |
628
+ | `"repeat(auto-fit, minmax(200px, 1fr))"` | Responsive columns |
629
+
630
+ ### `gridRows`
631
+
632
+ Alias for `grid-template-rows`.
633
+
634
+ | Value | Effect |
635
+ |-------|--------|
636
+ | `"auto 1fr auto"` | Header, content, footer |
637
+ | `4` (number) | Four equal `auto` rows |
638
+
639
+ ### `gridAreas`
640
+
641
+ Alias for `grid-template-areas`. Pass-through string value.
642
+
643
+ ### `gridTemplate`
644
+
645
+ Alias for `grid-template`. Slash-separated rows/columns with number conversion.