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

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 (330) hide show
  1. package/README.md +497 -266
  2. package/dist/babel-types-DpUCD2L_.d.ts +18 -0
  3. package/dist/chunks/async-storage-f9j9JRtq.js +37 -0
  4. package/dist/chunks/async-storage-f9j9JRtq.js.map +1 -0
  5. package/dist/chunks/build-config-BDLYGmKn.js +60 -0
  6. package/dist/chunks/build-config-BDLYGmKn.js.map +1 -0
  7. package/dist/chunks/collector-DqcB0UUT.js +210 -0
  8. package/dist/chunks/collector-DqcB0UUT.js.map +1 -0
  9. package/dist/chunks/config-engine-CGIMO2PV.js +272 -0
  10. package/dist/chunks/config-engine-CGIMO2PV.js.map +1 -0
  11. package/dist/chunks/config-file-DlZXJMj8.js +25 -0
  12. package/dist/chunks/config-file-DlZXJMj8.js.map +1 -0
  13. package/dist/chunks/css-definitions-BibU6ZnP.js +904 -0
  14. package/dist/chunks/css-definitions-BibU6ZnP.js.map +1 -0
  15. package/dist/chunks/css-resources-P7IBUUZs.js +142 -0
  16. package/dist/chunks/css-resources-P7IBUUZs.js.map +1 -0
  17. package/dist/chunks/debug-BzYPQ0H2.js +502 -0
  18. package/dist/chunks/debug-BzYPQ0H2.js.map +1 -0
  19. package/dist/chunks/dsl-DRhFWQzo.js +1378 -0
  20. package/dist/chunks/dsl-DRhFWQzo.js.map +1 -0
  21. package/dist/chunks/hydration-TRcz5vnk.js +41 -0
  22. package/dist/chunks/hydration-TRcz5vnk.js.map +1 -0
  23. package/dist/chunks/react-runtime-B2e-Wha-.js +689 -0
  24. package/dist/chunks/react-runtime-B2e-Wha-.js.map +1 -0
  25. package/dist/chunks/runtime-engine-yeyCAx2e.js +2431 -0
  26. package/dist/chunks/runtime-engine-yeyCAx2e.js.map +1 -0
  27. package/dist/chunks/runtime-state-C0u1jp-Q.js +141 -0
  28. package/dist/chunks/runtime-state-C0u1jp-Q.js.map +1 -0
  29. package/dist/{utils/merge-styles.js → chunks/shared-utils-y-HjvPN4.js} +61 -58
  30. package/dist/chunks/shared-utils-y-HjvPN4.js.map +1 -0
  31. package/dist/chunks/style-engine-D35rvcdB.js +5420 -0
  32. package/dist/chunks/style-engine-D35rvcdB.js.map +1 -0
  33. package/dist/chunks/zero-engine-DpkieEPZ.js +310 -0
  34. package/dist/chunks/zero-engine-DpkieEPZ.js.map +1 -0
  35. package/dist/collector-D4POJ53X.d.ts +164 -0
  36. package/dist/config-DvPUj4cw.d.ts +1364 -0
  37. package/dist/core/index.d.ts +5 -33
  38. package/dist/core/index.js +9 -26
  39. package/dist/hydrate-CRyjjAyl.d.ts +22 -0
  40. package/dist/index-DC4q-xDq.d.ts +1946 -0
  41. package/dist/index.d.ts +5 -40
  42. package/dist/index.js +11 -33
  43. package/dist/{utils/merge-styles.d.ts → merge-styles-Jb5iZ-Jf.d.ts} +3 -4
  44. package/dist/ssr/astro-client.d.ts +1 -0
  45. package/dist/ssr/astro-client.js +6 -0
  46. package/dist/ssr/astro-client.js.map +1 -0
  47. package/dist/ssr/astro-middleware-extract-static.d.ts +10 -0
  48. package/dist/ssr/astro-middleware-extract-static.js +9 -0
  49. package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
  50. package/dist/ssr/astro-middleware-extract.d.ts +10 -0
  51. package/dist/ssr/astro-middleware-extract.js +9 -0
  52. package/dist/ssr/astro-middleware-extract.js.map +1 -0
  53. package/dist/ssr/astro-middleware-static.d.ts +17 -0
  54. package/dist/ssr/astro-middleware-static.js +7 -0
  55. package/dist/ssr/astro-middleware-static.js.map +1 -0
  56. package/dist/ssr/astro-middleware.d.ts +18 -0
  57. package/dist/ssr/astro-middleware.js +7 -0
  58. package/dist/ssr/astro-middleware.js.map +1 -0
  59. package/dist/ssr/astro.d.ts +127 -0
  60. package/dist/ssr/astro.js +221 -0
  61. package/dist/ssr/astro.js.map +1 -0
  62. package/dist/ssr/client.d.ts +2 -0
  63. package/dist/ssr/client.js +2 -0
  64. package/dist/ssr/index.d.ts +17 -0
  65. package/dist/ssr/index.js +10 -0
  66. package/dist/ssr/index.js.map +1 -0
  67. package/dist/ssr/next-config.d.ts +64 -0
  68. package/dist/ssr/next-config.js +123 -0
  69. package/dist/ssr/next-config.js.map +1 -0
  70. package/dist/ssr/next.d.ts +46 -0
  71. package/dist/ssr/next.js +60 -0
  72. package/dist/ssr/next.js.map +1 -0
  73. package/dist/static/index.d.ts +90 -5
  74. package/dist/static/index.js +31 -4
  75. package/dist/static/index.js.map +1 -0
  76. package/dist/static/inject.d.ts +4 -0
  77. package/dist/static/inject.js +17 -0
  78. package/dist/static/inject.js.map +1 -0
  79. package/dist/types-ZbF2_6LV.d.ts +1567 -0
  80. package/dist/zero/babel.d.ts +49 -90
  81. package/dist/zero/babel.js +252 -119
  82. package/dist/zero/babel.js.map +1 -1
  83. package/dist/zero/index.d.ts +117 -3
  84. package/dist/zero/index.js +23 -3
  85. package/dist/zero/index.js.map +1 -0
  86. package/dist/zero/next.d.ts +58 -33
  87. package/dist/zero/next.js +89 -59
  88. package/dist/zero/next.js.map +1 -1
  89. package/docs/README.md +42 -0
  90. package/docs/adoption.md +331 -0
  91. package/docs/ai-agents.md +252 -0
  92. package/docs/comparison.md +449 -0
  93. package/docs/configuration.md +943 -0
  94. package/docs/debug.md +333 -0
  95. package/docs/design-system.md +557 -0
  96. package/docs/dsl.md +1093 -0
  97. package/docs/getting-started.md +297 -0
  98. package/docs/injector.md +633 -0
  99. package/docs/methodology.md +673 -0
  100. package/docs/migration-v3.md +285 -0
  101. package/docs/pipeline.md +768 -0
  102. package/docs/plugins.md +333 -0
  103. package/docs/react-api.md +703 -0
  104. package/docs/runtime-benchmarks.md +388 -0
  105. package/docs/ssr.md +630 -0
  106. package/docs/styles.md +725 -0
  107. package/docs/tasty-static.md +659 -0
  108. package/package.json +238 -50
  109. package/tasty.config.ts +6 -0
  110. package/dist/_virtual/_rolldown/runtime.js +0 -8
  111. package/dist/chunks/cacheKey.js +0 -70
  112. package/dist/chunks/cacheKey.js.map +0 -1
  113. package/dist/chunks/definitions.d.ts +0 -37
  114. package/dist/chunks/definitions.js +0 -260
  115. package/dist/chunks/definitions.js.map +0 -1
  116. package/dist/chunks/renderChunk.js +0 -61
  117. package/dist/chunks/renderChunk.js.map +0 -1
  118. package/dist/config.d.ts +0 -280
  119. package/dist/config.js +0 -403
  120. package/dist/config.js.map +0 -1
  121. package/dist/debug.d.ts +0 -204
  122. package/dist/debug.js +0 -733
  123. package/dist/debug.js.map +0 -1
  124. package/dist/hooks/useGlobalStyles.d.ts +0 -27
  125. package/dist/hooks/useGlobalStyles.js +0 -56
  126. package/dist/hooks/useGlobalStyles.js.map +0 -1
  127. package/dist/hooks/useKeyframes.d.ts +0 -56
  128. package/dist/hooks/useKeyframes.js +0 -54
  129. package/dist/hooks/useKeyframes.js.map +0 -1
  130. package/dist/hooks/useProperty.d.ts +0 -79
  131. package/dist/hooks/useProperty.js +0 -91
  132. package/dist/hooks/useProperty.js.map +0 -1
  133. package/dist/hooks/useRawCSS.d.ts +0 -53
  134. package/dist/hooks/useRawCSS.js +0 -28
  135. package/dist/hooks/useRawCSS.js.map +0 -1
  136. package/dist/hooks/useStyles.d.ts +0 -40
  137. package/dist/hooks/useStyles.js +0 -169
  138. package/dist/hooks/useStyles.js.map +0 -1
  139. package/dist/injector/index.d.ts +0 -157
  140. package/dist/injector/index.js +0 -154
  141. package/dist/injector/index.js.map +0 -1
  142. package/dist/injector/injector.d.ts +0 -139
  143. package/dist/injector/injector.js +0 -404
  144. package/dist/injector/injector.js.map +0 -1
  145. package/dist/injector/sheet-manager.d.ts +0 -127
  146. package/dist/injector/sheet-manager.js +0 -714
  147. package/dist/injector/sheet-manager.js.map +0 -1
  148. package/dist/injector/types.d.ts +0 -135
  149. package/dist/keyframes/index.js +0 -206
  150. package/dist/keyframes/index.js.map +0 -1
  151. package/dist/parser/classify.js +0 -319
  152. package/dist/parser/classify.js.map +0 -1
  153. package/dist/parser/const.js +0 -33
  154. package/dist/parser/const.js.map +0 -1
  155. package/dist/parser/lru.js +0 -109
  156. package/dist/parser/lru.js.map +0 -1
  157. package/dist/parser/parser.d.ts +0 -25
  158. package/dist/parser/parser.js +0 -116
  159. package/dist/parser/parser.js.map +0 -1
  160. package/dist/parser/tokenizer.js +0 -69
  161. package/dist/parser/tokenizer.js.map +0 -1
  162. package/dist/parser/types.d.ts +0 -51
  163. package/dist/parser/types.js +0 -46
  164. package/dist/parser/types.js.map +0 -1
  165. package/dist/pipeline/conditions.d.ts +0 -134
  166. package/dist/pipeline/conditions.js +0 -400
  167. package/dist/pipeline/conditions.js.map +0 -1
  168. package/dist/pipeline/exclusive.js +0 -231
  169. package/dist/pipeline/exclusive.js.map +0 -1
  170. package/dist/pipeline/index.d.ts +0 -53
  171. package/dist/pipeline/index.js +0 -641
  172. package/dist/pipeline/index.js.map +0 -1
  173. package/dist/pipeline/materialize.js +0 -908
  174. package/dist/pipeline/materialize.js.map +0 -1
  175. package/dist/pipeline/parseStateKey.d.ts +0 -15
  176. package/dist/pipeline/parseStateKey.js +0 -430
  177. package/dist/pipeline/parseStateKey.js.map +0 -1
  178. package/dist/pipeline/simplify.js +0 -557
  179. package/dist/pipeline/simplify.js.map +0 -1
  180. package/dist/plugins/okhsl-plugin.d.ts +0 -35
  181. package/dist/plugins/okhsl-plugin.js +0 -371
  182. package/dist/plugins/okhsl-plugin.js.map +0 -1
  183. package/dist/plugins/types.d.ts +0 -69
  184. package/dist/properties/index.js +0 -158
  185. package/dist/properties/index.js.map +0 -1
  186. package/dist/states/index.d.ts +0 -49
  187. package/dist/states/index.js +0 -416
  188. package/dist/states/index.js.map +0 -1
  189. package/dist/static/tastyStatic.d.ts +0 -46
  190. package/dist/static/tastyStatic.js +0 -31
  191. package/dist/static/tastyStatic.js.map +0 -1
  192. package/dist/static/types.d.ts +0 -49
  193. package/dist/static/types.js +0 -24
  194. package/dist/static/types.js.map +0 -1
  195. package/dist/styles/align.d.ts +0 -15
  196. package/dist/styles/align.js +0 -14
  197. package/dist/styles/align.js.map +0 -1
  198. package/dist/styles/border.d.ts +0 -25
  199. package/dist/styles/border.js +0 -114
  200. package/dist/styles/border.js.map +0 -1
  201. package/dist/styles/color.d.ts +0 -14
  202. package/dist/styles/color.js +0 -23
  203. package/dist/styles/color.js.map +0 -1
  204. package/dist/styles/createStyle.js +0 -77
  205. package/dist/styles/createStyle.js.map +0 -1
  206. package/dist/styles/dimension.js +0 -97
  207. package/dist/styles/dimension.js.map +0 -1
  208. package/dist/styles/display.d.ts +0 -37
  209. package/dist/styles/display.js +0 -67
  210. package/dist/styles/display.js.map +0 -1
  211. package/dist/styles/fade.d.ts +0 -15
  212. package/dist/styles/fade.js +0 -58
  213. package/dist/styles/fade.js.map +0 -1
  214. package/dist/styles/fill.d.ts +0 -44
  215. package/dist/styles/fill.js +0 -51
  216. package/dist/styles/fill.js.map +0 -1
  217. package/dist/styles/flow.d.ts +0 -16
  218. package/dist/styles/flow.js +0 -12
  219. package/dist/styles/flow.js.map +0 -1
  220. package/dist/styles/gap.d.ts +0 -31
  221. package/dist/styles/gap.js +0 -37
  222. package/dist/styles/gap.js.map +0 -1
  223. package/dist/styles/height.d.ts +0 -17
  224. package/dist/styles/height.js +0 -20
  225. package/dist/styles/height.js.map +0 -1
  226. package/dist/styles/index.d.ts +0 -2
  227. package/dist/styles/index.js +0 -9
  228. package/dist/styles/index.js.map +0 -1
  229. package/dist/styles/inset.d.ts +0 -52
  230. package/dist/styles/inset.js +0 -150
  231. package/dist/styles/inset.js.map +0 -1
  232. package/dist/styles/justify.d.ts +0 -15
  233. package/dist/styles/justify.js +0 -14
  234. package/dist/styles/justify.js.map +0 -1
  235. package/dist/styles/list.d.ts +0 -16
  236. package/dist/styles/list.js +0 -98
  237. package/dist/styles/list.js.map +0 -1
  238. package/dist/styles/margin.d.ts +0 -24
  239. package/dist/styles/margin.js +0 -104
  240. package/dist/styles/margin.js.map +0 -1
  241. package/dist/styles/outline.d.ts +0 -29
  242. package/dist/styles/outline.js +0 -65
  243. package/dist/styles/outline.js.map +0 -1
  244. package/dist/styles/padding.d.ts +0 -24
  245. package/dist/styles/padding.js +0 -104
  246. package/dist/styles/padding.js.map +0 -1
  247. package/dist/styles/predefined.d.ts +0 -73
  248. package/dist/styles/predefined.js +0 -241
  249. package/dist/styles/predefined.js.map +0 -1
  250. package/dist/styles/preset.d.ts +0 -47
  251. package/dist/styles/preset.js +0 -126
  252. package/dist/styles/preset.js.map +0 -1
  253. package/dist/styles/radius.d.ts +0 -14
  254. package/dist/styles/radius.js +0 -51
  255. package/dist/styles/radius.js.map +0 -1
  256. package/dist/styles/scrollbar.d.ts +0 -21
  257. package/dist/styles/scrollbar.js +0 -105
  258. package/dist/styles/scrollbar.js.map +0 -1
  259. package/dist/styles/shadow.d.ts +0 -14
  260. package/dist/styles/shadow.js +0 -24
  261. package/dist/styles/shadow.js.map +0 -1
  262. package/dist/styles/styledScrollbar.d.ts +0 -47
  263. package/dist/styles/styledScrollbar.js +0 -38
  264. package/dist/styles/styledScrollbar.js.map +0 -1
  265. package/dist/styles/transition.d.ts +0 -14
  266. package/dist/styles/transition.js +0 -158
  267. package/dist/styles/transition.js.map +0 -1
  268. package/dist/styles/types.d.ts +0 -498
  269. package/dist/styles/width.d.ts +0 -17
  270. package/dist/styles/width.js +0 -20
  271. package/dist/styles/width.js.map +0 -1
  272. package/dist/tasty.d.ts +0 -982
  273. package/dist/tasty.js +0 -191
  274. package/dist/tasty.js.map +0 -1
  275. package/dist/tokens/typography.d.ts +0 -19
  276. package/dist/tokens/typography.js +0 -237
  277. package/dist/tokens/typography.js.map +0 -1
  278. package/dist/types.d.ts +0 -184
  279. package/dist/utils/cache-wrapper.js +0 -26
  280. package/dist/utils/cache-wrapper.js.map +0 -1
  281. package/dist/utils/case-converter.js +0 -8
  282. package/dist/utils/case-converter.js.map +0 -1
  283. package/dist/utils/colors.d.ts +0 -5
  284. package/dist/utils/colors.js +0 -9
  285. package/dist/utils/colors.js.map +0 -1
  286. package/dist/utils/css-types.d.ts +0 -7
  287. package/dist/utils/dotize.d.ts +0 -26
  288. package/dist/utils/dotize.js +0 -122
  289. package/dist/utils/dotize.js.map +0 -1
  290. package/dist/utils/filter-base-props.d.ts +0 -15
  291. package/dist/utils/filter-base-props.js +0 -45
  292. package/dist/utils/filter-base-props.js.map +0 -1
  293. package/dist/utils/get-display-name.d.ts +0 -7
  294. package/dist/utils/get-display-name.js +0 -10
  295. package/dist/utils/get-display-name.js.map +0 -1
  296. package/dist/utils/hsl-to-rgb.js +0 -38
  297. package/dist/utils/hsl-to-rgb.js.map +0 -1
  298. package/dist/utils/is-dev-env.js +0 -19
  299. package/dist/utils/is-dev-env.js.map +0 -1
  300. package/dist/utils/is-valid-element-type.js +0 -15
  301. package/dist/utils/is-valid-element-type.js.map +0 -1
  302. package/dist/utils/merge-styles.js.map +0 -1
  303. package/dist/utils/mod-attrs.d.ts +0 -8
  304. package/dist/utils/mod-attrs.js +0 -21
  305. package/dist/utils/mod-attrs.js.map +0 -1
  306. package/dist/utils/okhsl-to-rgb.js +0 -296
  307. package/dist/utils/okhsl-to-rgb.js.map +0 -1
  308. package/dist/utils/process-tokens.d.ts +0 -31
  309. package/dist/utils/process-tokens.js +0 -171
  310. package/dist/utils/process-tokens.js.map +0 -1
  311. package/dist/utils/resolve-recipes.d.ts +0 -17
  312. package/dist/utils/resolve-recipes.js +0 -147
  313. package/dist/utils/resolve-recipes.js.map +0 -1
  314. package/dist/utils/string.js +0 -8
  315. package/dist/utils/string.js.map +0 -1
  316. package/dist/utils/styles.d.ts +0 -183
  317. package/dist/utils/styles.js +0 -585
  318. package/dist/utils/styles.js.map +0 -1
  319. package/dist/utils/typography.d.ts +0 -36
  320. package/dist/utils/typography.js +0 -53
  321. package/dist/utils/typography.js.map +0 -1
  322. package/dist/utils/warnings.d.ts +0 -16
  323. package/dist/utils/warnings.js +0 -16
  324. package/dist/utils/warnings.js.map +0 -1
  325. package/dist/zero/css-writer.d.ts +0 -45
  326. package/dist/zero/css-writer.js +0 -74
  327. package/dist/zero/css-writer.js.map +0 -1
  328. package/dist/zero/extractor.d.ts +0 -24
  329. package/dist/zero/extractor.js +0 -150
  330. package/dist/zero/extractor.js.map +0 -1
