@tenphi/tasty 0.0.0-snapshot.db103fd → 0.0.0-snapshot.dbd425f
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.
- package/README.md +441 -362
- package/dist/babel-types-BKDTT4--.d.ts +18 -0
- package/dist/chunks/async-storage-f9j9JRtq.js +37 -0
- package/dist/chunks/async-storage-f9j9JRtq.js.map +1 -0
- package/dist/chunks/build-config-5d8WlQbq.js +60 -0
- package/dist/chunks/build-config-5d8WlQbq.js.map +1 -0
- package/dist/chunks/collector-CjCak4iE.js +210 -0
- package/dist/chunks/collector-CjCak4iE.js.map +1 -0
- package/dist/chunks/config-engine-uOFYZidB.js +272 -0
- package/dist/chunks/config-engine-uOFYZidB.js.map +1 -0
- package/dist/chunks/config-file-DlZXJMj8.js +25 -0
- package/dist/chunks/config-file-DlZXJMj8.js.map +1 -0
- package/dist/chunks/css-definitions-ubrHP97m.js +910 -0
- package/dist/chunks/css-definitions-ubrHP97m.js.map +1 -0
- package/dist/chunks/css-resources-P7IBUUZs.js +142 -0
- package/dist/chunks/css-resources-P7IBUUZs.js.map +1 -0
- package/dist/{debug.js → chunks/debug-CJ31U_WE.js} +196 -147
- package/dist/chunks/debug-CJ31U_WE.js.map +1 -0
- package/dist/chunks/dsl-DYSJc1-T.js +1383 -0
- package/dist/chunks/dsl-DYSJc1-T.js.map +1 -0
- package/dist/chunks/hydration-TRcz5vnk.js +41 -0
- package/dist/chunks/hydration-TRcz5vnk.js.map +1 -0
- package/dist/chunks/react-runtime-CyyCI02N.js +689 -0
- package/dist/chunks/react-runtime-CyyCI02N.js.map +1 -0
- package/dist/chunks/runtime-engine-BQmOu5-W.js +2432 -0
- package/dist/chunks/runtime-engine-BQmOu5-W.js.map +1 -0
- package/dist/chunks/runtime-state-DEsyUMU-.js +152 -0
- package/dist/chunks/runtime-state-DEsyUMU-.js.map +1 -0
- package/dist/{utils/merge-styles.js → chunks/shared-utils-y-HjvPN4.js} +60 -56
- package/dist/chunks/shared-utils-y-HjvPN4.js.map +1 -0
- package/dist/chunks/style-engine-BX2LshDZ.js +5466 -0
- package/dist/chunks/style-engine-BX2LshDZ.js.map +1 -0
- package/dist/chunks/zero-engine-Dw0P4yGM.js +310 -0
- package/dist/chunks/zero-engine-Dw0P4yGM.js.map +1 -0
- package/dist/collector-CTU-nl0g.d.ts +164 -0
- package/dist/config-CcxqSZI2.d.ts +1368 -0
- package/dist/core/index.d.ts +5 -33
- package/dist/core/index.js +9 -26
- package/dist/hydrate-CRyjjAyl.d.ts +22 -0
- package/dist/index--GdqCPlp.d.ts +1962 -0
- package/dist/index.d.ts +5 -50
- package/dist/index.js +11 -35
- package/dist/{utils/merge-styles.d.ts → merge-styles-DSkVc6CD.d.ts} +3 -4
- package/dist/ssr/astro-client.d.ts +1 -0
- package/dist/ssr/astro-client.js +6 -0
- package/dist/ssr/astro-client.js.map +1 -0
- package/dist/ssr/astro-middleware-extract-static.d.ts +10 -0
- package/dist/ssr/astro-middleware-extract-static.js +9 -0
- package/dist/ssr/astro-middleware-extract-static.js.map +1 -0
- package/dist/ssr/astro-middleware-extract.d.ts +10 -0
- package/dist/ssr/astro-middleware-extract.js +9 -0
- package/dist/ssr/astro-middleware-extract.js.map +1 -0
- package/dist/ssr/astro-middleware-static.d.ts +17 -0
- package/dist/ssr/astro-middleware-static.js +7 -0
- package/dist/ssr/astro-middleware-static.js.map +1 -0
- package/dist/ssr/astro-middleware.d.ts +18 -0
- package/dist/ssr/astro-middleware.js +7 -0
- package/dist/ssr/astro-middleware.js.map +1 -0
- package/dist/ssr/astro.d.ts +110 -12
- package/dist/ssr/astro.js +205 -48
- package/dist/ssr/astro.js.map +1 -1
- package/dist/ssr/client.d.ts +2 -0
- package/dist/ssr/client.js +2 -0
- package/dist/ssr/index.d.ts +17 -5
- package/dist/ssr/index.js +6 -7
- package/dist/ssr/index.js.map +1 -1
- package/dist/ssr/next-config.d.ts +64 -0
- package/dist/ssr/next-config.js +123 -0
- package/dist/ssr/next-config.js.map +1 -0
- package/dist/ssr/next.d.ts +13 -12
- package/dist/ssr/next.js +38 -47
- package/dist/ssr/next.js.map +1 -1
- package/dist/static/index.d.ts +90 -5
- package/dist/static/index.js +31 -3
- package/dist/static/index.js.map +1 -0
- package/dist/static/inject.d.ts +1 -2
- package/dist/static/inject.js.map +1 -1
- package/dist/types-DJEM_BOJ.d.ts +1567 -0
- package/dist/zero/babel.d.ts +5 -120
- package/dist/zero/babel.js +123 -146
- package/dist/zero/babel.js.map +1 -1
- package/dist/zero/index.d.ts +135 -3
- package/dist/zero/index.js +24 -3
- package/dist/zero/index.js.map +1 -0
- package/dist/zero/next.d.ts +4 -5
- package/dist/zero/next.js +3 -38
- package/dist/zero/next.js.map +1 -1
- package/docs/README.md +23 -12
- package/docs/adoption.md +72 -37
- package/docs/ai-agents.md +255 -0
- package/docs/comparison.md +83 -54
- package/docs/configuration.md +710 -81
- package/docs/debug.md +39 -24
- package/docs/design-system.md +174 -41
- package/docs/dsl.md +653 -195
- package/docs/getting-started.md +132 -52
- package/docs/injector.md +197 -90
- package/docs/methodology.md +154 -48
- package/docs/migration-v3.md +285 -0
- package/docs/pipeline.md +768 -0
- package/docs/plugins.md +333 -0
- package/docs/react-api.md +742 -0
- package/docs/runtime-benchmarks.md +388 -0
- package/docs/ssr.md +403 -151
- package/docs/styles.md +196 -47
- package/docs/tasty-static.md +284 -118
- package/package.json +148 -35
- package/tasty.config.ts +6 -0
- package/dist/_virtual/_rolldown/runtime.js +0 -7
- package/dist/chunks/cacheKey.d.ts +0 -1
- package/dist/chunks/cacheKey.js +0 -77
- package/dist/chunks/cacheKey.js.map +0 -1
- package/dist/chunks/definitions.d.ts +0 -37
- package/dist/chunks/definitions.js +0 -258
- package/dist/chunks/definitions.js.map +0 -1
- package/dist/chunks/index.d.ts +0 -1
- package/dist/chunks/renderChunk.d.ts +0 -1
- package/dist/chunks/renderChunk.js +0 -59
- package/dist/chunks/renderChunk.js.map +0 -1
- package/dist/config.d.ts +0 -366
- package/dist/config.js +0 -503
- package/dist/config.js.map +0 -1
- package/dist/counter-style/index.js +0 -51
- package/dist/counter-style/index.js.map +0 -1
- package/dist/debug.d.ts +0 -89
- package/dist/debug.js.map +0 -1
- package/dist/font-face/index.js +0 -63
- package/dist/font-face/index.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -7
- package/dist/hooks/resolve-ssr-collector.js +0 -14
- package/dist/hooks/resolve-ssr-collector.js.map +0 -1
- package/dist/hooks/useCounterStyle.d.ts +0 -50
- package/dist/hooks/useCounterStyle.js +0 -46
- package/dist/hooks/useCounterStyle.js.map +0 -1
- package/dist/hooks/useFontFace.d.ts +0 -43
- package/dist/hooks/useFontFace.js +0 -70
- package/dist/hooks/useFontFace.js.map +0 -1
- package/dist/hooks/useGlobalStyles.d.ts +0 -30
- package/dist/hooks/useGlobalStyles.js +0 -78
- package/dist/hooks/useGlobalStyles.js.map +0 -1
- package/dist/hooks/useKeyframes.d.ts +0 -56
- package/dist/hooks/useKeyframes.js +0 -64
- package/dist/hooks/useKeyframes.js.map +0 -1
- package/dist/hooks/useProperty.d.ts +0 -79
- package/dist/hooks/useProperty.js +0 -109
- package/dist/hooks/useProperty.js.map +0 -1
- package/dist/hooks/useRawCSS.d.ts +0 -53
- package/dist/hooks/useRawCSS.js +0 -35
- package/dist/hooks/useRawCSS.js.map +0 -1
- package/dist/hooks/useStyles.d.ts +0 -45
- package/dist/hooks/useStyles.js +0 -237
- package/dist/hooks/useStyles.js.map +0 -1
- package/dist/injector/index.d.ts +0 -183
- package/dist/injector/index.js +0 -179
- package/dist/injector/index.js.map +0 -1
- package/dist/injector/injector.d.ts +0 -166
- package/dist/injector/injector.js +0 -464
- package/dist/injector/injector.js.map +0 -1
- package/dist/injector/sheet-manager.d.ts +0 -136
- package/dist/injector/sheet-manager.js +0 -733
- package/dist/injector/sheet-manager.js.map +0 -1
- package/dist/injector/types.d.ts +0 -204
- package/dist/keyframes/index.js +0 -206
- package/dist/keyframes/index.js.map +0 -1
- package/dist/parser/classify.js +0 -319
- package/dist/parser/classify.js.map +0 -1
- package/dist/parser/const.js +0 -49
- package/dist/parser/const.js.map +0 -1
- package/dist/parser/lru.js +0 -109
- package/dist/parser/lru.js.map +0 -1
- package/dist/parser/parser.d.ts +0 -25
- package/dist/parser/parser.js +0 -115
- package/dist/parser/parser.js.map +0 -1
- package/dist/parser/tokenizer.js +0 -69
- package/dist/parser/tokenizer.js.map +0 -1
- package/dist/parser/types.d.ts +0 -51
- package/dist/parser/types.js +0 -46
- package/dist/parser/types.js.map +0 -1
- package/dist/pipeline/conditions.d.ts +0 -134
- package/dist/pipeline/conditions.js +0 -406
- package/dist/pipeline/conditions.js.map +0 -1
- package/dist/pipeline/exclusive.js +0 -230
- package/dist/pipeline/exclusive.js.map +0 -1
- package/dist/pipeline/index.d.ts +0 -55
- package/dist/pipeline/index.js +0 -708
- package/dist/pipeline/index.js.map +0 -1
- package/dist/pipeline/materialize.js +0 -1103
- package/dist/pipeline/materialize.js.map +0 -1
- package/dist/pipeline/parseStateKey.d.ts +0 -15
- package/dist/pipeline/parseStateKey.js +0 -446
- package/dist/pipeline/parseStateKey.js.map +0 -1
- package/dist/pipeline/simplify.js +0 -515
- package/dist/pipeline/simplify.js.map +0 -1
- package/dist/pipeline/warnings.js +0 -18
- package/dist/pipeline/warnings.js.map +0 -1
- package/dist/plugins/index.d.ts +0 -2
- package/dist/plugins/okhsl-plugin.d.ts +0 -35
- package/dist/plugins/okhsl-plugin.js +0 -97
- package/dist/plugins/okhsl-plugin.js.map +0 -1
- package/dist/plugins/types.d.ts +0 -76
- package/dist/properties/index.js +0 -222
- package/dist/properties/index.js.map +0 -1
- package/dist/properties/property-type-resolver.d.ts +0 -24
- package/dist/properties/property-type-resolver.js +0 -90
- package/dist/properties/property-type-resolver.js.map +0 -1
- package/dist/ssr/async-storage.d.ts +0 -17
- package/dist/ssr/async-storage.js +0 -34
- package/dist/ssr/async-storage.js.map +0 -1
- package/dist/ssr/collect-auto-properties.js +0 -39
- package/dist/ssr/collect-auto-properties.js.map +0 -1
- package/dist/ssr/collector.d.ts +0 -102
- package/dist/ssr/collector.js +0 -226
- package/dist/ssr/collector.js.map +0 -1
- package/dist/ssr/context.d.ts +0 -8
- package/dist/ssr/context.js +0 -13
- package/dist/ssr/context.js.map +0 -1
- package/dist/ssr/format-global-rules.js +0 -22
- package/dist/ssr/format-global-rules.js.map +0 -1
- package/dist/ssr/format-keyframes.js +0 -69
- package/dist/ssr/format-keyframes.js.map +0 -1
- package/dist/ssr/format-property.js +0 -49
- package/dist/ssr/format-property.js.map +0 -1
- package/dist/ssr/format-rules.js +0 -73
- package/dist/ssr/format-rules.js.map +0 -1
- package/dist/ssr/hydrate.d.ts +0 -22
- package/dist/ssr/hydrate.js +0 -49
- package/dist/ssr/hydrate.js.map +0 -1
- package/dist/ssr/ssr-collector-ref.js +0 -12
- package/dist/ssr/ssr-collector-ref.js.map +0 -1
- package/dist/states/index.d.ts +0 -49
- package/dist/states/index.js +0 -170
- package/dist/states/index.js.map +0 -1
- package/dist/static/tastyStatic.d.ts +0 -46
- package/dist/static/tastyStatic.js +0 -30
- package/dist/static/tastyStatic.js.map +0 -1
- package/dist/static/types.d.ts +0 -49
- package/dist/static/types.js +0 -24
- package/dist/static/types.js.map +0 -1
- package/dist/styles/align.d.ts +0 -15
- package/dist/styles/align.js +0 -14
- package/dist/styles/align.js.map +0 -1
- package/dist/styles/border.d.ts +0 -25
- package/dist/styles/border.js +0 -113
- package/dist/styles/border.js.map +0 -1
- package/dist/styles/color.d.ts +0 -14
- package/dist/styles/color.js +0 -26
- package/dist/styles/color.js.map +0 -1
- package/dist/styles/createStyle.js +0 -79
- package/dist/styles/createStyle.js.map +0 -1
- package/dist/styles/dimension.js +0 -96
- package/dist/styles/dimension.js.map +0 -1
- package/dist/styles/display.d.ts +0 -37
- package/dist/styles/display.js +0 -66
- package/dist/styles/display.js.map +0 -1
- package/dist/styles/fade.d.ts +0 -15
- package/dist/styles/fade.js +0 -57
- package/dist/styles/fade.js.map +0 -1
- package/dist/styles/fill.d.ts +0 -42
- package/dist/styles/fill.js +0 -51
- package/dist/styles/fill.js.map +0 -1
- package/dist/styles/flow.d.ts +0 -16
- package/dist/styles/flow.js +0 -12
- package/dist/styles/flow.js.map +0 -1
- package/dist/styles/gap.d.ts +0 -31
- package/dist/styles/gap.js +0 -36
- package/dist/styles/gap.js.map +0 -1
- package/dist/styles/height.d.ts +0 -17
- package/dist/styles/height.js +0 -19
- package/dist/styles/height.js.map +0 -1
- package/dist/styles/index.d.ts +0 -1
- package/dist/styles/index.js +0 -8
- package/dist/styles/index.js.map +0 -1
- package/dist/styles/inset.d.ts +0 -52
- package/dist/styles/inset.js +0 -149
- package/dist/styles/inset.js.map +0 -1
- package/dist/styles/justify.d.ts +0 -15
- package/dist/styles/justify.js +0 -14
- package/dist/styles/justify.js.map +0 -1
- package/dist/styles/list.d.ts +0 -16
- package/dist/styles/list.js +0 -98
- package/dist/styles/list.js.map +0 -1
- package/dist/styles/margin.d.ts +0 -24
- package/dist/styles/margin.js +0 -103
- package/dist/styles/margin.js.map +0 -1
- package/dist/styles/outline.d.ts +0 -29
- package/dist/styles/outline.js +0 -64
- package/dist/styles/outline.js.map +0 -1
- package/dist/styles/padding.d.ts +0 -24
- package/dist/styles/padding.js +0 -103
- package/dist/styles/padding.js.map +0 -1
- package/dist/styles/predefined.d.ts +0 -71
- package/dist/styles/predefined.js +0 -237
- package/dist/styles/predefined.js.map +0 -1
- package/dist/styles/preset.d.ts +0 -52
- package/dist/styles/preset.js +0 -126
- package/dist/styles/preset.js.map +0 -1
- package/dist/styles/radius.d.ts +0 -12
- package/dist/styles/radius.js +0 -71
- package/dist/styles/radius.js.map +0 -1
- package/dist/styles/scrollbar.d.ts +0 -25
- package/dist/styles/scrollbar.js +0 -46
- package/dist/styles/scrollbar.js.map +0 -1
- package/dist/styles/shadow.d.ts +0 -14
- package/dist/styles/shadow.js +0 -23
- package/dist/styles/shadow.js.map +0 -1
- package/dist/styles/transition.d.ts +0 -14
- package/dist/styles/transition.js +0 -157
- package/dist/styles/transition.js.map +0 -1
- package/dist/styles/types.d.ts +0 -549
- package/dist/styles/width.d.ts +0 -17
- package/dist/styles/width.js +0 -19
- package/dist/styles/width.js.map +0 -1
- package/dist/tasty.d.ts +0 -119
- package/dist/tasty.js +0 -231
- package/dist/tasty.js.map +0 -1
- package/dist/types.d.ts +0 -184
- package/dist/utils/cache-wrapper.js +0 -21
- package/dist/utils/cache-wrapper.js.map +0 -1
- package/dist/utils/case-converter.js +0 -8
- package/dist/utils/case-converter.js.map +0 -1
- package/dist/utils/color-math.d.ts +0 -46
- package/dist/utils/color-math.js +0 -749
- package/dist/utils/color-math.js.map +0 -1
- package/dist/utils/color-space.d.ts +0 -5
- package/dist/utils/color-space.js +0 -228
- package/dist/utils/color-space.js.map +0 -1
- package/dist/utils/colors.d.ts +0 -5
- package/dist/utils/colors.js +0 -10
- package/dist/utils/colors.js.map +0 -1
- package/dist/utils/css-types.d.ts +0 -7
- package/dist/utils/dotize.d.ts +0 -26
- package/dist/utils/dotize.js +0 -122
- package/dist/utils/dotize.js.map +0 -1
- package/dist/utils/filter-base-props.d.ts +0 -15
- package/dist/utils/filter-base-props.js +0 -45
- package/dist/utils/filter-base-props.js.map +0 -1
- package/dist/utils/get-display-name.d.ts +0 -7
- package/dist/utils/get-display-name.js +0 -10
- package/dist/utils/get-display-name.js.map +0 -1
- package/dist/utils/has-keys.js +0 -13
- package/dist/utils/has-keys.js.map +0 -1
- package/dist/utils/is-dev-env.js +0 -19
- package/dist/utils/is-dev-env.js.map +0 -1
- package/dist/utils/is-valid-element-type.js +0 -15
- package/dist/utils/is-valid-element-type.js.map +0 -1
- package/dist/utils/merge-styles.js.map +0 -1
- package/dist/utils/mod-attrs.d.ts +0 -6
- package/dist/utils/mod-attrs.js +0 -20
- package/dist/utils/mod-attrs.js.map +0 -1
- package/dist/utils/process-tokens.d.ts +0 -21
- package/dist/utils/process-tokens.js +0 -90
- package/dist/utils/process-tokens.js.map +0 -1
- package/dist/utils/resolve-recipes.d.ts +0 -17
- package/dist/utils/resolve-recipes.js +0 -146
- package/dist/utils/resolve-recipes.js.map +0 -1
- package/dist/utils/selector-transform.js +0 -32
- package/dist/utils/selector-transform.js.map +0 -1
- package/dist/utils/string.js +0 -8
- package/dist/utils/string.js.map +0 -1
- package/dist/utils/styles.d.ts +0 -99
- package/dist/utils/styles.js +0 -220
- package/dist/utils/styles.js.map +0 -1
- package/dist/utils/typography.d.ts +0 -47
- package/dist/utils/typography.js +0 -51
- package/dist/utils/typography.js.map +0 -1
- package/dist/utils/warnings.d.ts +0 -16
- package/dist/utils/warnings.js +0 -16
- package/dist/utils/warnings.js.map +0 -1
- package/dist/zero/css-writer.d.ts +0 -45
- package/dist/zero/css-writer.js +0 -73
- package/dist/zero/css-writer.js.map +0 -1
- package/dist/zero/extractor.d.ts +0 -24
- package/dist/zero/extractor.js +0 -266
- package/dist/zero/extractor.js.map +0 -1
- package/docs/PIPELINE.md +0 -519
- package/docs/runtime.md +0 -485
package/docs/styles.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Style Properties Reference
|
|
2
2
|
|
|
3
|
-
All standard CSS properties are supported in Tasty and benefit from its syntax sugar: design tokens (`$name`, `#name`), custom units (`2x`, `1r`, `1bw`), color opacity (`#purple.5`), auto-calc (`(100% - 2x)`), and custom functions. Values are parsed through the Tasty engine automatically.
|
|
3
|
+
All standard CSS properties are supported in Tasty and benefit from its syntax sugar: design tokens (`$name`, `#name`), custom units (`2x`, `1r`, `1bw`), color opacity (`#purple.5`), auto-calc (`(100% - 2x)`), and [custom functions](dsl.md#functions-function) (`$$negative(10px)`). Values are parsed through the Tasty engine automatically.
|
|
4
4
|
|
|
5
5
|
The properties documented below have **custom handlers** with enhanced syntax. They should be **preferred** over their raw CSS equivalents because they:
|
|
6
6
|
|
|
@@ -10,6 +10,8 @@ The properties documented below have **custom handlers** with enhanced syntax. T
|
|
|
10
10
|
|
|
11
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
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
|
+
|
|
13
15
|
---
|
|
14
16
|
|
|
15
17
|
## Recommended Props
|
|
@@ -20,9 +22,10 @@ Use these instead of their raw CSS counterparts:
|
|
|
20
22
|
|-----|------------|
|
|
21
23
|
| `fill` | `backgroundColor`, `background` |
|
|
22
24
|
| `image` | `backgroundImage` |
|
|
23
|
-
| `padding` (with direction modifiers) | `paddingTop`, `paddingRight`, `paddingBottom`, `paddingLeft` |
|
|
24
|
-
| `margin` (with direction modifiers) | `marginTop`, `marginRight`, `marginBottom`, `marginLeft` |
|
|
25
|
-
|
|
|
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 |
|
|
26
29
|
| `height` (with `min`/`max` modifiers) | `minHeight`, `maxHeight` |
|
|
27
30
|
| `border` | `borderColor`, `borderWidth`, `borderStyle` |
|
|
28
31
|
| `radius` | `borderRadius` |
|
|
@@ -36,6 +39,24 @@ Use these instead of their raw CSS counterparts:
|
|
|
36
39
|
|
|
37
40
|
## Layout
|
|
38
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
|
+
|
|
39
60
|
### `display`
|
|
40
61
|
|
|
41
62
|
Standard CSS display values. Handled together with `hide`, `textOverflow`, `overflow`, and `whiteSpace` for priority resolution.
|
|
@@ -45,7 +66,7 @@ Standard CSS display values. Handled together with `hide`, `textOverflow`, `over
|
|
|
45
66
|
| `display` | Any CSS display value | Overridden by `hide` or multi-line `textOverflow` |
|
|
46
67
|
| `hide` | `true` / `false` | Shortcut for `display: none`. Highest priority |
|
|
47
68
|
| `overflow` | Any CSS overflow value | Overridden when `textOverflow` sets `hidden` |
|
|
48
|
-
| `whiteSpace` | Any CSS white-space value |
|
|
69
|
+
| `whiteSpace` | Any CSS white-space value | Explicit value wins over the `nowrap` / `initial` that `textOverflow` sets |
|
|
49
70
|
|
|
50
71
|
### `textOverflow`
|
|
51
72
|
|
|
@@ -59,7 +80,7 @@ Text truncation with optional multi-line clamping.
|
|
|
59
80
|
| `"ellipsis / 3"` | Multi-line clamp (3 lines) with ellipsis, sets `overflow: hidden` and `white-space: initial` |
|
|
60
81
|
| `"clip"` | Single-line truncation without ellipsis, sets `overflow: hidden` and `white-space: nowrap` |
|
|
61
82
|
| `"clip / 2"` | Multi-line clip (2 lines), sets `overflow: hidden` and `white-space: initial` |
|
|
62
|
-
| `
|
|
83
|
+
| `"initial"` | Reset text-overflow to initial |
|
|
63
84
|
|
|
64
85
|
Explicit `whiteSpace` overrides the default white-space set by `textOverflow`.
|
|
65
86
|
|
|
@@ -100,49 +121,60 @@ For flex/grid layouts, outputs native `gap`. For block layouts, emulates gap usi
|
|
|
100
121
|
|
|
101
122
|
Element padding with directional modifiers and multi-group support. Use **comma-separated groups** to set a base value and then override specific directions.
|
|
102
123
|
|
|
103
|
-
**Syntax:** `[value]` | `[
|
|
124
|
+
**Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
|
|
104
125
|
|
|
105
126
|
**Direction modifiers:** `top`, `right`, `bottom`, `left`
|
|
106
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
|
+
|
|
107
134
|
| Value | Effect |
|
|
108
135
|
|-------|--------|
|
|
109
136
|
| `"2x"` | All sides `2x` |
|
|
110
137
|
| `"2x 1x"` | Top/bottom `2x`, left/right `1x` |
|
|
111
138
|
| `"2x top"` | Top `2x`, right/bottom/left `0` |
|
|
112
139
|
| `"1x left right"` | Left and right `1x`, top/bottom `0` |
|
|
140
|
+
| `"2x top, 4x right"` | Top `2x`, right `4x`, bottom/left `0` |
|
|
113
141
|
| `"1x, 2x top"` | All sides `1x`, then top overridden to `2x` |
|
|
114
142
|
| `"1x, 2x top bottom"` | Left/right `1x`, top/bottom `2x` |
|
|
143
|
+
| `"2x longhand"` | All sides `2x`, output as 4 individual `padding-*` properties |
|
|
115
144
|
| `true` | All sides `1x` |
|
|
116
145
|
| Number | Converted to `px` |
|
|
117
146
|
|
|
118
147
|
Later comma-separated groups override earlier groups for conflicting directions.
|
|
119
148
|
|
|
120
|
-
|
|
149
|
+
A group with directions but no value (`padding: 'top'`) uses `1x`, the same as `padding: true`, so it follows `configure({ units })`.
|
|
121
150
|
|
|
122
|
-
|
|
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).
|
|
123
152
|
|
|
124
153
|
### `margin`
|
|
125
154
|
|
|
126
155
|
Element margin. Same syntax, modifiers, and multi-group support as `padding`.
|
|
127
156
|
|
|
128
|
-
**Syntax:** `[value]` | `[
|
|
157
|
+
**Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
|
|
129
158
|
|
|
130
159
|
**Direction modifiers:** `top`, `right`, `bottom`, `left`
|
|
131
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
|
+
|
|
132
165
|
| Value | Effect |
|
|
133
166
|
|-------|--------|
|
|
134
167
|
| `"2x"` | All sides `2x` |
|
|
135
168
|
| `"2x 1x"` | Top/bottom `2x`, left/right `1x` |
|
|
136
169
|
| `"2x top"` | Top `2x`, right/bottom/left `0` |
|
|
170
|
+
| `"2x top, 4x right"` | Top `2x`, right `4x`, bottom/left `0` |
|
|
137
171
|
| `"auto left right, 1x top bottom"` | Left/right `auto`, top/bottom `1x` |
|
|
138
172
|
| `true` | All sides `1x` |
|
|
139
173
|
| Number | Converted to `px` |
|
|
140
174
|
|
|
141
175
|
Later comma-separated groups override earlier groups for conflicting directions.
|
|
142
176
|
|
|
143
|
-
Individual props `marginTop`, `marginRight`, `marginBottom`, `marginLeft
|
|
144
|
-
|
|
145
|
-
**Priority:** `margin` < `marginBlock`/`marginInline` < `marginTop`/`marginRight`/`marginBottom`/`marginLeft`
|
|
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).
|
|
146
178
|
|
|
147
179
|
### `width`
|
|
148
180
|
|
|
@@ -165,12 +197,15 @@ Element width with min/max control. One, two, or three values set `min-width`, `
|
|
|
165
197
|
| `"min 2x"` | `2x` | auto | initial |
|
|
166
198
|
| `"max 100%"` | initial | auto | `100%` |
|
|
167
199
|
| `"fixed 200px"` | `200px` | `200px` | `200px` |
|
|
200
|
+
| `"min"` | `1x` | auto | initial |
|
|
201
|
+
| `"max"` | initial | auto | `100%` |
|
|
202
|
+
| `"fixed"` | `max-content` | `max-content` | `max-content` |
|
|
168
203
|
|
|
169
204
|
**Keywords:** `stretch`, `max-content`, `min-content`, `fit-content`
|
|
170
205
|
|
|
171
206
|
| Value | Effect |
|
|
172
207
|
|-------|--------|
|
|
173
|
-
| `"stretch"` | Fill available space
|
|
208
|
+
| `"stretch"` | Fill the available space, margins included. Emitted with `-webkit-fill-available` and `-moz-available` fallbacks for engines without the standard keyword |
|
|
174
209
|
| `true` | Reset to `auto` / `initial` / `initial` |
|
|
175
210
|
| Number | Converted to `px` |
|
|
176
211
|
|
|
@@ -178,7 +213,7 @@ Separate `minWidth` and `maxWidth` props are supported and override values from
|
|
|
178
213
|
|
|
179
214
|
### `height`
|
|
180
215
|
|
|
181
|
-
Element height. Same syntax, modifiers, and positional patterns as `width`.
|
|
216
|
+
Element height. Same syntax, modifiers, keywords, and positional patterns as `width`, including `stretch`.
|
|
182
217
|
|
|
183
218
|
Separate `minHeight` and `maxHeight` props are supported and override values from the `height` syntax.
|
|
184
219
|
|
|
@@ -186,23 +221,79 @@ Separate `minHeight` and `maxHeight` props are supported and override values fro
|
|
|
186
221
|
|
|
187
222
|
Positioning offsets with directional modifiers and multi-group support. Same directional syntax as `padding`.
|
|
188
223
|
|
|
189
|
-
**Syntax:** `[value]` | `[
|
|
224
|
+
**Syntax:** `[value]` | `[block inline]` | `[top right bottom left]` | `[value direction...]` — comma-separated for multiple groups
|
|
190
225
|
|
|
191
226
|
**Direction modifiers:** `top`, `right`, `bottom`, `left`
|
|
192
227
|
|
|
228
|
+
The [one-value-per-directional-group rule](#padding) from `padding` applies here too, with `dock`
|
|
229
|
+
as the single exception.
|
|
230
|
+
|
|
231
|
+
**`dock` modifier:** pins the named edge and spans its full length, by also applying the value
|
|
232
|
+
to the two perpendicular sides. `inset: 'bottom dock'` gives `inset: auto 0 0 0` — anchored to
|
|
233
|
+
the bottom, full width. Without a direction, `dock` fills every side.
|
|
234
|
+
|
|
235
|
+
`dock` is the one place a directional group takes **two** values: the first insets the named
|
|
236
|
+
edge, the second the sides it spans. `inset: '2x 4x bottom dock'` pins the bottom at `2x` and
|
|
237
|
+
insets the sides by `4x`. A third value, or a second value without `dock`, is ignored and warns
|
|
238
|
+
in development. With several directions the first value applies to each named edge and the
|
|
239
|
+
second to every side they span.
|
|
240
|
+
|
|
241
|
+
**Output modifier:** `longhand` — forces output as individual CSS properties (`top`, `right`, `bottom`, `left`) instead of the `inset` shorthand.
|
|
242
|
+
|
|
193
243
|
| Value | Effect |
|
|
194
244
|
|-------|--------|
|
|
195
245
|
| `"0"` | All sides `0` |
|
|
196
246
|
| `"2x top"` | Top `2x`, right/bottom/left `auto` |
|
|
197
247
|
| `"1x left right"` | Left and right `1x`, top/bottom `auto` |
|
|
198
248
|
| `"0, 2x top"` | All sides `0`, then top overridden to `2x` |
|
|
249
|
+
| `"0 longhand"` | All sides `0`, output as individual `top`/`right`/`bottom`/`left` |
|
|
199
250
|
| `true` | All sides `0` |
|
|
251
|
+
| `"bottom dock"` | Bottom/left/right `0`, top `auto` — bottom-anchored, full width |
|
|
252
|
+
| `"right dock"` | Right/top/bottom `0`, left `auto` — right-anchored, full height |
|
|
253
|
+
| `"2x bottom dock"` | Bottom/left/right `2x`, top `auto` |
|
|
254
|
+
| `"2x 4x bottom dock"` | Bottom `2x`, left/right `4x`, top `auto` |
|
|
255
|
+
| `"dock"` | All sides `0` |
|
|
200
256
|
|
|
201
257
|
Later comma-separated groups override earlier groups for conflicting directions.
|
|
202
258
|
|
|
203
|
-
Individual props `top`, `right`, `bottom`, `left
|
|
259
|
+
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.
|
|
260
|
+
|
|
261
|
+
### Logical properties
|
|
262
|
+
|
|
263
|
+
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`.
|
|
264
|
+
|
|
265
|
+
```jsx
|
|
266
|
+
styles: {
|
|
267
|
+
direction: 'rtl',
|
|
268
|
+
inlinePadding: '1x start, 2x end',
|
|
269
|
+
inlineBorder: '1bw solid #accent start',
|
|
270
|
+
blockInset: '0 end',
|
|
271
|
+
}
|
|
272
|
+
```
|
|
204
273
|
|
|
205
|
-
**
|
|
274
|
+
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.
|
|
275
|
+
|
|
276
|
+
| Category | Block axis | Inline axis |
|
|
277
|
+
|----------|------------|-------------|
|
|
278
|
+
| Size | `blockSize` | `inlineSize` |
|
|
279
|
+
| Padding | `blockPadding` | `inlinePadding` |
|
|
280
|
+
| Margin | `blockMargin` | `inlineMargin` |
|
|
281
|
+
| Inset | `blockInset` | `inlineInset` |
|
|
282
|
+
| Scroll margin | `blockScrollMargin` | `inlineScrollMargin` |
|
|
283
|
+
| Scroll padding | `blockScrollPadding` | `inlineScrollPadding` |
|
|
284
|
+
| Border | `blockBorder` | `inlineBorder` |
|
|
285
|
+
|
|
286
|
+
`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.
|
|
287
|
+
|
|
288
|
+
`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`.
|
|
289
|
+
|
|
290
|
+
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.
|
|
291
|
+
|
|
292
|
+
The physical `scrollMargin` and `scrollPadding` shorthands support the same values and physical direction modifiers as `padding`. Their logical counterparts stay in separate axis handlers.
|
|
293
|
+
|
|
294
|
+
`writingMode`, `direction`, and `textOrientation` are standard CSS control properties. They use Tasty's normal value parser and need no special handler.
|
|
295
|
+
|
|
296
|
+
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.
|
|
206
297
|
|
|
207
298
|
---
|
|
208
299
|
|
|
@@ -220,9 +311,11 @@ Background color with design token support. Preferred over `backgroundColor` and
|
|
|
220
311
|
| `"#purple.10"` | Token color at 10% opacity |
|
|
221
312
|
| `"#surface #primary.10"` | Background `#surface` with `#primary.10` overlay (two colors enable smooth transitions between both) |
|
|
222
313
|
| `"rgb(255 128 0)"` | CSS color value |
|
|
223
|
-
| `
|
|
314
|
+
| `"color-mix(in oklab, #primary 50%, #surface)"` | CSS color function — see [CSS Color Functions](dsl.md#css-color-functions) |
|
|
315
|
+
|
|
316
|
+
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. With `image` or `backgroundImage` on the same element, the image is layered over the overlay color in one `background-image`.
|
|
224
317
|
|
|
225
|
-
|
|
318
|
+
There is no default fill color, so `fill: true` is ignored with a development warning. Use `false` for no fill.
|
|
226
319
|
|
|
227
320
|
**Related deprecated props:** `backgroundColor` (use `fill`), `background` (overrides all background props when set — avoid).
|
|
228
321
|
|
|
@@ -252,9 +345,18 @@ Text color with design token support.
|
|
|
252
345
|
| `"#current"` | Current inherited color |
|
|
253
346
|
| `"#current.5"` | Current inherited color at 50% opacity |
|
|
254
347
|
| `"(#primary, #secondary)"` | Fallback: use `#primary`, fall back to `#secondary` |
|
|
348
|
+
| `"light-dark(#dark, #light)"` | CSS color function — see [CSS Color Functions](dsl.md#css-color-functions) |
|
|
349
|
+
| `"#ddd"` | Hex literal, read as the `#ddd` token with the literal as fallback: `var(--ddd-color, #ddd)`, as in every color style |
|
|
255
350
|
| `true` | `currentColor` |
|
|
256
351
|
|
|
257
|
-
|
|
352
|
+
Also sets `$current-color` to the same color, for anything that needs the
|
|
353
|
+
inherited color as a color rather than as the `currentcolor` keyword. Every color
|
|
354
|
+
publishes it, not just a named token, so a reader below always takes the nearest
|
|
355
|
+
`color` rather than the nearest *token* color. A value that already reads the
|
|
356
|
+
inherited color — `#current` itself, a `#current` fade, a bare `currentColor` —
|
|
357
|
+
is not republished: resolving it a second time one level down would fade it
|
|
358
|
+
twice, and the variable into itself is a self-reference. `#current` does not go
|
|
359
|
+
through it; it is the keyword.
|
|
258
360
|
|
|
259
361
|
### `svgFill`
|
|
260
362
|
|
|
@@ -262,7 +364,7 @@ SVG fill color. Same color token syntax as `fill` and `color`. Outputs the nativ
|
|
|
262
364
|
|
|
263
365
|
```jsx
|
|
264
366
|
svgFill="#purple.10"
|
|
265
|
-
svgFill="
|
|
367
|
+
svgFill="#current"
|
|
266
368
|
```
|
|
267
369
|
|
|
268
370
|
---
|
|
@@ -275,23 +377,28 @@ Border shorthand with directional and multi-group support. Use **comma-separated
|
|
|
275
377
|
|
|
276
378
|
**Syntax:** `[width] [style] [color] [directions...]` — comma-separated for multiple groups
|
|
277
379
|
|
|
278
|
-
**Defaults:** width = `1bw`, style = `solid`, color = `#border`
|
|
380
|
+
**Defaults:** width = `1bw`, style = `solid`, color = `#border`, which is the text color (`currentColor`) until your tokens define `#border`
|
|
279
381
|
|
|
280
382
|
**Styles:** `none`, `hidden`, `dotted`, `dashed`, `solid`, `double`, `groove`, `ridge`, `inset`, `outset`
|
|
281
383
|
|
|
282
384
|
**Direction modifiers:** `top`, `right`, `bottom`, `left`
|
|
283
385
|
|
|
386
|
+
**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.
|
|
387
|
+
|
|
284
388
|
| Value | Effect |
|
|
285
389
|
|-------|--------|
|
|
286
390
|
| `true` | Default border (`1bw solid #border`) on all sides |
|
|
287
391
|
| `"2bw dashed #purple"` | All sides: 2bw dashed purple |
|
|
288
392
|
| `"2bw top"` | Top only: 2bw solid `#border`, others: 0 |
|
|
289
393
|
| `"dotted #danger left right"` | Left/right: 1bw dotted `#danger`, others: 0 |
|
|
394
|
+
| `"1bw longhand"` | All sides: 1bw solid `#border`, output as 4 individual `border-*` properties |
|
|
290
395
|
| `"1bw #red, 2bw #blue top"` | All sides: 1bw solid `#red`, top overridden to 2bw solid `#blue` |
|
|
291
396
|
| `"1bw, dashed top bottom, #purple left right"` | Base: 1bw solid `#border`, top/bottom: 1bw dashed `#border`, left/right: 1bw solid `#purple` |
|
|
292
397
|
|
|
293
398
|
Later comma-separated groups override earlier groups for conflicting directions.
|
|
294
399
|
|
|
400
|
+
A directional group without a width (`'dotted left'`) uses `1bw`, the same as `border: true`, so it follows `configure({ units })`.
|
|
401
|
+
|
|
295
402
|
### `radius`
|
|
296
403
|
|
|
297
404
|
Border radius with shape presets and directional modifiers.
|
|
@@ -308,7 +415,13 @@ Border radius with shape presets and directional modifiers.
|
|
|
308
415
|
| `"backleaf"` | Asymmetric: round, sharp, round, sharp |
|
|
309
416
|
| `"inherit"` | Inherit border-radius from parent |
|
|
310
417
|
|
|
311
|
-
**
|
|
418
|
+
**Edge modifiers:** `top`, `right`, `bottom`, `left` — rounds the *pair* of corners along that edge.
|
|
419
|
+
|
|
420
|
+
**Corner modifiers:** `top-left`, `top-right`, `bottom-right`, `bottom-left` — rounds a single corner.
|
|
421
|
+
Use these when an edge modifier would round one corner too many. Edge and corner modifiers combine
|
|
422
|
+
(`radius: 'top bottom-right'`).
|
|
423
|
+
|
|
424
|
+
**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'`.
|
|
312
425
|
|
|
313
426
|
| Value | Effect |
|
|
314
427
|
|-------|--------|
|
|
@@ -318,8 +431,14 @@ Border radius with shape presets and directional modifiers.
|
|
|
318
431
|
| `"1r top"` | Top-left and top-right `1r`, bottom-left and bottom-right `0` |
|
|
319
432
|
| `"leaf"` | Alternating sharp/round corners (top-left `0`, top-right `1r`, bottom-right `0`, bottom-left `1r`) |
|
|
320
433
|
| `"backleaf"` | Inverse leaf (top-left `1r`, top-right `0`, bottom-right `1r`, bottom-left `0`) |
|
|
434
|
+
| `"1r longhand"` | All corners `1r`, output as 4 individual `border-*-radius` properties |
|
|
321
435
|
| `"inherit"` | All corners inherit from parent (`border-radius: inherit`) |
|
|
322
436
|
| `"inherit right"` | Right corners inherit from parent (uses longhand properties) |
|
|
437
|
+
| `"top-right"` | Top-right corner `1r`, every other corner `0` |
|
|
438
|
+
| `"4px top-left"` | Top-left corner `4px`, every other corner `0` |
|
|
439
|
+
| `"top bottom-right"` | Both top corners and bottom-right `1r`, bottom-left `0` |
|
|
440
|
+
|
|
441
|
+
A value-less corner group (`'top-right'`, `'top bottom-right'`) uses `1r`, the same as `radius: true`, so it follows `configure({ units })`.
|
|
323
442
|
|
|
324
443
|
### `outline`
|
|
325
444
|
|
|
@@ -327,7 +446,7 @@ Outline with inline offset support.
|
|
|
327
446
|
|
|
328
447
|
**Syntax:** `[width] [style] [color] / [offset]`
|
|
329
448
|
|
|
330
|
-
**Defaults:** width = `1ow`, style = `solid`, color = `#outline`
|
|
449
|
+
**Defaults:** width = `1ow`, style = `solid`, color = `#outline`, which is the text color (`currentColor`) until your tokens define `#outline`
|
|
331
450
|
|
|
332
451
|
**Styles:** Same as `border` (`none`, `dotted`, `dashed`, `solid`, etc.)
|
|
333
452
|
|
|
@@ -362,29 +481,32 @@ Multiple shadows: `shadow="1x 1x 2x #dark.20, inset 0 0 4x #dark.10"`
|
|
|
362
481
|
|
|
363
482
|
### `preset`
|
|
364
483
|
|
|
365
|
-
Typography preset that sets font-size, line-height, letter-spacing, font-weight, font-style,
|
|
484
|
+
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.
|
|
366
485
|
|
|
367
|
-
**Syntax:** `name`, `name / modifier
|
|
486
|
+
**Syntax:** `name`, `name / modifier...`, or `modifier...` (shorthand)
|
|
368
487
|
|
|
369
488
|
Preset names are project-specific (e.g. `h1`–`h6`, `t1`–`t4`, `p1`–`p4`). Register them for autocomplete by augmenting `TastyPresetNames`.
|
|
370
489
|
|
|
371
|
-
Use `/` to separate the preset name from
|
|
490
|
+
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.
|
|
372
491
|
|
|
373
492
|
**Modifiers:**
|
|
374
493
|
|
|
375
494
|
| Modifier | Effect |
|
|
376
495
|
|----------|--------|
|
|
377
|
-
| `strong` (or `bold`) | Sets `font-weight` to bold (from `$bold-font-weight` token) |
|
|
496
|
+
| `strong` (or `bold`) | Sets `font-weight` to bold (from `$bold-font-weight` token, `700` until your tokens define it) |
|
|
378
497
|
| `italic` | Sets `font-style: italic` |
|
|
379
498
|
| `icon` | Sets font-size and line-height to icon size |
|
|
380
499
|
| `tight` | Sets line-height equal to font-size |
|
|
500
|
+
| `normal` | Sets `line-height: normal` |
|
|
381
501
|
|
|
382
502
|
```jsx
|
|
383
|
-
preset="h1"
|
|
384
|
-
preset="h2 / strong"
|
|
385
|
-
preset="
|
|
386
|
-
preset="
|
|
387
|
-
preset="
|
|
503
|
+
preset="h1" // heading 1
|
|
504
|
+
preset="h2 / strong" // bold heading 2
|
|
505
|
+
preset="h2 / strong italic" // bold + italic heading 2
|
|
506
|
+
preset="t3 / italic" // italic text 3
|
|
507
|
+
preset="t2 / strong tight" // bold text 2 with tight line-height
|
|
508
|
+
preset="bold" // inherit preset with bold (shorthand)
|
|
509
|
+
preset="bold italic" // inherit preset with bold + italic (shorthand)
|
|
388
510
|
```
|
|
389
511
|
|
|
390
512
|
Individual typography props (`fontSize`, `lineHeight`, `letterSpacing`, `fontWeight`, `fontStyle`, `textTransform`) can be used alongside `preset` to override specific values, but using `preset` alone is recommended.
|
|
@@ -395,9 +517,9 @@ Font family with design-system fallback. Preferred over `fontFamily`.
|
|
|
395
517
|
|
|
396
518
|
| Value | Effect |
|
|
397
519
|
|-------|--------|
|
|
398
|
-
| `"monospace"` | Monospace
|
|
399
|
-
| `true` | Default
|
|
400
|
-
| `"CustomFont"` | Custom font
|
|
520
|
+
| `"monospace"` | Monospace stack from `$font-mono`, falling back to the built-in `$font-mono-fallback` |
|
|
521
|
+
| `true` | Default sans stack from `$font-sans`, falling back to `$font-sans-fallback` |
|
|
522
|
+
| `"CustomFont"` | Custom font followed by the `$font-sans` stack |
|
|
401
523
|
|
|
402
524
|
`fontFamily` is supported as a direct pass-through without fallback logic.
|
|
403
525
|
|
|
@@ -473,18 +595,22 @@ When easing is provided without a duration, the default timing variable is used
|
|
|
473
595
|
| `width` | `width`, `min-width`, `max-width` |
|
|
474
596
|
| `height` | `height`, `min-height`, `max-height` |
|
|
475
597
|
| `gap` | `gap`, `margin` |
|
|
476
|
-
| `zIndex` | `z-index` |
|
|
598
|
+
| `zIndex` | `z-index` (same as writing `z-index`) |
|
|
477
599
|
| `inset` | `inset`, `top`, `right`, `bottom`, `left` |
|
|
478
600
|
|
|
479
|
-
|
|
601
|
+
Any other name passes through as a CSS property.
|
|
602
|
+
|
|
603
|
+
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.
|
|
604
|
+
|
|
605
|
+
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.
|
|
480
606
|
|
|
481
607
|
```jsx
|
|
482
|
-
transition="theme
|
|
483
|
-
transition="fill
|
|
484
|
-
transition="fade
|
|
608
|
+
transition="theme"
|
|
609
|
+
transition="fill, radius"
|
|
610
|
+
transition="fade $transition ease-in"
|
|
485
611
|
transition="fill ease-in" // easing without duration (uses default timing)
|
|
486
612
|
transition="radius ease-in-out" // easing keyword only
|
|
487
|
-
transition="$$custom-prop
|
|
613
|
+
transition="$$custom-prop" // custom property transition
|
|
488
614
|
```
|
|
489
615
|
|
|
490
616
|
**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.
|
|
@@ -493,6 +619,24 @@ If the name is not a semantic name, it is used as a literal CSS property name.
|
|
|
493
619
|
|
|
494
620
|
---
|
|
495
621
|
|
|
622
|
+
### `animation`
|
|
623
|
+
|
|
624
|
+
`animation` is the native CSS shorthand. Tasty parses tokens in its value and
|
|
625
|
+
tracks local `@keyframes` names referenced by it, so it needs no custom style
|
|
626
|
+
handler. Define a complete animation with the shorthand, using a configured
|
|
627
|
+
duration token where appropriate (for example,
|
|
628
|
+
`animation: 'pulse $animation-duration ease-in infinite'`).
|
|
629
|
+
|
|
630
|
+
Use `animationDuration`, `animationTimeline`, `animationRange`, and other CSS
|
|
631
|
+
longhands when changing just one part of an existing animation in a state or
|
|
632
|
+
component extension. Setting `animation` resets omitted parts, including its
|
|
633
|
+
timeline and range. The same principle applies to `transitionDuration` and
|
|
634
|
+
other transition longhands when a base `transition` is already defined.
|
|
635
|
+
`transitionBehavior` remains a separate CSS longhand; Tasty's semantic
|
|
636
|
+
`transition` syntax covers name, timing, easing, and delay.
|
|
637
|
+
|
|
638
|
+
---
|
|
639
|
+
|
|
496
640
|
## Scrollbar & Overflow
|
|
497
641
|
|
|
498
642
|
### `scrollbar`
|
|
@@ -536,16 +680,21 @@ Scrollbar styling using CSS standard properties (`scrollbar-width`, `scrollbar-c
|
|
|
536
680
|
|
|
537
681
|
Gradient-based edge fading using CSS masks. Use **comma-separated groups** to set different widths and colors per direction.
|
|
538
682
|
|
|
539
|
-
**Syntax:** `[width] [
|
|
683
|
+
**Syntax:** `[width] [direction...] [#from-color] [#to-color]` — comma-separated for multiple groups
|
|
540
684
|
|
|
541
685
|
**Direction modifiers:** `top`, `right`, `bottom`, `left`
|
|
542
686
|
|
|
687
|
+
A group that names edges takes a **single** width, applied to every edge it names — different
|
|
688
|
+
widths per edge come from comma groups. A group that names no edge covers all four and keeps
|
|
689
|
+
plain CSS shorthand order, like `padding`. See the [`padding` rule](#padding).
|
|
690
|
+
|
|
543
691
|
| Value | Effect |
|
|
544
692
|
|-------|--------|
|
|
545
|
-
| `"top"` | Fade top edge, default width
|
|
693
|
+
| `"top"` | Fade top edge, default width `2x`, all other edges unfaded |
|
|
546
694
|
| `"2x left right"` | Fade left and right edges with `2x` width, top/bottom unfaded |
|
|
547
|
-
| `"3x 1x
|
|
548
|
-
| `"
|
|
695
|
+
| `"3x 1x"` | All edges faded — top/bottom `3x`, left/right `1x` (CSS shorthand order) |
|
|
696
|
+
| `"3x top, 1x bottom"` | Fade top with `3x` width, bottom with `1x` width |
|
|
697
|
+
| `"2x #clear #dark"` | All edges faded with `2x` width, from `#clear` to `#dark` |
|
|
549
698
|
| `"top #a #b, bottom #c #d"` | Top fades from `#a` to `#b`, bottom fades from `#c` to `#d` |
|
|
550
699
|
|
|
551
700
|
Colors are optional: first = transparent mask start, second = opaque mask end.
|