package/docs/styles.md ADDED
@@ -0,0 +1,725 @@
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
+ [`@tenphi/eslint-plugin-tasty`](getting-started.md#eslint-plugin) reports raw CSS properties that have a handler here (`prefer-shorthand-property`) and modifiers a property does not accept (`valid-directional-modifier`, `valid-radius-shape`).
14
+
15
+ ---
16
+
17
+ ## Recommended Props
18
+
19
+ Use these instead of their raw CSS counterparts:
20
+
21
+ | Use | Instead of |
22
+ |-----|------------|
23
+ | `fill` | `backgroundColor`, `background` |
24
+ | `image` | `backgroundImage` |
25
+ | `padding` (with physical direction modifiers) | `paddingTop`, `paddingRight`, `paddingBottom`, `paddingLeft` |
26
+ | `margin` (with physical direction modifiers) | `marginTop`, `marginRight`, `marginBottom`, `marginLeft` |
27
+ | Logical block/inline category styles (with `start`/`end` modifiers) | Native logical axis/edge declarations |
28
+ | `width` / `blockSize` / `inlineSize` (with `min`/`max` modifiers) | Their separate min/max declarations when one state map is sufficient |
29
+ | `height` (with `min`/`max` modifiers) | `minHeight`, `maxHeight` |
30
+ | `border` | `borderColor`, `borderWidth`, `borderStyle` |
31
+ | `radius` | `borderRadius` |
32
+ | `flow` | `flexDirection`, `gridAutoFlow` |
33
+ | `preset` | `fontSize`, `lineHeight`, `letterSpacing`, `fontWeight`, `fontStyle`, `textTransform` |
34
+ | `font` | `fontFamily` |
35
+ | `inset` (with direction modifiers) | `top`, `right`, `bottom`, `left` |
36
+ | `scrollbar` | Raw scrollbar CSS properties |
37
+
38
+ ---
39
+
40
+ ## Layout
41
+
42
+ ### `overscrollBehavior`
43
+
44
+ The native `overscrollBehavior` shorthand and its `overscrollBehaviorBlock`,
45
+ `overscrollBehaviorInline`, `overscrollBehaviorX`, and `overscrollBehaviorY`
46
+ longhands support `auto`, `contain`, `none`, and `chain`. The shorthand can set
47
+ separate X and Y values, for example `overscrollBehavior: 'chain contain'`.
48
+
49
+ `chain` allows scroll chaining to another scrollable area while suppressing
50
+ boundary effects such as bounce. It requires browser support; use a feature
51
+ query and a fallback floor when targeting browsers without it:
52
+
53
+ ```jsx
54
+ overscrollBehaviorBlock: {
55
+ _: 'auto',
56
+ '@supports(overscroll-behavior-block: chain)': 'chain',
57
+ }
58
+ ```
59
+
60
+ ### `display`
61
+
62
+ Standard CSS display values. Handled together with `hide`, `textOverflow`, `overflow`, and `whiteSpace` for priority resolution.
63
+
64
+ | Prop | Values | Notes |
65
+ |------|--------|-------|
66
+ | `display` | Any CSS display value | Overridden by `hide` or multi-line `textOverflow` |
67
+ | `hide` | `true` / `false` | Shortcut for `display: none`. Highest priority |
68
+ | `overflow` | Any CSS overflow value | Overridden when `textOverflow` sets `hidden` |
69
+ | `whiteSpace` | Any CSS white-space value | Explicit value wins over the `nowrap` / `initial` that `textOverflow` sets |
70
+
71
+ ### `textOverflow`
72
+
73
+ Text truncation with optional multi-line clamping.
74
+
75
+ **Syntax:** `[ellipsis|clip]` or `[ellipsis|clip] / [lines]`
76
+
77
+ | Value | Effect |
78
+ |-------|--------|
79
+ | `"ellipsis"` | Single-line truncation with ellipsis, sets `overflow: hidden` and `white-space: nowrap` |
80
+ | `"ellipsis / 3"` | Multi-line clamp (3 lines) with ellipsis, sets `overflow: hidden` and `white-space: initial` |
81
+ | `"clip"` | Single-line truncation without ellipsis, sets `overflow: hidden` and `white-space: nowrap` |
82
+ | `"clip / 2"` | Multi-line clip (2 lines), sets `overflow: hidden` and `white-space: initial` |
83
+ | `"initial"` | Reset text-overflow to initial |
84
+
85
+ Explicit `whiteSpace` overrides the default white-space set by `textOverflow`.
86
+
87
+ ### `flow`
88
+
89
+ Unified direction control for flex and grid layouts.
90
+
91
+ **Syntax:** `[direction] [wrap|dense]`
92
+
93
+ | Layout | CSS output |
94
+ |--------|------------|
95
+ | Flex | `flex-flow` (direction + wrap) |
96
+ | Grid | `grid-auto-flow` (direction + density) |
97
+ | Block | No CSS output (used by `gap` for direction) |
98
+
99
+ ```jsx
100
+ flow="row wrap" // flex: row wrap
101
+ flow="column dense" // grid: column dense
102
+ flow="column" // flex: column; or grid: column
103
+ ```
104
+
105
+ ### `gap`
106
+
107
+ Spacing between child elements. Adapts to layout type.
108
+
109
+ **Syntax:** `[row-gap]` or `[row-gap column-gap]`
110
+
111
+ | Value | Effect |
112
+ |-------|--------|
113
+ | `"2x"` | Gap of `2x` |
114
+ | `"1x 2x"` | Row gap `1x`, column gap `2x` |
115
+ | `true` | Default gap (`1x`) |
116
+ | Number | Converted to `px` |
117
+
118
+ For flex/grid layouts, outputs native `gap`. For block layouts, emulates gap using `margin` on children based on `flow` direction.
119
+
120
+ ### `padding`
121
+
122
+ Element padding with directional modifiers and multi-group support. Use **comma-separated groups** to set a base value and then override specific directions.
123
+
124
+ **Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
125
+
126
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
127
+
128
+ **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.
129
+
130
+ **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.
131
+
132
+ A group that names *no* direction keeps plain CSS shorthand order, which is unambiguous and unchanged.
133
+
134
+ | Value | Effect |
135
+ |-------|--------|
136
+ | `"2x"` | All sides `2x` |
137
+ | `"2x 1x"` | Top/bottom `2x`, left/right `1x` |
138
+ | `"2x top"` | Top `2x`, right/bottom/left `0` |
139
+ | `"1x left right"` | Left and right `1x`, top/bottom `0` |
140
+ | `"2x top, 4x right"` | Top `2x`, right `4x`, bottom/left `0` |
141
+ | `"1x, 2x top"` | All sides `1x`, then top overridden to `2x` |
142
+ | `"1x, 2x top bottom"` | Left/right `1x`, top/bottom `2x` |
143
+ | `"2x longhand"` | All sides `2x`, output as 4 individual `padding-*` properties |
144
+ | `true` | All sides `1x` |
145
+ | Number | Converted to `px` |
146
+
147
+ Later comma-separated groups override earlier groups for conflicting directions.
148
+
149
+ A group with directions but no value (`padding: 'top'`) uses `var(--gap)` rather than the `x` unit, so it ignores `configure({ units })`; with no `$gap` token it resolves to `4px`, not `1x` (`8px`). Write the value: `padding: '1x top'`.
150
+
151
+ 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).
152
+
153
+ ### `margin`
154
+
155
+ Element margin. Same syntax, modifiers, and multi-group support as `padding`.
156
+
157
+ **Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
158
+
159
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
160
+
161
+ **Output modifier:** `longhand` — forces output as individual CSS longhand properties (`margin-top`, etc.) instead of the `margin` shorthand.
162
+
163
+ The [one-value-per-directional-group rule](#padding) from `padding` applies here too.
164
+
165
+ | Value | Effect |
166
+ |-------|--------|
167
+ | `"2x"` | All sides `2x` |
168
+ | `"2x 1x"` | Top/bottom `2x`, left/right `1x` |
169
+ | `"2x top"` | Top `2x`, right/bottom/left `0` |
170
+ | `"2x top, 4x right"` | Top `2x`, right `4x`, bottom/left `0` |
171
+ | `"auto left right, 1x top bottom"` | Left/right `auto`, top/bottom `1x` |
172
+ | `true` | All sides `1x` |
173
+ | Number | Converted to `px` |
174
+
175
+ Later comma-separated groups override earlier groups for conflicting directions.
176
+
177
+ 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).
178
+
179
+ ### `width`
180
+
181
+ Element width with min/max control. One, two, or three values set `min-width`, `width`, and `max-width` together.
182
+
183
+ **Positional syntax:**
184
+
185
+ | Value | min-width | width | max-width |
186
+ |-------|-----------|-------|-----------|
187
+ | `"10x"` | initial | `10x` | initial |
188
+ | `"1x 10x"` | `1x` | auto | `10x` |
189
+ | `"1x 5x 10x"` | `1x` | `5x` | `10x` |
190
+ | `"0 100% 800px"` | `0` | `100%` | `800px` |
191
+ | `"initial 100% 1400px"` | initial | `100%` | `1400px` |
192
+
193
+ **Modifier syntax:**
194
+
195
+ | Value | min-width | width | max-width |
196
+ |-------|-----------|-------|-----------|
197
+ | `"min 2x"` | `2x` | auto | initial |
198
+ | `"max 100%"` | initial | auto | `100%` |
199
+ | `"fixed 200px"` | `200px` | `200px` | `200px` |
200
+
201
+ **Keywords:** `max-content`, `min-content`, `fit-content`
202
+
203
+ | Value | Effect |
204
+ |-------|--------|
205
+ | `true` | Reset to `auto` / `initial` / `initial` |
206
+ | Number | Converted to `px` |
207
+
208
+ Separate `minWidth` and `maxWidth` props are supported and override values from the `width` syntax.
209
+
210
+ ### `height`
211
+
212
+ Element height. Same syntax, modifiers, and positional patterns as `width`.
213
+
214
+ Avoid `stretch` for now on `width` and `height`: `width: 'stretch'` emits a comma-joined fallback list that browsers drop, and `height: 'stretch'` becomes `auto`.
215
+
216
+ Separate `minHeight` and `maxHeight` props are supported and override values from the `height` syntax.
217
+
218
+ ### `inset`
219
+
220
+ Positioning offsets with directional modifiers and multi-group support. Same directional syntax as `padding`.
221
+
222
+ **Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
223
+
224
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
225
+
226
+ The [one-value-per-directional-group rule](#padding) from `padding` applies here too, with `dock`
227
+ as the single exception.
228
+
229
+ **`dock` modifier:** pins the named edge and spans its full length, by also applying the value
230
+ to the two perpendicular sides. `inset: 'bottom dock'` gives `inset: auto 0 0 0` — anchored to
231
+ the bottom, full width. Without a direction, `dock` fills every side.
232
+
233
+ `dock` is the one place a directional group takes **two** values: the first insets the named
234
+ edge, the second the sides it spans. `inset: '2x 4x bottom dock'` pins the bottom at `2x` and
235
+ insets the sides by `4x`. A third value, or a second value without `dock`, is ignored and warns
236
+ in development. With several directions the first value applies to each named edge and the
237
+ second to every side they span.
238
+
239
+ **Output modifier:** `longhand` — forces output as individual CSS properties (`top`, `right`, `bottom`, `left`) instead of the `inset` shorthand.
240
+
241
+ | Value | Effect |
242
+ |-------|--------|
243
+ | `"0"` | All sides `0` |
244
+ | `"2x top"` | Top `2x`, right/bottom/left `auto` |
245
+ | `"1x left right"` | Left and right `1x`, top/bottom `auto` |
246
+ | `"0, 2x top"` | All sides `0`, then top overridden to `2x` |
247
+ | `"0 longhand"` | All sides `0`, output as individual `top`/`right`/`bottom`/`left` |
248
+ | `true` | All sides `0` |
249
+ | `"bottom dock"` | Bottom/left/right `0`, top `auto` — bottom-anchored, full width |
250
+ | `"right dock"` | Right/top/bottom `0`, left `auto` — right-anchored, full height |
251
+ | `"2x bottom dock"` | Bottom/left/right `2x`, top `auto` |
252
+ | `"2x 4x bottom dock"` | Bottom `2x`, left/right `4x`, top `auto` |
253
+ | `"dock"` | All sides `0` |
254
+
255
+ Later comma-separated groups override earlier groups for conflicting directions.
256
+
257
+ 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.
258
+
259
+ ### Logical properties
260
+
261
+ 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`.
262
+
263
+ ```jsx
264
+ styles: {
265
+ direction: 'rtl',
266
+ inlinePadding: '1x start, 2x end',
267
+ inlineBorder: '1bw solid #accent start',
268
+ blockInset: '0 end',
269
+ }
270
+ ```
271
+
272
+ 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.
273
+
274
+ | Category | Block axis | Inline axis |
275
+ |----------|------------|-------------|
276
+ | Size | `blockSize` | `inlineSize` |
277
+ | Padding | `blockPadding` | `inlinePadding` |
278
+ | Margin | `blockMargin` | `inlineMargin` |
279
+ | Inset | `blockInset` | `inlineInset` |
280
+ | Scroll margin | `blockScrollMargin` | `inlineScrollMargin` |
281
+ | Scroll padding | `blockScrollPadding` | `inlineScrollPadding` |
282
+ | Border | `blockBorder` | `inlineBorder` |
283
+
284
+ `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.
285
+
286
+ `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`.
287
+
288
+ 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.
289
+
290
+ The physical `scrollMargin` and `scrollPadding` shorthands support the same values and physical direction modifiers as `padding`. Their logical counterparts stay in separate axis handlers.
291
+
292
+ `writingMode`, `direction`, and `textOrientation` are standard CSS control properties. They use Tasty's normal value parser and need no special handler.
293
+
294
+ 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.
295
+
296
+ ---
297
+
298
+ ## Color & Background
299
+
300
+ ### `fill`
301
+
302
+ Background color with design token support. Preferred over `backgroundColor` and `background`.
303
+
304
+ **Syntax:** `[color]` or `[base-color] [overlay-color]`
305
+
306
+ | Value | Effect |
307
+ |-------|--------|
308
+ | `"#purple"` | Token-based background color |
309
+ | `"#purple.10"` | Token color at 10% opacity |
310
+ | `"#surface #primary.10"` | Background `#surface` with `#primary.10` overlay (two colors enable smooth transitions between both) |
311
+ | `"rgb(255 128 0)"` | CSS color value |
312
+ | `"color-mix(in oklab, #primary 50%, #surface)"` | CSS color function — see [CSS Color Functions](dsl.md#css-color-functions) |
313
+
314
+ 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. Avoid combining a two-color `fill` with `image` or `backgroundImage` on the same element: both set `background-image` from separate rules, so which one shows depends on rule order.
315
+
316
+ **Related deprecated props:** `backgroundColor` (use `fill`), `background` (overrides all background props when set — avoid).
317
+
318
+ ### `image`
319
+
320
+ Background image. Preferred over `backgroundImage`.
321
+
322
+ **Syntax:** Any CSS background-image value (parsed for token support).
323
+
324
+ ```jsx
325
+ image="url(/path/to/image.png)"
326
+ image="linear-gradient(to right, #purple, #danger)"
327
+ ```
328
+
329
+ Other background props (`backgroundPosition`, `backgroundSize`, `backgroundRepeat`, `backgroundAttachment`, `backgroundOrigin`, `backgroundClip`) are supported as separate props with standard Tasty value parsing.
330
+
331
+ ### `color`
332
+
333
+ Text color with design token support.
334
+
335
+ **Syntax:** Color token, CSS color, `true`, or fallback syntax
336
+
337
+ | Value | Effect |
338
+ |-------|--------|
339
+ | `"#purple"` | Token-based text color |
340
+ | `"#purple.5"` | Token at 50% opacity |
341
+ | `"#current"` | Current inherited color |
342
+ | `"#current.5"` | Current inherited color at 50% opacity |
343
+ | `"(#primary, #secondary)"` | Fallback: use `#primary`, fall back to `#secondary` |
344
+ | `"light-dark(#dark, #light)"` | CSS color function — see [CSS Color Functions](dsl.md#css-color-functions) |
345
+ | `true` | `currentColor` |
346
+
347
+ Also sets `$current-color` to the same color, for anything that needs the
348
+ inherited color as a color rather than as the `currentcolor` keyword. Every color
349
+ publishes it, not just a named token, so a reader below always takes the nearest
350
+ `color` rather than the nearest *token* color. A value that already reads the
351
+ inherited color — `#current` itself, a `#current` fade, a bare `currentColor` —
352
+ is not republished: resolving it a second time one level down would fade it
353
+ twice, and the variable into itself is a self-reference. `#current` does not go
354
+ through it; it is the keyword.
355
+
356
+ ### `svgFill`
357
+
358
+ SVG fill color. Same color token syntax as `fill` and `color`. Outputs the native CSS `fill` property.
359
+
360
+ ```jsx
361
+ svgFill="#purple.10"
362
+ svgFill="#current"
363
+ ```
364
+
365
+ ---
366
+
367
+ ## Border & Outline
368
+
369
+ ### `border`
370
+
371
+ 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.
372
+
373
+ **Syntax:** `[width] [style] [color] [directions...]` — comma-separated for multiple groups
374
+
375
+ **Defaults:** width = `1bw`, style = `solid`, color = `#border`, which is the text color (`currentColor`) until your tokens define `#border`
376
+
377
+ **Styles:** `none`, `hidden`, `dotted`, `dashed`, `solid`, `double`, `groove`, `ridge`, `inset`, `outset`
378
+
379
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
380
+
381
+ **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.
382
+
383
+ | Value | Effect |
384
+ |-------|--------|
385
+ | `true` | Default border (`1bw solid #border`) on all sides |
386
+ | `"2bw dashed #purple"` | All sides: 2bw dashed purple |
387
+ | `"2bw top"` | Top only: 2bw solid `#border`, others: 0 |
388
+ | `"dotted #danger left right"` | Left/right: 1bw dotted `#danger`, others: 0 |
389
+ | `"1bw longhand"` | All sides: 1bw solid `#border`, output as 4 individual `border-*` properties |
390
+ | `"1bw #red, 2bw #blue top"` | All sides: 1bw solid `#red`, top overridden to 2bw solid `#blue` |
391
+ | `"1bw, dashed top bottom, #purple left right"` | Base: 1bw solid `#border`, top/bottom: 1bw dashed `#border`, left/right: 1bw solid `#purple` |
392
+
393
+ Later comma-separated groups override earlier groups for conflicting directions.
394
+
395
+ A directional group without a width (`'dotted left'`) uses `var(--border-width)` rather than the `bw` unit, so it ignores `configure({ units })`; `border: true` uses the unit. Both default to `1px`.
396
+
397
+ ### `radius`
398
+
399
+ Border radius with shape presets and directional modifiers.
400
+
401
+ **Syntax:** `[value] [modifiers...]` | `[shape]` | `true`
402
+
403
+ **Shapes:**
404
+
405
+ | Shape | Effect |
406
+ |-------|--------|
407
+ | `"round"` | Fully rounded (`9999rem`) |
408
+ | `"ellipse"` | Circular (`50%`) |
409
+ | `"leaf"` | Asymmetric: sharp, round, sharp, round |
410
+ | `"backleaf"` | Asymmetric: round, sharp, round, sharp |
411
+ | `"inherit"` | Inherit border-radius from parent |
412
+
413
+ **Edge modifiers:** `top`, `right`, `bottom`, `left` — rounds the *pair* of corners along that edge.
414
+
415
+ **Corner modifiers:** `top-left`, `top-right`, `bottom-right`, `bottom-left` — rounds a single corner.
416
+ Use these when an edge modifier would round one corner too many. Edge and corner modifiers combine
417
+ (`radius: 'top bottom-right'`).
418
+
419
+ **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'`.
420
+
421
+ | Value | Effect |
422
+ |-------|--------|
423
+ | `"2r"` | All corners `2r` |
424
+ | `true` | All corners `1r` |
425
+ | `"round"` | All corners `9999rem` (pill shape) |
426
+ | `"1r top"` | Top-left and top-right `1r`, bottom-left and bottom-right `0` |
427
+ | `"leaf"` | Alternating sharp/round corners (top-left `0`, top-right `1r`, bottom-right `0`, bottom-left `1r`) |
428
+ | `"backleaf"` | Inverse leaf (top-left `1r`, top-right `0`, bottom-right `1r`, bottom-left `0`) |
429
+ | `"1r longhand"` | All corners `1r`, output as 4 individual `border-*-radius` properties |
430
+ | `"inherit"` | All corners inherit from parent (`border-radius: inherit`) |
431
+ | `"inherit right"` | Right corners inherit from parent (uses longhand properties) |
432
+ | `"top-right"` | Top-right corner `1r`, every other corner `0` |
433
+ | `"4px top-left"` | Top-left corner `4px`, every other corner `0` |
434
+ | `"top bottom-right"` | Both top corners and bottom-right `1r`, bottom-left `0` |
435
+
436
+ A value-less corner group (`'top-right'`, `'top bottom-right'`) uses `var(--radius)` rather than the `r` unit, so it ignores `configure({ units })`; `radius: true` uses the unit. Both default to `6px`. Write the value (`'1r top-right'`) when you change the `r` unit.
437
+
438
+ ### `outline`
439
+
440
+ Outline with inline offset support.
441
+
442
+ **Syntax:** `[width] [style] [color] / [offset]`
443
+
444
+ **Defaults:** width = `1ow`, style = `solid`, color = `#outline`, which is the text color (`currentColor`) until your tokens define `#outline`
445
+
446
+ **Styles:** Same as `border` (`none`, `dotted`, `dashed`, `solid`, etc.)
447
+
448
+ | Value | Effect |
449
+ |-------|--------|
450
+ | `true` | Default outline (`1ow solid #outline`) |
451
+ | `"2ow dashed #purple"` | 2ow dashed `#purple` outline |
452
+ | `"2ow #danger / 1x"` | 2ow solid `#danger` outline with 1x offset |
453
+ | `"2ow / 1x"` | 2ow solid `#outline` with 1x offset |
454
+ | `0` | No outline |
455
+
456
+ The `/` separator separates outline from offset. A separate `outlineOffset` prop is also supported but the slash syntax takes precedence.
457
+
458
+ ### `shadow`
459
+
460
+ Box shadow. Supports multiple shadows comma-separated.
461
+
462
+ **Syntax:** `[inset] [x] [y] [blur] [spread] [color]`
463
+
464
+ | Value | Effect |
465
+ |-------|--------|
466
+ | `true` | Default shadow (uses `var(--shadow)` — define a `$shadow` token in your design system) |
467
+ | `"1x .5x .5x #dark.50"` | Custom shadow with Tasty units/colors |
468
+ | `"0 1x 2x #dark.20"` | Standard shadow |
469
+ | `"inset 0 1x 2x #dark.10"` | Inset shadow |
470
+
471
+ Multiple shadows: `shadow="1x 1x 2x #dark.20, inset 0 0 4x #dark.10"`
472
+
473
+ ---
474
+
475
+ ## Typography
476
+
477
+ ### `preset`
478
+
479
+ Typography preset that sets font-size, line-height, letter-spacing, font-weight, font-style, text-transform, and font-family (unless `font` or `fontFamily` is set) from named design tokens. It also sets the `--bold-font-weight` and `--icon-size` variables that `strong` and `icon` read.
480
+
481
+ **Syntax:** `name`, `name / modifier...`, or `modifier...` (shorthand)
482
+
483
+ Preset names are project-specific (e.g. `h1`–`h6`, `t1`–`t4`, `p1`–`p4`). Register them for autocomplete by augmenting `TastyPresetNames`.
484
+
485
+ 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.
486
+
487
+ **Modifiers:**
488
+
489
+ | Modifier | Effect |
490
+ |----------|--------|
491
+ | `strong` (or `bold`) | Sets `font-weight` to bold (from `$bold-font-weight` token, `700` until your tokens define it) |
492
+ | `italic` | Sets `font-style: italic` |
493
+ | `icon` | Sets font-size and line-height to icon size |
494
+ | `tight` | Sets line-height equal to font-size |
495
+ | `normal` | Sets `line-height: normal` |
496
+
497
+ ```jsx
498
+ preset="h1" // heading 1
499
+ preset="h2 / strong" // bold heading 2
500
+ preset="h2 / strong italic" // bold + italic heading 2
501
+ preset="t3 / italic" // italic text 3
502
+ preset="t2 / strong tight" // bold text 2 with tight line-height
503
+ preset="bold" // inherit preset with bold (shorthand)
504
+ preset="bold italic" // inherit preset with bold + italic (shorthand)
505
+ ```
506
+
507
+ Individual typography props (`fontSize`, `lineHeight`, `letterSpacing`, `fontWeight`, `fontStyle`, `textTransform`) can be used alongside `preset` to override specific values, but using `preset` alone is recommended.
508
+
509
+ ### `font`
510
+
511
+ Font family with design-system fallback. Preferred over `fontFamily`.
512
+
513
+ | Value | Effect |
514
+ |-------|--------|
515
+ | `"monospace"` | Monospace stack from `$font-mono`, falling back to the built-in `$font-mono-fallback` |
516
+ | `true` | Default sans stack from `$font-sans`, falling back to `$font-sans-fallback` |
517
+ | `"CustomFont"` | Custom font followed by the `$font-sans` stack |
518
+
519
+ `fontFamily` is supported as a direct pass-through without fallback logic.
520
+
521
+ ---
522
+
523
+ ## Alignment
524
+
525
+ 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.
526
+
527
+ ### `align`
528
+
529
+ Shorthand that sets both `align-items` and `align-content` to the same value.
530
+
531
+ ```jsx
532
+ align="center"
533
+ align="flex-start"
534
+ align="space-between"
535
+ ```
536
+
537
+ ### `justify`
538
+
539
+ Shorthand that sets both `justify-items` and `justify-content` to the same value.
540
+
541
+ ```jsx
542
+ justify="center"
543
+ justify="space-between"
544
+ justify="flex-end"
545
+ ```
546
+
547
+ ### `place`
548
+
549
+ Shorthand that sets both `place-items` and `place-content` to the same value.
550
+
551
+ ```jsx
552
+ place="center"
553
+ place="stretch"
554
+ ```
555
+
556
+ Individual props `placeContent` and `placeItems` are also available for separate control.
557
+
558
+ ---
559
+
560
+ ## Animation & Transition
561
+
562
+ ### `transition`
563
+
564
+ Semantic transition names that expand to groups of CSS properties.
565
+
566
+ **Syntax:** `[name] [timing] [easing] [delay]` or `[name] [easing] [delay]` — comma-separated for multiple transitions.
567
+
568
+ When easing is provided without a duration, the default timing variable is used automatically.
569
+
570
+ **Semantic names:**
571
+
572
+ | Name | CSS properties |
573
+ |------|---------------|
574
+ | `fill` | `background-color`, `background-image`, `--tasty-second-fill-color` |
575
+ | `color` | `color` |
576
+ | `theme` | `color`, `background-color`, `background-image`, `box-shadow`, `border`, `border-radius`, `outline`, `opacity`, `--tasty-second-fill-color` |
577
+ | `border` | `border`, `border-top`, `border-right`, `border-bottom`, `border-left` |
578
+ | `radius` | `border-radius` |
579
+ | `shadow` | `box-shadow` |
580
+ | `outline` | `outline`, `outline-offset` |
581
+ | `preset` | `font-size`, `line-height`, `letter-spacing`, `font-weight`, `font-style` |
582
+ | `text` | `font-weight`, `text-decoration-color` |
583
+ | `fade` | `mask`, `mask-composite` |
584
+ | `opacity` | `opacity` |
585
+ | `translate` | `transform`, `translate` |
586
+ | `rotate` | `transform`, `rotate` |
587
+ | `scale` | `transform`, `scale` |
588
+ | `filter` | `filter`, `backdrop-filter` |
589
+ | `image` / `background` | All background-related properties |
590
+ | `width` | `width`, `min-width`, `max-width` |
591
+ | `height` | `height`, `min-height`, `max-height` |
592
+ | `gap` | `gap`, `margin` |
593
+ | `inset` | `inset`, `top`, `right`, `bottom`, `left` |
594
+
595
+ Any other name passes through as a CSS property. Write `z-index` in its CSS form: `transition: 'z-index'` works, while `zIndex` is currently lowercased to the invalid `zindex`.
596
+
597
+ 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.
598
+
599
+ Default timing: `$transition` (or `${name}-transition` with `$transition` fallback per semantic name). `$transition` is `80ms` until your tokens define it. Prefer omitting the duration or using a duration token instead of repeating raw time values across components. Explicit zero can disable motion.
600
+
601
+ ```jsx
602
+ transition="theme"
603
+ transition="fill, radius"
604
+ transition="fade $transition ease-in"
605
+ transition="fill ease-in" // easing without duration (uses default timing)
606
+ transition="radius ease-in-out" // easing keyword only
607
+ transition="$$custom-prop" // custom property transition
608
+ ```
609
+
610
+ **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.
611
+
612
+ If the name is not a semantic name, it is used as a literal CSS property name.
613
+
614
+ ---
615
+
616
+ ### `animation`
617
+
618
+ `animation` is the native CSS shorthand. Tasty parses tokens in its value and
619
+ tracks local `@keyframes` names referenced by it, so it needs no custom style
620
+ handler. Define a complete animation with the shorthand, using a configured
621
+ duration token where appropriate (for example,
622
+ `animation: 'pulse $animation-duration ease-in infinite'`).
623
+
624
+ Use `animationDuration`, `animationTimeline`, `animationRange`, and other CSS
625
+ longhands when changing just one part of an existing animation in a state or
626
+ component extension. Setting `animation` resets omitted parts, including its
627
+ timeline and range. The same principle applies to `transitionDuration` and
628
+ other transition longhands when a base `transition` is already defined.
629
+ `transitionBehavior` remains a separate CSS longhand; Tasty's semantic
630
+ `transition` syntax covers name, timing, easing, and delay.
631
+
632
+ ---
633
+
634
+ ## Scrollbar & Overflow
635
+
636
+ ### `scrollbar`
637
+
638
+ Scrollbar styling using CSS standard properties (`scrollbar-width`, `scrollbar-color`, `scrollbar-gutter`).
639
+
640
+ **Syntax:** `[width] [modifiers...] [thumb-color] [track-color]`
641
+
642
+ **Width values** (controls `scrollbar-width`, default is `thin`):
643
+
644
+ | Value | Effect |
645
+ |-------|--------|
646
+ | `thin` | Thin scrollbar (default) |
647
+ | `auto` | Browser-default scrollbar width |
648
+ | `none` | Hide scrollbar (still scrollable, no colors applied) |
649
+
650
+ **Modifiers** (controls gutter and overflow behavior):
651
+
652
+ | Modifier | Effect |
653
+ |----------|--------|
654
+ | `stable` | Reserve space for scrollbar (`scrollbar-gutter: stable`) |
655
+ | `both-edges` | Reserve space on both sides (`scrollbar-gutter: stable both-edges`) |
656
+ | `always` | Force scrollbars visible (`overflow: scroll` + `scrollbar-gutter: stable`) |
657
+
658
+ **Colors:** Up to 2 color values for thumb and track (optional), applied via `scrollbar-color`.
659
+
660
+ **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.
661
+
662
+ **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.
663
+
664
+ | Value | Effect |
665
+ |-------|--------|
666
+ | `true` | Thin scrollbar with default thumb/track colors |
667
+ | `"none"` | Hidden scrollbar (still scrollable) |
668
+ | `"thin #purple.40 #dark.04"` | Thin scrollbar with custom colors |
669
+ | `"auto #red #blue"` | Browser-default width with custom colors |
670
+ | `"always #primary.50 #white.02"` | Always visible with custom colors |
671
+ | `"thin stable #red #blue"` | Thin, gutter reserved, custom colors |
672
+
673
+ ### `fade`
674
+
675
+ Gradient-based edge fading using CSS masks. Use **comma-separated groups** to set different widths and colors per direction.
676
+
677
+ **Syntax:** `[width] [direction...] [#from-color] [#to-color]` — comma-separated for multiple groups
678
+
679
+ **Direction modifiers:** `top`, `right`, `bottom`, `left`
680
+
681
+ A group that names edges takes a **single** width, applied to every edge it names — different
682
+ widths per edge come from comma groups. A group that names no edge covers all four and keeps
683
+ plain CSS shorthand order, like `padding`. See the [`padding` rule](#padding).
684
+
685
+ | Value | Effect |
686
+ |-------|--------|
687
+ | `"top"` | Fade top edge, default width `calc(2 * var(--gap))` (`8px` unless `$gap` is set), all other edges unfaded |
688
+ | `"2x left right"` | Fade left and right edges with `2x` width, top/bottom unfaded |
689
+ | `"3x 1x"` | All edges faded — top/bottom `3x`, left/right `1x` (CSS shorthand order) |
690
+ | `"3x top, 1x bottom"` | Fade top with `3x` width, bottom with `1x` width |
691
+ | `"2x #clear #dark"` | All edges faded with `2x` width, from `#clear` to `#dark` |
692
+ | `"top #a #b, bottom #c #d"` | Top fades from `#a` to `#b`, bottom fades from `#c` to `#d` |
693
+
694
+ Colors are optional: first = transparent mask start, second = opaque mask end.
695
+
696
+ ---
697
+
698
+ ## Grid Aliases
699
+
700
+ ### `gridColumns`
701
+
702
+ Alias for `grid-template-columns`.
703
+
704
+ | Value | Effect |
705
+ |-------|--------|
706
+ | `"1fr 2fr 1fr"` | Three columns with ratios |
707
+ | `3` (number) | Three equal `minmax(1px, 1fr)` columns |
708
+ | `"repeat(auto-fit, minmax(200px, 1fr))"` | Responsive columns |
709
+
710
+ ### `gridRows`
711
+
712
+ Alias for `grid-template-rows`.
713
+
714
+ | Value | Effect |
715
+ |-------|--------|
716
+ | `"auto 1fr auto"` | Header, content, footer |
717
+ | `4` (number) | Four equal `auto` rows |
718
+
719
+ ### `gridAreas`
720
+
721
+ Alias for `grid-template-areas`. Pass-through string value.
722
+
723
+ ### `gridTemplate`
724
+
725
+ Alias for `grid-template`. Slash-separated rows/columns with number conversion.