@bookklik/senangstart-css 0.1.4 → 0.1.7
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/.github/workflows/deploy-docs.yml +7 -1
- package/dist/senangstart-css.js +1436 -14
- package/dist/senangstart-css.min.js +1159 -10
- package/docs/.vitepress/config.js +621 -15
- package/docs/SYNTAX-REFERENCE.md +1555 -0
- package/docs/guide/preflight.md +139 -0
- package/docs/ms/guide/preflight.md +139 -0
- package/docs/ms/reference/colors.md +45 -45
- package/docs/ms/reference/layout/align-content.md +35 -0
- package/docs/ms/reference/layout/align-items.md +33 -0
- package/docs/ms/reference/layout/align-self.md +34 -0
- package/docs/ms/reference/layout/aspect-ratio.md +40 -0
- package/docs/ms/reference/layout/border-collapse.md +30 -0
- package/docs/ms/reference/layout/border-spacing.md +39 -0
- package/docs/ms/reference/layout/box-sizing.md +30 -0
- package/docs/ms/reference/layout/caption-side.md +30 -0
- package/docs/ms/reference/layout/columns.md +30 -0
- package/docs/ms/reference/layout/container.md +29 -0
- package/docs/ms/reference/layout/display.md +60 -0
- package/docs/ms/reference/layout/flex-basis.md +38 -0
- package/docs/ms/reference/layout/flex-direction.md +33 -0
- package/docs/ms/reference/layout/flex-items.md +32 -0
- package/docs/ms/reference/layout/flex-wrap.md +31 -0
- package/docs/ms/reference/layout/flex.md +40 -0
- package/docs/ms/reference/layout/float-clear.md +32 -0
- package/docs/ms/reference/layout/grid-auto-flow.md +33 -0
- package/docs/ms/reference/layout/grid-auto-sizing.md +32 -0
- package/docs/ms/reference/layout/grid-column-span.md +31 -0
- package/docs/ms/reference/layout/grid-columns.md +32 -0
- package/docs/ms/reference/layout/grid-row-span.md +30 -0
- package/docs/ms/reference/layout/grid-rows.md +31 -0
- package/docs/ms/reference/layout/inset.md +44 -0
- package/docs/ms/reference/layout/isolation.md +30 -0
- package/docs/ms/reference/layout/justify-content.md +36 -0
- package/docs/ms/reference/layout/justify-items.md +32 -0
- package/docs/ms/reference/layout/justify-self.md +33 -0
- package/docs/ms/reference/layout/object-fit.md +33 -0
- package/docs/ms/reference/layout/object-position.md +45 -0
- package/docs/ms/reference/layout/order.md +32 -0
- package/docs/ms/reference/layout/overflow.md +34 -0
- package/docs/ms/reference/layout/overscroll.md +31 -0
- package/docs/ms/reference/layout/place-content.md +35 -0
- package/docs/ms/reference/layout/place-items.md +32 -0
- package/docs/ms/reference/layout/place-self.md +33 -0
- package/docs/ms/reference/layout/position.md +34 -0
- package/docs/ms/reference/layout/shorthand-alignment.md +34 -0
- package/docs/ms/reference/layout/table-layout.md +30 -0
- package/docs/ms/reference/layout/visibility.md +30 -0
- package/docs/ms/reference/layout/z-index.md +33 -0
- package/docs/ms/reference/layout.md +53 -95
- package/docs/ms/reference/space/arbitrary-values.md +32 -0
- package/docs/ms/reference/space/gap.md +44 -0
- package/docs/ms/reference/space/height.md +44 -0
- package/docs/ms/reference/space/margin.md +49 -0
- package/docs/ms/reference/space/padding.md +49 -0
- package/docs/ms/reference/space/scale-reference.md +43 -0
- package/docs/ms/reference/space/sizing.md +27 -0
- package/docs/ms/reference/space/width.md +45 -0
- package/docs/ms/reference/space.md +15 -99
- package/docs/ms/reference/spacing.md +22 -8
- package/docs/ms/reference/visual/accent-color.md +31 -0
- package/docs/ms/reference/visual/animation-builtin.md +41 -0
- package/docs/ms/reference/visual/animation-delay.md +41 -0
- package/docs/ms/reference/visual/animation-direction.md +32 -0
- package/docs/ms/reference/visual/animation-duration.md +43 -0
- package/docs/ms/reference/visual/animation-fill.md +32 -0
- package/docs/ms/reference/visual/animation-iteration.md +30 -0
- package/docs/ms/reference/visual/animation-play.md +30 -0
- package/docs/ms/reference/visual/appearance.md +30 -0
- package/docs/ms/reference/visual/backdrop-blur.md +43 -0
- package/docs/ms/reference/visual/backdrop-brightness.md +41 -0
- package/docs/ms/reference/visual/backdrop-contrast.md +41 -0
- package/docs/ms/reference/visual/backdrop-grayscale.md +39 -0
- package/docs/ms/reference/visual/backdrop-hue-rotate.md +39 -0
- package/docs/ms/reference/visual/backdrop-invert.md +39 -0
- package/docs/ms/reference/visual/backdrop-opacity.md +39 -0
- package/docs/ms/reference/visual/backdrop-saturate.md +41 -0
- package/docs/ms/reference/visual/backdrop-sepia.md +39 -0
- package/docs/ms/reference/visual/background-attachment.md +31 -0
- package/docs/ms/reference/visual/background-blend-mode.md +34 -0
- package/docs/ms/reference/visual/background-clip.md +32 -0
- package/docs/ms/reference/visual/background-color.md +33 -0
- package/docs/ms/reference/visual/background-image.md +41 -0
- package/docs/ms/reference/visual/background-origin.md +31 -0
- package/docs/ms/reference/visual/background-position.md +45 -0
- package/docs/ms/reference/visual/background-repeat.md +34 -0
- package/docs/ms/reference/visual/background-size.md +39 -0
- package/docs/ms/reference/visual/background.md +13 -0
- package/docs/ms/reference/visual/blend-modes.md +34 -0
- package/docs/ms/reference/visual/border-radius.md +34 -0
- package/docs/ms/reference/visual/border-style.md +33 -0
- package/docs/ms/reference/visual/border-width.md +44 -0
- package/docs/ms/reference/visual/border.md +43 -0
- package/docs/ms/reference/visual/box-shadow.md +33 -0
- package/docs/ms/reference/visual/caret-color.md +31 -0
- package/docs/ms/reference/visual/color-scheme.md +31 -0
- package/docs/ms/reference/visual/cursor.md +37 -0
- package/docs/ms/reference/visual/field-sizing.md +30 -0
- package/docs/ms/reference/visual/fill.md +38 -0
- package/docs/ms/reference/visual/filter-blur.md +43 -0
- package/docs/ms/reference/visual/filter-brightness.md +41 -0
- package/docs/ms/reference/visual/filter-contrast.md +41 -0
- package/docs/ms/reference/visual/filter-drop-shadow.md +42 -0
- package/docs/ms/reference/visual/filter-grayscale.md +39 -0
- package/docs/ms/reference/visual/filter-hue-rotate.md +39 -0
- package/docs/ms/reference/visual/filter-invert.md +39 -0
- package/docs/ms/reference/visual/filter-saturate.md +41 -0
- package/docs/ms/reference/visual/filter-sepia.md +39 -0
- package/docs/ms/reference/visual/font-family.md +31 -0
- package/docs/ms/reference/visual/font-smoothing.md +30 -0
- package/docs/ms/reference/visual/font-style.md +30 -0
- package/docs/ms/reference/visual/font-variant-numeric.md +35 -0
- package/docs/ms/reference/visual/font-weight.md +31 -0
- package/docs/ms/reference/visual/forced-color-adjust.md +30 -0
- package/docs/ms/reference/visual/hyphens.md +31 -0
- package/docs/ms/reference/visual/letter-spacing.md +42 -0
- package/docs/ms/reference/visual/line-clamp.md +40 -0
- package/docs/ms/reference/visual/line-height.md +42 -0
- package/docs/ms/reference/visual/list-style.md +34 -0
- package/docs/ms/reference/visual/mask.md +39 -0
- package/docs/ms/reference/visual/opacity.md +33 -0
- package/docs/ms/reference/visual/outline.md +31 -0
- package/docs/ms/reference/visual/pointer-events.md +30 -0
- package/docs/ms/reference/visual/resize.md +32 -0
- package/docs/ms/reference/visual/scroll-behavior.md +30 -0
- package/docs/ms/reference/visual/scroll-margin.md +41 -0
- package/docs/ms/reference/visual/scroll-padding.md +41 -0
- package/docs/ms/reference/visual/scroll-snap-align.md +32 -0
- package/docs/ms/reference/visual/scroll-snap-stop.md +30 -0
- package/docs/ms/reference/visual/scroll-snap-type.md +34 -0
- package/docs/ms/reference/visual/state-prefixes.md +37 -0
- package/docs/ms/reference/visual/stroke-width.md +39 -0
- package/docs/ms/reference/visual/stroke.md +38 -0
- package/docs/ms/reference/visual/text-alignment.md +32 -0
- package/docs/ms/reference/visual/text-color.md +41 -0
- package/docs/ms/reference/visual/text-decoration.md +32 -0
- package/docs/ms/reference/visual/text-indent.md +37 -0
- package/docs/ms/reference/visual/text-overflow.md +31 -0
- package/docs/ms/reference/visual/text-shadow.md +40 -0
- package/docs/ms/reference/visual/text-size.md +32 -0
- package/docs/ms/reference/visual/text-transform.md +32 -0
- package/docs/ms/reference/visual/text-wrap.md +32 -0
- package/docs/ms/reference/visual/touch-action.md +36 -0
- package/docs/ms/reference/visual/transform-backface.md +30 -0
- package/docs/ms/reference/visual/transform-origin.md +45 -0
- package/docs/ms/reference/visual/transform-perspective-origin.md +45 -0
- package/docs/ms/reference/visual/transform-perspective.md +43 -0
- package/docs/ms/reference/visual/transform-rotate.md +40 -0
- package/docs/ms/reference/visual/transform-scale.md +43 -0
- package/docs/ms/reference/visual/transform-skew.md +40 -0
- package/docs/ms/reference/visual/transform-style.md +30 -0
- package/docs/ms/reference/visual/transform-translate.md +39 -0
- package/docs/ms/reference/visual/transition-delay.md +41 -0
- package/docs/ms/reference/visual/transition-duration.md +43 -0
- package/docs/ms/reference/visual/transition-property.md +34 -0
- package/docs/ms/reference/visual/transition-timing.md +40 -0
- package/docs/ms/reference/visual/typography-keywords.md +81 -0
- package/docs/ms/reference/visual/user-select.md +32 -0
- package/docs/ms/reference/visual/vertical-align.md +36 -0
- package/docs/ms/reference/visual/whitespace.md +34 -0
- package/docs/ms/reference/visual/will-change.md +33 -0
- package/docs/ms/reference/visual/word-break.md +32 -0
- package/docs/ms/reference/visual.md +145 -148
- package/docs/public/assets/senangstart-css.min.js +1545 -0
- package/docs/reference/layout/align-content.md +35 -0
- package/docs/reference/layout/align-items.md +33 -0
- package/docs/reference/layout/align-self.md +34 -0
- package/docs/reference/layout/aspect-ratio.md +40 -0
- package/docs/reference/layout/border-collapse.md +30 -0
- package/docs/reference/layout/border-spacing.md +39 -0
- package/docs/reference/layout/box-sizing.md +30 -0
- package/docs/reference/layout/caption-side.md +30 -0
- package/docs/reference/layout/columns.md +30 -0
- package/docs/reference/layout/container.md +29 -0
- package/docs/reference/layout/display.md +60 -0
- package/docs/reference/layout/flex-basis.md +38 -0
- package/docs/reference/layout/flex-direction.md +33 -0
- package/docs/reference/layout/flex-items.md +32 -0
- package/docs/reference/layout/flex-wrap.md +31 -0
- package/docs/reference/layout/flex.md +40 -0
- package/docs/reference/layout/float-clear.md +32 -0
- package/docs/reference/layout/grid-auto-flow.md +33 -0
- package/docs/reference/layout/grid-auto-sizing.md +32 -0
- package/docs/reference/layout/grid-column-span.md +31 -0
- package/docs/reference/layout/grid-columns.md +32 -0
- package/docs/reference/layout/grid-row-span.md +30 -0
- package/docs/reference/layout/grid-rows.md +31 -0
- package/docs/reference/layout/inset.md +44 -0
- package/docs/reference/layout/isolation.md +30 -0
- package/docs/reference/layout/justify-content.md +36 -0
- package/docs/reference/layout/justify-items.md +32 -0
- package/docs/reference/layout/justify-self.md +33 -0
- package/docs/reference/layout/object-fit.md +33 -0
- package/docs/reference/layout/object-position.md +45 -0
- package/docs/reference/layout/order.md +32 -0
- package/docs/reference/layout/overflow.md +34 -0
- package/docs/reference/layout/overscroll.md +31 -0
- package/docs/reference/layout/place-content.md +35 -0
- package/docs/reference/layout/place-items.md +32 -0
- package/docs/reference/layout/place-self.md +33 -0
- package/docs/reference/layout/position.md +34 -0
- package/docs/reference/layout/shorthand-alignment.md +34 -0
- package/docs/reference/layout/table-layout.md +30 -0
- package/docs/reference/layout/visibility.md +30 -0
- package/docs/reference/layout/z-index.md +33 -0
- package/docs/reference/layout.md +60 -102
- package/docs/reference/space/arbitrary-values.md +39 -0
- package/docs/reference/space/gap.md +44 -0
- package/docs/reference/space/height.md +44 -0
- package/docs/reference/space/margin.md +49 -0
- package/docs/reference/space/padding.md +49 -0
- package/docs/reference/space/scale-reference.md +43 -0
- package/docs/reference/space/width.md +45 -0
- package/docs/reference/space.md +14 -98
- package/docs/reference/spacing.md +22 -8
- package/docs/reference/visual/accent-color.md +31 -0
- package/docs/reference/visual/animation-builtin.md +41 -0
- package/docs/reference/visual/animation-delay.md +41 -0
- package/docs/reference/visual/animation-direction.md +32 -0
- package/docs/reference/visual/animation-duration.md +43 -0
- package/docs/reference/visual/animation-fill.md +32 -0
- package/docs/reference/visual/animation-iteration.md +30 -0
- package/docs/reference/visual/animation-play.md +30 -0
- package/docs/reference/visual/appearance.md +30 -0
- package/docs/reference/visual/backdrop-blur.md +43 -0
- package/docs/reference/visual/backdrop-brightness.md +41 -0
- package/docs/reference/visual/backdrop-contrast.md +41 -0
- package/docs/reference/visual/backdrop-grayscale.md +39 -0
- package/docs/reference/visual/backdrop-hue-rotate.md +39 -0
- package/docs/reference/visual/backdrop-invert.md +39 -0
- package/docs/reference/visual/backdrop-opacity.md +39 -0
- package/docs/reference/visual/backdrop-saturate.md +41 -0
- package/docs/reference/visual/backdrop-sepia.md +39 -0
- package/docs/reference/visual/background-attachment.md +31 -0
- package/docs/reference/visual/background-blend-mode.md +34 -0
- package/docs/reference/visual/background-clip.md +32 -0
- package/docs/reference/visual/background-color.md +33 -0
- package/docs/reference/visual/background-image.md +41 -0
- package/docs/reference/visual/background-origin.md +31 -0
- package/docs/reference/visual/background-position.md +45 -0
- package/docs/reference/visual/background-repeat.md +34 -0
- package/docs/reference/visual/background-size.md +39 -0
- package/docs/reference/visual/blend-modes.md +34 -0
- package/docs/reference/visual/border-radius.md +34 -0
- package/docs/reference/visual/border-style.md +33 -0
- package/docs/reference/visual/border-width.md +44 -0
- package/docs/reference/visual/border.md +43 -0
- package/docs/reference/visual/box-shadow.md +33 -0
- package/docs/reference/visual/caret-color.md +31 -0
- package/docs/reference/visual/color-scheme.md +31 -0
- package/docs/reference/visual/cursor.md +37 -0
- package/docs/reference/visual/field-sizing.md +30 -0
- package/docs/reference/visual/fill.md +38 -0
- package/docs/reference/visual/filter-blur.md +43 -0
- package/docs/reference/visual/filter-brightness.md +41 -0
- package/docs/reference/visual/filter-contrast.md +41 -0
- package/docs/reference/visual/filter-drop-shadow.md +42 -0
- package/docs/reference/visual/filter-grayscale.md +39 -0
- package/docs/reference/visual/filter-hue-rotate.md +39 -0
- package/docs/reference/visual/filter-invert.md +39 -0
- package/docs/reference/visual/filter-saturate.md +41 -0
- package/docs/reference/visual/filter-sepia.md +39 -0
- package/docs/reference/visual/font-family.md +31 -0
- package/docs/reference/visual/font-smoothing.md +30 -0
- package/docs/reference/visual/font-style.md +30 -0
- package/docs/reference/visual/font-variant-numeric.md +35 -0
- package/docs/reference/visual/font-weight.md +31 -0
- package/docs/reference/visual/forced-color-adjust.md +30 -0
- package/docs/reference/visual/hyphens.md +31 -0
- package/docs/reference/visual/letter-spacing.md +42 -0
- package/docs/reference/visual/line-clamp.md +40 -0
- package/docs/reference/visual/line-height.md +42 -0
- package/docs/reference/visual/list-style.md +34 -0
- package/docs/reference/visual/mask.md +39 -0
- package/docs/reference/visual/opacity.md +33 -0
- package/docs/reference/visual/outline.md +31 -0
- package/docs/reference/visual/pointer-events.md +30 -0
- package/docs/reference/visual/resize.md +32 -0
- package/docs/reference/visual/scroll-behavior.md +30 -0
- package/docs/reference/visual/scroll-margin.md +41 -0
- package/docs/reference/visual/scroll-padding.md +41 -0
- package/docs/reference/visual/scroll-snap-align.md +32 -0
- package/docs/reference/visual/scroll-snap-stop.md +30 -0
- package/docs/reference/visual/scroll-snap-type.md +34 -0
- package/docs/reference/visual/state-prefixes.md +37 -0
- package/docs/reference/visual/stroke-width.md +39 -0
- package/docs/reference/visual/stroke.md +38 -0
- package/docs/reference/visual/text-alignment.md +32 -0
- package/docs/reference/visual/text-color.md +41 -0
- package/docs/reference/visual/text-decoration.md +32 -0
- package/docs/reference/visual/text-indent.md +37 -0
- package/docs/reference/visual/text-overflow.md +31 -0
- package/docs/reference/visual/text-shadow.md +40 -0
- package/docs/reference/visual/text-size.md +32 -0
- package/docs/reference/visual/text-transform.md +32 -0
- package/docs/reference/visual/text-wrap.md +32 -0
- package/docs/reference/visual/touch-action.md +36 -0
- package/docs/reference/visual/transform-backface.md +30 -0
- package/docs/reference/visual/transform-origin.md +45 -0
- package/docs/reference/visual/transform-perspective-origin.md +45 -0
- package/docs/reference/visual/transform-perspective.md +43 -0
- package/docs/reference/visual/transform-rotate.md +40 -0
- package/docs/reference/visual/transform-scale.md +43 -0
- package/docs/reference/visual/transform-skew.md +40 -0
- package/docs/reference/visual/transform-style.md +30 -0
- package/docs/reference/visual/transform-translate.md +39 -0
- package/docs/reference/visual/transition-delay.md +41 -0
- package/docs/reference/visual/transition-duration.md +43 -0
- package/docs/reference/visual/transition-property.md +34 -0
- package/docs/reference/visual/transition-timing.md +40 -0
- package/docs/reference/visual/typography-keywords.md +81 -0
- package/docs/reference/visual/user-select.md +32 -0
- package/docs/reference/visual/vertical-align.md +36 -0
- package/docs/reference/visual/whitespace.md +34 -0
- package/docs/reference/visual/will-change.md +33 -0
- package/docs/reference/visual/word-break.md +32 -0
- package/docs/reference/visual.md +151 -154
- package/docs/syntax-reference.json +1973 -0
- package/package.json +10 -2
- package/playground/index.html +78 -0
- package/playground/jit-test.html +384 -0
- package/scripts/extract-syntax.js +152 -0
- package/scripts/generate-docs.js +352 -0
- package/src/cdn/jit.js +1436 -14
- package/src/cli/commands/build.js +5 -0
- package/src/cli/index.js +2 -0
- package/src/compiler/generators/css.js +1537 -25
- package/src/compiler/generators/preflight.js +379 -0
- package/src/config/defaults.js +19 -1
- package/src/definitions/index.js +153 -0
- package/src/definitions/layout-alignment.js +257 -0
- package/src/definitions/layout-flex.js +209 -0
- package/src/definitions/layout-grid.js +150 -0
- package/src/definitions/layout-positioning.js +89 -0
- package/src/definitions/layout-table.js +98 -0
- package/src/definitions/layout-utilities.js +262 -0
- package/src/definitions/layout.js +195 -0
- package/src/definitions/space.js +164 -0
- package/src/definitions/visual-backgrounds.js +423 -0
- package/src/definitions/visual-borders.js +111 -0
- package/src/definitions/visual-filters.js +204 -0
- package/src/definitions/visual-interactivity.js +292 -0
- package/src/definitions/visual-svg.js +80 -0
- package/src/definitions/visual-transform3d.js +159 -0
- package/src/definitions/visual-transforms.js +142 -0
- package/src/definitions/visual-transitions.js +277 -0
- package/src/definitions/visual-typography.js +386 -0
- package/src/definitions/visual.js +542 -0
- package/tests/helpers/test-utils.js +144 -0
- package/tests/integration/compiler.test.js +247 -0
- package/tests/sync/docs-sync.test.js +364 -0
- package/tests/unit/compiler/generators/css.test.js +719 -0
- package/tests/unit/compiler/parser.test.js +244 -0
- package/tests/unit/compiler/tokenizer.test.js +305 -0
- package/tests/unit/config/defaults.test.js +168 -0
- package/docs/.vitepress/cache/deps/_metadata.json +0 -31
- package/docs/.vitepress/cache/deps/chunk-LE5NDSFD.js +0 -12824
- package/docs/.vitepress/cache/deps/chunk-LE5NDSFD.js.map +0 -7
- package/docs/.vitepress/cache/deps/package.json +0 -3
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4505
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -9731
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
- package/docs/.vitepress/cache/deps/vue.js +0 -347
- package/docs/.vitepress/cache/deps/vue.js.map +0 -7
- package/docs/.vitepress/dist/404.html +0 -22
- package/docs/.vitepress/dist/assets/app.DBXoyO4w.js +0 -1
- package/docs/.vitepress/dist/assets/chunks/framework.I305HrzY.js +0 -19
- package/docs/.vitepress/dist/assets/chunks/theme.CaXH1t3X.js +0 -1
- package/docs/.vitepress/dist/assets/examples_cards.md.BCzaqSD6.js +0 -84
- package/docs/.vitepress/dist/assets/examples_cards.md.BCzaqSD6.lean.js +0 -1
- package/docs/.vitepress/dist/assets/examples_forms.md.DOjr9LrG.js +0 -169
- package/docs/.vitepress/dist/assets/examples_forms.md.DOjr9LrG.lean.js +0 -1
- package/docs/.vitepress/dist/assets/examples_hero.md.CAorji-Y.js +0 -118
- package/docs/.vitepress/dist/assets/examples_hero.md.CAorji-Y.lean.js +0 -1
- package/docs/.vitepress/dist/assets/examples_index.md.BjUNsTob.js +0 -52
- package/docs/.vitepress/dist/assets/examples_index.md.BjUNsTob.lean.js +0 -1
- package/docs/.vitepress/dist/assets/examples_navigation.md.DvL-Yv_5.js +0 -106
- package/docs/.vitepress/dist/assets/examples_navigation.md.DvL-Yv_5.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_cdn.md.Bbb7-icp.js +0 -30
- package/docs/.vitepress/dist/assets/guide_cdn.md.Bbb7-icp.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_cli.md.yLsOZ7NL.js +0 -44
- package/docs/.vitepress/dist/assets/guide_cli.md.yLsOZ7NL.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_configuration.md.DN4FfKw4.js +0 -79
- package/docs/.vitepress/dist/assets/guide_configuration.md.DN4FfKw4.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_dark-mode.md.D6UJvQtM.js +0 -69
- package/docs/.vitepress/dist/assets/guide_dark-mode.md.D6UJvQtM.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_getting-started.md.K5nA8wXY.js +0 -47
- package/docs/.vitepress/dist/assets/guide_getting-started.md.K5nA8wXY.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_index.md.B0lRU150.js +0 -3
- package/docs/.vitepress/dist/assets/guide_index.md.B0lRU150.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_natural-scale.md.vvauT7U1.js +0 -22
- package/docs/.vitepress/dist/assets/guide_natural-scale.md.vvauT7U1.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_philosophy.md.mOb9kp32.js +0 -7
- package/docs/.vitepress/dist/assets/guide_philosophy.md.mOb9kp32.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_responsive.md.C7cF-4cR.js +0 -57
- package/docs/.vitepress/dist/assets/guide_responsive.md.C7cF-4cR.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_states.md.CwtGEGHB.js +0 -77
- package/docs/.vitepress/dist/assets/guide_states.md.CwtGEGHB.lean.js +0 -1
- package/docs/.vitepress/dist/assets/guide_tri-attribute.md.CpjJLEMP.js +0 -45
- package/docs/.vitepress/dist/assets/guide_tri-attribute.md.CpjJLEMP.lean.js +0 -1
- package/docs/.vitepress/dist/assets/index.md.mYp6_S5X.js +0 -7
- package/docs/.vitepress/dist/assets/index.md.mYp6_S5X.lean.js +0 -1
- package/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/docs/.vitepress/dist/assets/ms_examples_cards.md.CaE5JNAs.js +0 -84
- package/docs/.vitepress/dist/assets/ms_examples_cards.md.CaE5JNAs.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_examples_forms.md.VvDzMzxF.js +0 -169
- package/docs/.vitepress/dist/assets/ms_examples_forms.md.VvDzMzxF.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_examples_hero.md.DC4c3kKW.js +0 -118
- package/docs/.vitepress/dist/assets/ms_examples_hero.md.DC4c3kKW.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_examples_index.md.C13ShcjA.js +0 -52
- package/docs/.vitepress/dist/assets/ms_examples_index.md.C13ShcjA.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_examples_navigation.md.BPtVjKbk.js +0 -106
- package/docs/.vitepress/dist/assets/ms_examples_navigation.md.BPtVjKbk.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_cdn.md.tZFpEjTS.js +0 -30
- package/docs/.vitepress/dist/assets/ms_guide_cdn.md.tZFpEjTS.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_cli.md.DBjxv3-o.js +0 -44
- package/docs/.vitepress/dist/assets/ms_guide_cli.md.DBjxv3-o.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_configuration.md.CyYNqREm.js +0 -79
- package/docs/.vitepress/dist/assets/ms_guide_configuration.md.CyYNqREm.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_dark-mode.md.DWDWvzzv.js +0 -69
- package/docs/.vitepress/dist/assets/ms_guide_dark-mode.md.DWDWvzzv.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_getting-started.md.WoQwRhlY.js +0 -47
- package/docs/.vitepress/dist/assets/ms_guide_getting-started.md.WoQwRhlY.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_index.md.pHpXZMmU.js +0 -3
- package/docs/.vitepress/dist/assets/ms_guide_index.md.pHpXZMmU.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_natural-scale.md.BiUfU-TH.js +0 -22
- package/docs/.vitepress/dist/assets/ms_guide_natural-scale.md.BiUfU-TH.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_philosophy.md.hf3SG2Ts.js +0 -7
- package/docs/.vitepress/dist/assets/ms_guide_philosophy.md.hf3SG2Ts.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_responsive.md.C4yS3zzM.js +0 -57
- package/docs/.vitepress/dist/assets/ms_guide_responsive.md.C4yS3zzM.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_states.md.DkDEjPdC.js +0 -77
- package/docs/.vitepress/dist/assets/ms_guide_states.md.DkDEjPdC.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_guide_tri-attribute.md.C3Es_V5J.js +0 -45
- package/docs/.vitepress/dist/assets/ms_guide_tri-attribute.md.C3Es_V5J.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_index.md.Bmo9il08.js +0 -7
- package/docs/.vitepress/dist/assets/ms_index.md.Bmo9il08.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_reference_breakpoints.md.DR7i_--b.js +0 -48
- package/docs/.vitepress/dist/assets/ms_reference_breakpoints.md.DR7i_--b.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_reference_colors.md.06ZYiMcJ.js +0 -17
- package/docs/.vitepress/dist/assets/ms_reference_colors.md.06ZYiMcJ.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_reference_layout.md.NGL6A5SR.js +0 -13
- package/docs/.vitepress/dist/assets/ms_reference_layout.md.NGL6A5SR.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_reference_space.md.BG5YQ-09.js +0 -24
- package/docs/.vitepress/dist/assets/ms_reference_space.md.BG5YQ-09.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_reference_spacing.md.XmXLLPOZ.js +0 -32
- package/docs/.vitepress/dist/assets/ms_reference_spacing.md.XmXLLPOZ.lean.js +0 -1
- package/docs/.vitepress/dist/assets/ms_reference_visual.md.BVOlkEqc.js +0 -22
- package/docs/.vitepress/dist/assets/ms_reference_visual.md.BVOlkEqc.lean.js +0 -1
- package/docs/.vitepress/dist/assets/reference_breakpoints.md.BRbG8Fzi.js +0 -48
- package/docs/.vitepress/dist/assets/reference_breakpoints.md.BRbG8Fzi.lean.js +0 -1
- package/docs/.vitepress/dist/assets/reference_colors.md.C7j7dSO1.js +0 -17
- package/docs/.vitepress/dist/assets/reference_colors.md.C7j7dSO1.lean.js +0 -1
- package/docs/.vitepress/dist/assets/reference_layout.md.BWJ5NxSp.js +0 -13
- package/docs/.vitepress/dist/assets/reference_layout.md.BWJ5NxSp.lean.js +0 -1
- package/docs/.vitepress/dist/assets/reference_space.md.DCsqfTWb.js +0 -24
- package/docs/.vitepress/dist/assets/reference_space.md.DCsqfTWb.lean.js +0 -1
- package/docs/.vitepress/dist/assets/reference_spacing.md.BInFD8gd.js +0 -32
- package/docs/.vitepress/dist/assets/reference_spacing.md.BInFD8gd.lean.js +0 -1
- package/docs/.vitepress/dist/assets/reference_visual.md.BRK7S9T1.js +0 -22
- package/docs/.vitepress/dist/assets/reference_visual.md.BRK7S9T1.lean.js +0 -1
- package/docs/.vitepress/dist/assets/style.D82StYDI.css +0 -1
- package/docs/.vitepress/dist/examples/cards.html +0 -108
- package/docs/.vitepress/dist/examples/forms.html +0 -193
- package/docs/.vitepress/dist/examples/hero.html +0 -142
- package/docs/.vitepress/dist/examples/index.html +0 -76
- package/docs/.vitepress/dist/examples/navigation.html +0 -130
- package/docs/.vitepress/dist/guide/cdn.html +0 -54
- package/docs/.vitepress/dist/guide/cli.html +0 -68
- package/docs/.vitepress/dist/guide/configuration.html +0 -103
- package/docs/.vitepress/dist/guide/dark-mode.html +0 -93
- package/docs/.vitepress/dist/guide/getting-started.html +0 -71
- package/docs/.vitepress/dist/guide/index.html +0 -27
- package/docs/.vitepress/dist/guide/natural-scale.html +0 -46
- package/docs/.vitepress/dist/guide/philosophy.html +0 -31
- package/docs/.vitepress/dist/guide/responsive.html +0 -81
- package/docs/.vitepress/dist/guide/states.html +0 -101
- package/docs/.vitepress/dist/guide/tri-attribute.html +0 -69
- package/docs/.vitepress/dist/hashmap.json +0 -1
- package/docs/.vitepress/dist/index.html +0 -31
- package/docs/.vitepress/dist/ms/examples/cards.html +0 -108
- package/docs/.vitepress/dist/ms/examples/forms.html +0 -193
- package/docs/.vitepress/dist/ms/examples/hero.html +0 -142
- package/docs/.vitepress/dist/ms/examples/index.html +0 -76
- package/docs/.vitepress/dist/ms/examples/navigation.html +0 -130
- package/docs/.vitepress/dist/ms/guide/cdn.html +0 -54
- package/docs/.vitepress/dist/ms/guide/cli.html +0 -68
- package/docs/.vitepress/dist/ms/guide/configuration.html +0 -103
- package/docs/.vitepress/dist/ms/guide/dark-mode.html +0 -93
- package/docs/.vitepress/dist/ms/guide/getting-started.html +0 -71
- package/docs/.vitepress/dist/ms/guide/index.html +0 -27
- package/docs/.vitepress/dist/ms/guide/natural-scale.html +0 -46
- package/docs/.vitepress/dist/ms/guide/philosophy.html +0 -31
- package/docs/.vitepress/dist/ms/guide/responsive.html +0 -81
- package/docs/.vitepress/dist/ms/guide/states.html +0 -101
- package/docs/.vitepress/dist/ms/guide/tri-attribute.html +0 -69
- package/docs/.vitepress/dist/ms/index.html +0 -31
- package/docs/.vitepress/dist/ms/reference/breakpoints.html +0 -72
- package/docs/.vitepress/dist/ms/reference/colors.html +0 -41
- package/docs/.vitepress/dist/ms/reference/layout.html +0 -37
- package/docs/.vitepress/dist/ms/reference/space.html +0 -48
- package/docs/.vitepress/dist/ms/reference/spacing.html +0 -56
- package/docs/.vitepress/dist/ms/reference/visual.html +0 -46
- package/docs/.vitepress/dist/reference/breakpoints.html +0 -72
- package/docs/.vitepress/dist/reference/colors.html +0 -41
- package/docs/.vitepress/dist/reference/layout.html +0 -37
- package/docs/.vitepress/dist/reference/space.html +0 -48
- package/docs/.vitepress/dist/reference/spacing.html +0 -56
- package/docs/.vitepress/dist/reference/visual.html +0 -46
- package/docs/.vitepress/dist/vp-icons.css +0 -1
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Generates CSS from tokens using attribute selectors
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { generatePreflight } from './preflight.js';
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* Generate CSS custom properties from config
|
|
8
10
|
* @param {Object} config - Configuration object
|
|
@@ -55,23 +57,43 @@ export function generateCSSVariables(config) {
|
|
|
55
57
|
* Generate CSS rule for a layout token
|
|
56
58
|
*/
|
|
57
59
|
function generateLayoutRule(token, config) {
|
|
58
|
-
const { property, value } = token;
|
|
60
|
+
const { property, value, isArbitrary } = token;
|
|
59
61
|
|
|
60
62
|
const layoutMap = {
|
|
61
63
|
// Display
|
|
62
64
|
'flex': 'display: flex;',
|
|
63
65
|
'grid': 'display: grid;',
|
|
66
|
+
'inline-flex': 'display: inline-flex;',
|
|
67
|
+
'inline-grid': 'display: inline-grid;',
|
|
64
68
|
'block': 'display: block;',
|
|
65
69
|
'inline': 'display: inline-block;',
|
|
66
70
|
'hidden': 'display: none;',
|
|
67
71
|
|
|
68
|
-
// Flex
|
|
72
|
+
// Flex Direction
|
|
69
73
|
'row': 'flex-direction: row;',
|
|
70
74
|
'col': 'flex-direction: column;',
|
|
71
75
|
'row-reverse': 'flex-direction: row-reverse;',
|
|
72
76
|
'col-reverse': 'flex-direction: column-reverse;',
|
|
73
77
|
|
|
74
|
-
//
|
|
78
|
+
// Flex Wrap
|
|
79
|
+
'wrap': 'flex-wrap: wrap;',
|
|
80
|
+
'nowrap': 'flex-wrap: nowrap;',
|
|
81
|
+
'wrap-reverse': 'flex-wrap: wrap-reverse;',
|
|
82
|
+
|
|
83
|
+
// Flex Item
|
|
84
|
+
'grow': 'flex-grow: 1;',
|
|
85
|
+
'grow-0': 'flex-grow: 0;',
|
|
86
|
+
'shrink': 'flex-shrink: 1;',
|
|
87
|
+
'shrink-0': 'flex-shrink: 0;',
|
|
88
|
+
|
|
89
|
+
// Grid Auto Flow
|
|
90
|
+
'grid-flow-row': 'grid-auto-flow: row;',
|
|
91
|
+
'grid-flow-col': 'grid-auto-flow: column;',
|
|
92
|
+
'grid-flow-dense': 'grid-auto-flow: dense;',
|
|
93
|
+
'grid-flow-row-dense': 'grid-auto-flow: row dense;',
|
|
94
|
+
'grid-flow-col-dense': 'grid-auto-flow: column dense;',
|
|
95
|
+
|
|
96
|
+
// Shorthand Alignment (backwards compat - simple keywords)
|
|
75
97
|
'center': 'justify-content: center; align-items: center;',
|
|
76
98
|
'start': 'justify-content: flex-start; align-items: flex-start;',
|
|
77
99
|
'end': 'justify-content: flex-end; align-items: flex-end;',
|
|
@@ -79,17 +101,144 @@ function generateLayoutRule(token, config) {
|
|
|
79
101
|
'around': 'justify-content: space-around;',
|
|
80
102
|
'evenly': 'justify-content: space-evenly;',
|
|
81
103
|
|
|
82
|
-
// Wrap
|
|
83
|
-
'wrap': 'flex-wrap: wrap;',
|
|
84
|
-
'nowrap': 'flex-wrap: nowrap;',
|
|
85
|
-
|
|
86
104
|
// Position
|
|
87
105
|
'absolute': 'position: absolute;',
|
|
88
106
|
'relative': 'position: relative;',
|
|
89
107
|
'fixed': 'position: fixed;',
|
|
90
|
-
'sticky': 'position: sticky;'
|
|
108
|
+
'sticky': 'position: sticky;',
|
|
109
|
+
'static': 'position: static;',
|
|
110
|
+
|
|
111
|
+
// Visibility
|
|
112
|
+
'visible': 'visibility: visible;',
|
|
113
|
+
'invisible': 'visibility: hidden;',
|
|
114
|
+
|
|
115
|
+
// Isolation
|
|
116
|
+
'isolate': 'isolation: isolate;',
|
|
117
|
+
'isolate-auto': 'isolation: auto;',
|
|
118
|
+
|
|
119
|
+
// Box Sizing
|
|
120
|
+
'box-border': 'box-sizing: border-box;',
|
|
121
|
+
'box-content': 'box-sizing: content-box;',
|
|
122
|
+
|
|
123
|
+
// Float
|
|
124
|
+
'float-left': 'float: left;',
|
|
125
|
+
'float-right': 'float: right;',
|
|
126
|
+
'float-none': 'float: none;',
|
|
127
|
+
|
|
128
|
+
// Clear
|
|
129
|
+
'clear-left': 'clear: left;',
|
|
130
|
+
'clear-right': 'clear: right;',
|
|
131
|
+
'clear-both': 'clear: both;',
|
|
132
|
+
'clear-none': 'clear: none;',
|
|
133
|
+
|
|
134
|
+
// Table - Border Collapse
|
|
135
|
+
'border-collapse': 'border-collapse: collapse;',
|
|
136
|
+
'border-separate': 'border-collapse: separate;',
|
|
137
|
+
|
|
138
|
+
// Table - Table Layout
|
|
139
|
+
'table-auto': 'table-layout: auto;',
|
|
140
|
+
'table-fixed': 'table-layout: fixed;',
|
|
141
|
+
|
|
142
|
+
// Table - Caption Side
|
|
143
|
+
'caption-top': 'caption-side: top;',
|
|
144
|
+
'caption-bottom': 'caption-side: bottom;',
|
|
145
|
+
|
|
146
|
+
// Container
|
|
147
|
+
'container': 'width: 100%; margin-left: auto; margin-right: auto;'
|
|
91
148
|
};
|
|
92
149
|
|
|
150
|
+
// Check for simple layout keywords first (property === value means it's a keyword like 'flex', 'grid', etc.)
|
|
151
|
+
if (property === value && layoutMap[property]) {
|
|
152
|
+
return layoutMap[property];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Justify Content (justify:[value])
|
|
156
|
+
if (property === 'justify') {
|
|
157
|
+
const justifyMap = {
|
|
158
|
+
'start': 'flex-start',
|
|
159
|
+
'end': 'flex-end',
|
|
160
|
+
'center': 'center',
|
|
161
|
+
'between': 'space-between',
|
|
162
|
+
'around': 'space-around',
|
|
163
|
+
'evenly': 'space-evenly',
|
|
164
|
+
'stretch': 'stretch'
|
|
165
|
+
};
|
|
166
|
+
return `justify-content: ${justifyMap[value] || value};`;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Justify Items (justify-items:[value])
|
|
170
|
+
if (property === 'justify-items') {
|
|
171
|
+
return `justify-items: ${value};`;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Justify Self (justify-self:[value])
|
|
175
|
+
if (property === 'justify-self') {
|
|
176
|
+
return `justify-self: ${value};`;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Align Content (content:[value])
|
|
180
|
+
if (property === 'content') {
|
|
181
|
+
const contentMap = {
|
|
182
|
+
'start': 'flex-start',
|
|
183
|
+
'end': 'flex-end',
|
|
184
|
+
'center': 'center',
|
|
185
|
+
'between': 'space-between',
|
|
186
|
+
'around': 'space-around',
|
|
187
|
+
'evenly': 'space-evenly',
|
|
188
|
+
'stretch': 'stretch'
|
|
189
|
+
};
|
|
190
|
+
return `align-content: ${contentMap[value] || value};`;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Align Items (items:[value])
|
|
194
|
+
if (property === 'items') {
|
|
195
|
+
const itemsMap = {
|
|
196
|
+
'start': 'flex-start',
|
|
197
|
+
'end': 'flex-end',
|
|
198
|
+
'center': 'center',
|
|
199
|
+
'baseline': 'baseline',
|
|
200
|
+
'stretch': 'stretch'
|
|
201
|
+
};
|
|
202
|
+
return `align-items: ${itemsMap[value] || value};`;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Align Self (self:[value])
|
|
206
|
+
if (property === 'self') {
|
|
207
|
+
const selfMap = {
|
|
208
|
+
'auto': 'auto',
|
|
209
|
+
'start': 'flex-start',
|
|
210
|
+
'end': 'flex-end',
|
|
211
|
+
'center': 'center',
|
|
212
|
+
'baseline': 'baseline',
|
|
213
|
+
'stretch': 'stretch'
|
|
214
|
+
};
|
|
215
|
+
return `align-self: ${selfMap[value] || value};`;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Place Content (place-content:[value])
|
|
219
|
+
if (property === 'place-content') {
|
|
220
|
+
const placeContentMap = {
|
|
221
|
+
'start': 'start',
|
|
222
|
+
'end': 'end',
|
|
223
|
+
'center': 'center',
|
|
224
|
+
'between': 'space-between',
|
|
225
|
+
'around': 'space-around',
|
|
226
|
+
'evenly': 'space-evenly',
|
|
227
|
+
'stretch': 'stretch'
|
|
228
|
+
};
|
|
229
|
+
return `place-content: ${placeContentMap[value] || value};`;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Place Items (place-items:[value])
|
|
233
|
+
if (property === 'place-items') {
|
|
234
|
+
return `place-items: ${value};`;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Place Self (place-self:[value])
|
|
238
|
+
if (property === 'place-self') {
|
|
239
|
+
return `place-self: ${value};`;
|
|
240
|
+
}
|
|
241
|
+
|
|
93
242
|
// Z-index
|
|
94
243
|
if (property === 'z') {
|
|
95
244
|
return `z-index: var(--z-${value});`;
|
|
@@ -100,6 +249,207 @@ function generateLayoutRule(token, config) {
|
|
|
100
249
|
return `overflow: ${value};`;
|
|
101
250
|
}
|
|
102
251
|
|
|
252
|
+
// Overflow X/Y
|
|
253
|
+
if (property === 'overflow-x') {
|
|
254
|
+
return `overflow-x: ${value};`;
|
|
255
|
+
}
|
|
256
|
+
if (property === 'overflow-y') {
|
|
257
|
+
return `overflow-y: ${value};`;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Aspect Ratio
|
|
261
|
+
if (property === 'aspect') {
|
|
262
|
+
const aspectMap = {
|
|
263
|
+
'square': '1 / 1',
|
|
264
|
+
'video': '16 / 9',
|
|
265
|
+
'auto': 'auto'
|
|
266
|
+
};
|
|
267
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (aspectMap[value] || value);
|
|
268
|
+
return `aspect-ratio: ${cssValue};`;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Object Fit
|
|
272
|
+
if (property === 'object') {
|
|
273
|
+
return `object-fit: ${value};`;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Object Position
|
|
277
|
+
if (property === 'object-pos') {
|
|
278
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : value;
|
|
279
|
+
return `object-position: ${cssValue};`;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// Inset (all sides)
|
|
283
|
+
if (property === 'inset') {
|
|
284
|
+
const cssValue = isArbitrary ? value : (value === '0' ? '0' : `var(--s-${value})`);
|
|
285
|
+
return `inset: ${cssValue};`;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Individual positioning: top, right, bottom, left
|
|
289
|
+
if (['top', 'right', 'bottom', 'left'].includes(property)) {
|
|
290
|
+
const cssValue = isArbitrary ? value : (value === '0' ? '0' : `var(--s-${value})`);
|
|
291
|
+
return `${property}: ${cssValue};`;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Inset X (left + right)
|
|
295
|
+
if (property === 'inset-x') {
|
|
296
|
+
const cssValue = isArbitrary ? value : (value === '0' ? '0' : `var(--s-${value})`);
|
|
297
|
+
return `left: ${cssValue}; right: ${cssValue};`;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Inset Y (top + bottom)
|
|
301
|
+
if (property === 'inset-y') {
|
|
302
|
+
const cssValue = isArbitrary ? value : (value === '0' ? '0' : `var(--s-${value})`);
|
|
303
|
+
return `top: ${cssValue}; bottom: ${cssValue};`;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// Columns
|
|
307
|
+
if (property === 'cols') {
|
|
308
|
+
return `columns: ${value};`;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Overscroll Behavior
|
|
312
|
+
if (property === 'overscroll') {
|
|
313
|
+
return `overscroll-behavior: ${value};`;
|
|
314
|
+
}
|
|
315
|
+
if (property === 'overscroll-x') {
|
|
316
|
+
return `overscroll-behavior-x: ${value};`;
|
|
317
|
+
}
|
|
318
|
+
if (property === 'overscroll-y') {
|
|
319
|
+
return `overscroll-behavior-y: ${value};`;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// Flex Basis
|
|
323
|
+
if (property === 'basis') {
|
|
324
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
325
|
+
return `flex-basis: ${cssValue};`;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// Flex (shorthand)
|
|
329
|
+
if (property === 'flex') {
|
|
330
|
+
const flexPresets = {
|
|
331
|
+
'1': '1 1 0%',
|
|
332
|
+
'auto': '1 1 auto',
|
|
333
|
+
'initial': '0 1 auto',
|
|
334
|
+
'none': 'none'
|
|
335
|
+
};
|
|
336
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (flexPresets[value] || value);
|
|
337
|
+
return `flex: ${cssValue};`;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Order
|
|
341
|
+
if (property === 'order') {
|
|
342
|
+
const orderPresets = {
|
|
343
|
+
'first': '-9999',
|
|
344
|
+
'last': '9999',
|
|
345
|
+
'none': '0'
|
|
346
|
+
};
|
|
347
|
+
const cssValue = orderPresets[value] || value;
|
|
348
|
+
return `order: ${cssValue};`;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Grid Template Columns
|
|
352
|
+
if (property === 'grid-cols') {
|
|
353
|
+
if (value === 'none') {
|
|
354
|
+
return 'grid-template-columns: none;';
|
|
355
|
+
}
|
|
356
|
+
if (value === 'subgrid') {
|
|
357
|
+
return 'grid-template-columns: subgrid;';
|
|
358
|
+
}
|
|
359
|
+
if (isArbitrary) {
|
|
360
|
+
return `grid-template-columns: ${value.replace(/_/g, ' ')};`;
|
|
361
|
+
}
|
|
362
|
+
return `grid-template-columns: repeat(${value}, minmax(0, 1fr));`;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Grid Template Rows
|
|
366
|
+
if (property === 'grid-rows') {
|
|
367
|
+
if (value === 'none') {
|
|
368
|
+
return 'grid-template-rows: none;';
|
|
369
|
+
}
|
|
370
|
+
if (value === 'subgrid') {
|
|
371
|
+
return 'grid-template-rows: subgrid;';
|
|
372
|
+
}
|
|
373
|
+
if (isArbitrary) {
|
|
374
|
+
return `grid-template-rows: ${value.replace(/_/g, ' ')};`;
|
|
375
|
+
}
|
|
376
|
+
return `grid-template-rows: repeat(${value}, minmax(0, 1fr));`;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// Grid Column Span
|
|
380
|
+
if (property === 'col-span') {
|
|
381
|
+
if (value === 'full') {
|
|
382
|
+
return 'grid-column: 1 / -1;';
|
|
383
|
+
}
|
|
384
|
+
return `grid-column: span ${value} / span ${value};`;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// Grid Column Start/End
|
|
388
|
+
if (property === 'col-start') {
|
|
389
|
+
return `grid-column-start: ${value};`;
|
|
390
|
+
}
|
|
391
|
+
if (property === 'col-end') {
|
|
392
|
+
return `grid-column-end: ${value};`;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// Grid Row Span
|
|
396
|
+
if (property === 'row-span') {
|
|
397
|
+
if (value === 'full') {
|
|
398
|
+
return 'grid-row: 1 / -1;';
|
|
399
|
+
}
|
|
400
|
+
return `grid-row: span ${value} / span ${value};`;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// Grid Row Start/End
|
|
404
|
+
if (property === 'row-start') {
|
|
405
|
+
return `grid-row-start: ${value};`;
|
|
406
|
+
}
|
|
407
|
+
if (property === 'row-end') {
|
|
408
|
+
return `grid-row-end: ${value};`;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// Grid Auto Columns
|
|
412
|
+
if (property === 'auto-cols') {
|
|
413
|
+
const autoPresets = {
|
|
414
|
+
'auto': 'auto',
|
|
415
|
+
'min': 'min-content',
|
|
416
|
+
'max': 'max-content',
|
|
417
|
+
'fr': 'minmax(0, 1fr)'
|
|
418
|
+
};
|
|
419
|
+
const cssValue = isArbitrary ? value : (autoPresets[value] || value);
|
|
420
|
+
return `grid-auto-columns: ${cssValue};`;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// Grid Auto Rows
|
|
424
|
+
if (property === 'auto-rows') {
|
|
425
|
+
const autoPresets = {
|
|
426
|
+
'auto': 'auto',
|
|
427
|
+
'min': 'min-content',
|
|
428
|
+
'max': 'max-content',
|
|
429
|
+
'fr': 'minmax(0, 1fr)'
|
|
430
|
+
};
|
|
431
|
+
const cssValue = isArbitrary ? value : (autoPresets[value] || value);
|
|
432
|
+
return `grid-auto-rows: ${cssValue};`;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// Border Spacing (for tables)
|
|
436
|
+
if (property === 'border-spacing') {
|
|
437
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
438
|
+
return `border-spacing: ${cssValue};`;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// Border Spacing X (horizontal)
|
|
442
|
+
if (property === 'border-spacing-x') {
|
|
443
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
444
|
+
return `border-spacing: ${cssValue} 0;`;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// Border Spacing Y (vertical)
|
|
448
|
+
if (property === 'border-spacing-y') {
|
|
449
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
450
|
+
return `border-spacing: 0 ${cssValue};`;
|
|
451
|
+
}
|
|
452
|
+
|
|
103
453
|
return layoutMap[property] || '';
|
|
104
454
|
}
|
|
105
455
|
|
|
@@ -171,33 +521,288 @@ function generateSpaceRule(token, config) {
|
|
|
171
521
|
function generateVisualRule(token, config) {
|
|
172
522
|
const { property, value, isArbitrary } = token;
|
|
173
523
|
|
|
524
|
+
// Static typography keywords
|
|
525
|
+
const typographyKeywords = {
|
|
526
|
+
// Font Style
|
|
527
|
+
'italic': 'font-style: italic;',
|
|
528
|
+
'not-italic': 'font-style: normal;',
|
|
529
|
+
|
|
530
|
+
// Font Stretch
|
|
531
|
+
'font-stretch-condensed': 'font-stretch: condensed;',
|
|
532
|
+
'font-stretch-expanded': 'font-stretch: expanded;',
|
|
533
|
+
'font-stretch-normal': 'font-stretch: normal;',
|
|
534
|
+
|
|
535
|
+
// Font Smoothing
|
|
536
|
+
'antialiased': '-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;',
|
|
537
|
+
'subpixel-antialiased': '-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;',
|
|
538
|
+
|
|
539
|
+
// Font Variant Numeric
|
|
540
|
+
'normal-nums': 'font-variant-numeric: normal;',
|
|
541
|
+
'ordinal': 'font-variant-numeric: ordinal;',
|
|
542
|
+
'slashed-zero': 'font-variant-numeric: slashed-zero;',
|
|
543
|
+
'lining-nums': 'font-variant-numeric: lining-nums;',
|
|
544
|
+
'oldstyle-nums': 'font-variant-numeric: oldstyle-nums;',
|
|
545
|
+
'proportional-nums': 'font-variant-numeric: proportional-nums;',
|
|
546
|
+
'tabular-nums': 'font-variant-numeric: tabular-nums;',
|
|
547
|
+
|
|
548
|
+
// Text Transform
|
|
549
|
+
'uppercase': 'text-transform: uppercase;',
|
|
550
|
+
'lowercase': 'text-transform: lowercase;',
|
|
551
|
+
'capitalize': 'text-transform: capitalize;',
|
|
552
|
+
'normal-case': 'text-transform: none;',
|
|
553
|
+
|
|
554
|
+
// Text Decoration Line
|
|
555
|
+
'underline': 'text-decoration-line: underline;',
|
|
556
|
+
'overline': 'text-decoration-line: overline;',
|
|
557
|
+
'line-through': 'text-decoration-line: line-through;',
|
|
558
|
+
'no-underline': 'text-decoration-line: none;',
|
|
559
|
+
|
|
560
|
+
// Text Decoration Style
|
|
561
|
+
'decoration-solid': 'text-decoration-style: solid;',
|
|
562
|
+
'decoration-double': 'text-decoration-style: double;',
|
|
563
|
+
'decoration-dotted': 'text-decoration-style: dotted;',
|
|
564
|
+
'decoration-dashed': 'text-decoration-style: dashed;',
|
|
565
|
+
'decoration-wavy': 'text-decoration-style: wavy;',
|
|
566
|
+
|
|
567
|
+
// Text Overflow
|
|
568
|
+
'truncate': 'overflow: hidden; text-overflow: ellipsis; white-space: nowrap;',
|
|
569
|
+
'text-ellipsis': 'text-overflow: ellipsis;',
|
|
570
|
+
'text-clip': 'text-overflow: clip;',
|
|
571
|
+
|
|
572
|
+
// Text Wrap
|
|
573
|
+
'text-wrap': 'text-wrap: wrap;',
|
|
574
|
+
'text-nowrap': 'text-wrap: nowrap;',
|
|
575
|
+
'text-balance': 'text-wrap: balance;',
|
|
576
|
+
'text-pretty': 'text-wrap: pretty;',
|
|
577
|
+
|
|
578
|
+
// Whitespace
|
|
579
|
+
'whitespace-normal': 'white-space: normal;',
|
|
580
|
+
'whitespace-nowrap': 'white-space: nowrap;',
|
|
581
|
+
'whitespace-pre': 'white-space: pre;',
|
|
582
|
+
'whitespace-pre-line': 'white-space: pre-line;',
|
|
583
|
+
'whitespace-pre-wrap': 'white-space: pre-wrap;',
|
|
584
|
+
'whitespace-break-spaces': 'white-space: break-spaces;',
|
|
585
|
+
|
|
586
|
+
// Word Break
|
|
587
|
+
'break-normal': 'overflow-wrap: normal; word-break: normal;',
|
|
588
|
+
'break-words': 'overflow-wrap: break-word;',
|
|
589
|
+
'break-all': 'word-break: break-all;',
|
|
590
|
+
'break-keep': 'word-break: keep-all;',
|
|
591
|
+
|
|
592
|
+
// Hyphens
|
|
593
|
+
'hyphens-none': 'hyphens: none;',
|
|
594
|
+
'hyphens-manual': 'hyphens: manual;',
|
|
595
|
+
'hyphens-auto': 'hyphens: auto;',
|
|
596
|
+
|
|
597
|
+
// Vertical Align
|
|
598
|
+
'align-baseline': 'vertical-align: baseline;',
|
|
599
|
+
'align-top': 'vertical-align: top;',
|
|
600
|
+
'align-middle': 'vertical-align: middle;',
|
|
601
|
+
'align-bottom': 'vertical-align: bottom;',
|
|
602
|
+
'align-text-top': 'vertical-align: text-top;',
|
|
603
|
+
'align-text-bottom': 'vertical-align: text-bottom;',
|
|
604
|
+
'align-sub': 'vertical-align: sub;',
|
|
605
|
+
'align-super': 'vertical-align: super;',
|
|
606
|
+
|
|
607
|
+
// List Style Type
|
|
608
|
+
'list-none': 'list-style-type: none;',
|
|
609
|
+
'list-disc': 'list-style-type: disc;',
|
|
610
|
+
'list-decimal': 'list-style-type: decimal;',
|
|
611
|
+
'list-square': 'list-style-type: square;',
|
|
612
|
+
|
|
613
|
+
// List Style Position
|
|
614
|
+
'list-inside': 'list-style-position: inside;',
|
|
615
|
+
'list-outside': 'list-style-position: outside;'
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
// Check static keywords first
|
|
619
|
+
if (typographyKeywords[property]) {
|
|
620
|
+
return typographyKeywords[property];
|
|
621
|
+
}
|
|
622
|
+
|
|
174
623
|
const rules = {
|
|
175
|
-
// Background
|
|
624
|
+
// Background Color
|
|
176
625
|
'bg': () => {
|
|
177
626
|
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
178
627
|
return `background-color: ${cssValue};`;
|
|
179
628
|
},
|
|
180
629
|
|
|
630
|
+
// Background Image
|
|
631
|
+
'bg-image': () => {
|
|
632
|
+
const cssValue = isArbitrary ? value : `url(${value})`;
|
|
633
|
+
return `background-image: ${cssValue};`;
|
|
634
|
+
},
|
|
635
|
+
|
|
636
|
+
// Background Attachment
|
|
637
|
+
'bg-attachment': () => {
|
|
638
|
+
return `background-attachment: ${value};`;
|
|
639
|
+
},
|
|
640
|
+
|
|
641
|
+
// Background Clip
|
|
642
|
+
'bg-clip': () => {
|
|
643
|
+
const clipMap = {
|
|
644
|
+
'border': 'border-box',
|
|
645
|
+
'padding': 'padding-box',
|
|
646
|
+
'content': 'content-box',
|
|
647
|
+
'text': 'text'
|
|
648
|
+
};
|
|
649
|
+
const cssValue = clipMap[value] || value;
|
|
650
|
+
return `background-clip: ${cssValue};`;
|
|
651
|
+
},
|
|
652
|
+
|
|
653
|
+
// Background Origin
|
|
654
|
+
'bg-origin': () => {
|
|
655
|
+
const originMap = {
|
|
656
|
+
'border': 'border-box',
|
|
657
|
+
'padding': 'padding-box',
|
|
658
|
+
'content': 'content-box'
|
|
659
|
+
};
|
|
660
|
+
const cssValue = originMap[value] || value;
|
|
661
|
+
return `background-origin: ${cssValue};`;
|
|
662
|
+
},
|
|
663
|
+
|
|
664
|
+
// Background Position
|
|
665
|
+
'bg-position': () => {
|
|
666
|
+
const positionMap = {
|
|
667
|
+
'center': 'center',
|
|
668
|
+
'top': 'top',
|
|
669
|
+
'bottom': 'bottom',
|
|
670
|
+
'left': 'left',
|
|
671
|
+
'right': 'right',
|
|
672
|
+
'top-left': 'top left',
|
|
673
|
+
'top-right': 'top right',
|
|
674
|
+
'bottom-left': 'bottom left',
|
|
675
|
+
'bottom-right': 'bottom right'
|
|
676
|
+
};
|
|
677
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (positionMap[value] || value);
|
|
678
|
+
return `background-position: ${cssValue};`;
|
|
679
|
+
},
|
|
680
|
+
|
|
681
|
+
// Background Repeat
|
|
682
|
+
'bg-repeat': () => {
|
|
683
|
+
const repeatMap = {
|
|
684
|
+
'repeat': 'repeat',
|
|
685
|
+
'no-repeat': 'no-repeat',
|
|
686
|
+
'repeat-x': 'repeat-x',
|
|
687
|
+
'repeat-y': 'repeat-y',
|
|
688
|
+
'round': 'round',
|
|
689
|
+
'space': 'space'
|
|
690
|
+
};
|
|
691
|
+
const cssValue = repeatMap[value] || value;
|
|
692
|
+
return `background-repeat: ${cssValue};`;
|
|
693
|
+
},
|
|
694
|
+
|
|
695
|
+
// Background Size
|
|
696
|
+
'bg-size': () => {
|
|
697
|
+
const sizeMap = {
|
|
698
|
+
'auto': 'auto',
|
|
699
|
+
'cover': 'cover',
|
|
700
|
+
'contain': 'contain'
|
|
701
|
+
};
|
|
702
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (sizeMap[value] || value);
|
|
703
|
+
return `background-size: ${cssValue};`;
|
|
704
|
+
},
|
|
705
|
+
|
|
706
|
+
// Background Blend Mode
|
|
707
|
+
'bg-blend': () => {
|
|
708
|
+
return `background-blend-mode: ${value};`;
|
|
709
|
+
},
|
|
710
|
+
|
|
181
711
|
// Text color
|
|
182
712
|
'text': () => {
|
|
183
|
-
|
|
184
|
-
if (['left', 'center', 'right'].includes(value)) {
|
|
713
|
+
if (['left', 'center', 'right', 'justify'].includes(value)) {
|
|
185
714
|
return `text-align: ${value};`;
|
|
186
715
|
}
|
|
187
716
|
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
188
717
|
return `color: ${cssValue};`;
|
|
189
718
|
},
|
|
190
719
|
|
|
720
|
+
// Text Shadow
|
|
721
|
+
'text-shadow': () => {
|
|
722
|
+
const shadowPresets = {
|
|
723
|
+
'none': 'none',
|
|
724
|
+
'small': '0 1px 2px rgba(0,0,0,0.1)',
|
|
725
|
+
'medium': '0 2px 4px rgba(0,0,0,0.15)',
|
|
726
|
+
'big': '0 4px 8px rgba(0,0,0,0.2)'
|
|
727
|
+
};
|
|
728
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (shadowPresets[value] || value);
|
|
729
|
+
return `text-shadow: ${cssValue};`;
|
|
730
|
+
},
|
|
731
|
+
|
|
191
732
|
// Font size
|
|
192
733
|
'text-size': () => {
|
|
193
734
|
const cssValue = isArbitrary ? value : `var(--font-${value})`;
|
|
194
735
|
return `font-size: ${cssValue};`;
|
|
195
736
|
},
|
|
196
737
|
|
|
197
|
-
// Font weight
|
|
738
|
+
// Font weight / family
|
|
198
739
|
'font': () => {
|
|
199
|
-
const
|
|
200
|
-
|
|
740
|
+
const fontFamilies = {
|
|
741
|
+
'sans': 'ui-sans-serif, system-ui, sans-serif',
|
|
742
|
+
'serif': 'ui-serif, Georgia, serif',
|
|
743
|
+
'mono': 'ui-monospace, monospace'
|
|
744
|
+
};
|
|
745
|
+
if (fontFamilies[value]) {
|
|
746
|
+
return `font-family: ${fontFamilies[value]};`;
|
|
747
|
+
}
|
|
748
|
+
return `font-weight: var(--fw-${value});`;
|
|
749
|
+
},
|
|
750
|
+
|
|
751
|
+
// Letter spacing
|
|
752
|
+
'tracking': () => {
|
|
753
|
+
const trackingScale = {
|
|
754
|
+
'tighter': '-0.05em',
|
|
755
|
+
'tight': '-0.025em',
|
|
756
|
+
'normal': '0',
|
|
757
|
+
'wide': '0.025em',
|
|
758
|
+
'wider': '0.05em',
|
|
759
|
+
'widest': '0.1em'
|
|
760
|
+
};
|
|
761
|
+
const cssValue = isArbitrary ? value : (trackingScale[value] || value);
|
|
762
|
+
return `letter-spacing: ${cssValue};`;
|
|
763
|
+
},
|
|
764
|
+
|
|
765
|
+
// Line height
|
|
766
|
+
'leading': () => {
|
|
767
|
+
const leadingScale = {
|
|
768
|
+
'none': '1',
|
|
769
|
+
'tight': '1.25',
|
|
770
|
+
'snug': '1.375',
|
|
771
|
+
'normal': '1.5',
|
|
772
|
+
'relaxed': '1.625',
|
|
773
|
+
'loose': '2'
|
|
774
|
+
};
|
|
775
|
+
const cssValue = isArbitrary ? value : (leadingScale[value] || value);
|
|
776
|
+
return `line-height: ${cssValue};`;
|
|
777
|
+
},
|
|
778
|
+
|
|
779
|
+
// Line clamp
|
|
780
|
+
'line-clamp': () => {
|
|
781
|
+
return `overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${value};`;
|
|
782
|
+
},
|
|
783
|
+
|
|
784
|
+
// Text decoration color
|
|
785
|
+
'decoration': () => {
|
|
786
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
787
|
+
return `text-decoration-color: ${cssValue};`;
|
|
788
|
+
},
|
|
789
|
+
|
|
790
|
+
// Text decoration thickness
|
|
791
|
+
'decoration-thickness': () => {
|
|
792
|
+
const cssValue = isArbitrary ? value : `${value}px`;
|
|
793
|
+
return `text-decoration-thickness: ${cssValue};`;
|
|
794
|
+
},
|
|
795
|
+
|
|
796
|
+
// Underline offset
|
|
797
|
+
'underline-offset': () => {
|
|
798
|
+
const cssValue = isArbitrary ? value : `${value}px`;
|
|
799
|
+
return `text-underline-offset: ${cssValue};`;
|
|
800
|
+
},
|
|
801
|
+
|
|
802
|
+
// Text indent
|
|
803
|
+
'indent': () => {
|
|
804
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
805
|
+
return `text-indent: ${cssValue};`;
|
|
201
806
|
},
|
|
202
807
|
|
|
203
808
|
// Border color
|
|
@@ -206,28 +811,920 @@ function generateVisualRule(token, config) {
|
|
|
206
811
|
return `border-color: ${cssValue}; border-style: solid;`;
|
|
207
812
|
},
|
|
208
813
|
|
|
814
|
+
// Border color - directional
|
|
815
|
+
'border-t': () => {
|
|
816
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
817
|
+
return `border-top-color: ${cssValue}; border-top-style: solid;`;
|
|
818
|
+
},
|
|
819
|
+
'border-b': () => {
|
|
820
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
821
|
+
return `border-bottom-color: ${cssValue}; border-bottom-style: solid;`;
|
|
822
|
+
},
|
|
823
|
+
'border-l': () => {
|
|
824
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
825
|
+
return `border-left-color: ${cssValue}; border-left-style: solid;`;
|
|
826
|
+
},
|
|
827
|
+
'border-r': () => {
|
|
828
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
829
|
+
return `border-right-color: ${cssValue}; border-right-style: solid;`;
|
|
830
|
+
},
|
|
831
|
+
'border-x': () => {
|
|
832
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
833
|
+
return `border-left-color: ${cssValue}; border-right-color: ${cssValue}; border-left-style: solid; border-right-style: solid;`;
|
|
834
|
+
},
|
|
835
|
+
'border-y': () => {
|
|
836
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
837
|
+
return `border-top-color: ${cssValue}; border-bottom-color: ${cssValue}; border-top-style: solid; border-bottom-style: solid;`;
|
|
838
|
+
},
|
|
839
|
+
|
|
209
840
|
// Border width
|
|
210
841
|
'border-w': () => {
|
|
211
842
|
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
212
843
|
return `border-width: ${cssValue}; border-style: solid;`;
|
|
213
844
|
},
|
|
214
845
|
|
|
846
|
+
// Border width - directional
|
|
847
|
+
'border-t-w': () => {
|
|
848
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
849
|
+
return `border-top-width: ${cssValue}; border-top-style: solid;`;
|
|
850
|
+
},
|
|
851
|
+
'border-b-w': () => {
|
|
852
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
853
|
+
return `border-bottom-width: ${cssValue}; border-bottom-style: solid;`;
|
|
854
|
+
},
|
|
855
|
+
'border-l-w': () => {
|
|
856
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
857
|
+
return `border-left-width: ${cssValue}; border-left-style: solid;`;
|
|
858
|
+
},
|
|
859
|
+
'border-r-w': () => {
|
|
860
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
861
|
+
return `border-right-width: ${cssValue}; border-right-style: solid;`;
|
|
862
|
+
},
|
|
863
|
+
'border-x-w': () => {
|
|
864
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
865
|
+
return `border-left-width: ${cssValue}; border-right-width: ${cssValue}; border-left-style: solid; border-right-style: solid;`;
|
|
866
|
+
},
|
|
867
|
+
'border-y-w': () => {
|
|
868
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
869
|
+
return `border-top-width: ${cssValue}; border-bottom-width: ${cssValue}; border-top-style: solid; border-bottom-style: solid;`;
|
|
870
|
+
},
|
|
871
|
+
|
|
872
|
+
// Border style
|
|
873
|
+
'border-style': () => {
|
|
874
|
+
return `border-style: ${value};`;
|
|
875
|
+
},
|
|
876
|
+
|
|
215
877
|
// Border radius
|
|
216
878
|
'rounded': () => {
|
|
217
|
-
|
|
218
|
-
|
|
879
|
+
return `border-radius: var(--r-${value});`;
|
|
880
|
+
},
|
|
881
|
+
|
|
882
|
+
// Outline Width
|
|
883
|
+
'outline-w': () => {
|
|
884
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
885
|
+
return `outline-width: ${cssValue};`;
|
|
886
|
+
},
|
|
887
|
+
|
|
888
|
+
// Outline Color
|
|
889
|
+
'outline': () => {
|
|
890
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
891
|
+
return `outline-color: ${cssValue};`;
|
|
892
|
+
},
|
|
893
|
+
|
|
894
|
+
// Outline Style
|
|
895
|
+
'outline-style': () => {
|
|
896
|
+
return `outline-style: ${value};`;
|
|
897
|
+
},
|
|
898
|
+
|
|
899
|
+
// Outline Offset
|
|
900
|
+
'outline-offset': () => {
|
|
901
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
902
|
+
return `outline-offset: ${cssValue};`;
|
|
219
903
|
},
|
|
220
904
|
|
|
221
905
|
// Box shadow
|
|
222
906
|
'shadow': () => {
|
|
223
|
-
|
|
224
|
-
return `box-shadow: ${cssValue};`;
|
|
907
|
+
return `box-shadow: var(--shadow-${value});`;
|
|
225
908
|
},
|
|
226
909
|
|
|
227
910
|
// Opacity
|
|
228
911
|
'opacity': () => {
|
|
229
|
-
|
|
230
|
-
|
|
912
|
+
// Convert percentage (0-100) to decimal (0-1)
|
|
913
|
+
const numValue = parseInt(value, 10);
|
|
914
|
+
if (!isNaN(numValue) && numValue >= 0 && numValue <= 100) {
|
|
915
|
+
return `opacity: ${numValue / 100};`;
|
|
916
|
+
}
|
|
917
|
+
// For arbitrary values or already decimal, pass through
|
|
918
|
+
return `opacity: ${value};`;
|
|
919
|
+
},
|
|
920
|
+
|
|
921
|
+
// Mix Blend Mode
|
|
922
|
+
'mix-blend': () => {
|
|
923
|
+
return `mix-blend-mode: ${value};`;
|
|
924
|
+
},
|
|
925
|
+
|
|
926
|
+
// Mask Clip
|
|
927
|
+
'mask-clip': () => {
|
|
928
|
+
const clipMap = {
|
|
929
|
+
'border': 'border-box',
|
|
930
|
+
'padding': 'padding-box',
|
|
931
|
+
'content': 'content-box',
|
|
932
|
+
'text': 'text'
|
|
933
|
+
};
|
|
934
|
+
const cssValue = clipMap[value] || value;
|
|
935
|
+
return `mask-clip: ${cssValue};`;
|
|
936
|
+
},
|
|
937
|
+
|
|
938
|
+
// Mask Composite
|
|
939
|
+
'mask-composite': () => {
|
|
940
|
+
return `mask-composite: ${value};`;
|
|
941
|
+
},
|
|
942
|
+
|
|
943
|
+
// Mask Image
|
|
944
|
+
'mask-image': () => {
|
|
945
|
+
const cssValue = isArbitrary ? value : `url(${value})`;
|
|
946
|
+
return `mask-image: ${cssValue};`;
|
|
947
|
+
},
|
|
948
|
+
|
|
949
|
+
// Mask Mode
|
|
950
|
+
'mask-mode': () => {
|
|
951
|
+
return `mask-mode: ${value};`;
|
|
952
|
+
},
|
|
953
|
+
|
|
954
|
+
// Mask Origin
|
|
955
|
+
'mask-origin': () => {
|
|
956
|
+
const originMap = {
|
|
957
|
+
'border': 'border-box',
|
|
958
|
+
'padding': 'padding-box',
|
|
959
|
+
'content': 'content-box'
|
|
960
|
+
};
|
|
961
|
+
const cssValue = originMap[value] || value;
|
|
962
|
+
return `mask-origin: ${cssValue};`;
|
|
963
|
+
},
|
|
964
|
+
|
|
965
|
+
// Mask Position
|
|
966
|
+
'mask-position': () => {
|
|
967
|
+
const positionMap = {
|
|
968
|
+
'center': 'center',
|
|
969
|
+
'top': 'top',
|
|
970
|
+
'bottom': 'bottom',
|
|
971
|
+
'left': 'left',
|
|
972
|
+
'right': 'right',
|
|
973
|
+
'top-left': 'top left',
|
|
974
|
+
'top-right': 'top right',
|
|
975
|
+
'bottom-left': 'bottom left',
|
|
976
|
+
'bottom-right': 'bottom right'
|
|
977
|
+
};
|
|
978
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (positionMap[value] || value);
|
|
979
|
+
return `mask-position: ${cssValue};`;
|
|
980
|
+
},
|
|
981
|
+
|
|
982
|
+
// Mask Repeat
|
|
983
|
+
'mask-repeat': () => {
|
|
984
|
+
const repeatMap = {
|
|
985
|
+
'repeat': 'repeat',
|
|
986
|
+
'no-repeat': 'no-repeat',
|
|
987
|
+
'repeat-x': 'repeat-x',
|
|
988
|
+
'repeat-y': 'repeat-y',
|
|
989
|
+
'round': 'round',
|
|
990
|
+
'space': 'space'
|
|
991
|
+
};
|
|
992
|
+
const cssValue = repeatMap[value] || value;
|
|
993
|
+
return `mask-repeat: ${cssValue};`;
|
|
994
|
+
},
|
|
995
|
+
|
|
996
|
+
// Mask Size
|
|
997
|
+
'mask-size': () => {
|
|
998
|
+
const sizeMap = {
|
|
999
|
+
'auto': 'auto',
|
|
1000
|
+
'cover': 'cover',
|
|
1001
|
+
'contain': 'contain'
|
|
1002
|
+
};
|
|
1003
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (sizeMap[value] || value);
|
|
1004
|
+
return `mask-size: ${cssValue};`;
|
|
1005
|
+
},
|
|
1006
|
+
|
|
1007
|
+
// Mask Type
|
|
1008
|
+
'mask-type': () => {
|
|
1009
|
+
return `mask-type: ${value};`;
|
|
1010
|
+
},
|
|
1011
|
+
|
|
1012
|
+
// Content
|
|
1013
|
+
'content': () => {
|
|
1014
|
+
return `content: "${value}";`;
|
|
1015
|
+
},
|
|
1016
|
+
|
|
1017
|
+
// Filter utilities
|
|
1018
|
+
'blur': () => {
|
|
1019
|
+
const blurScale = {
|
|
1020
|
+
'none': '0',
|
|
1021
|
+
'tiny': '2px',
|
|
1022
|
+
'small': '4px',
|
|
1023
|
+
'medium': '8px',
|
|
1024
|
+
'big': '12px',
|
|
1025
|
+
'giant': '24px',
|
|
1026
|
+
'vast': '48px'
|
|
1027
|
+
};
|
|
1028
|
+
const cssValue = isArbitrary ? value : (blurScale[value] || blurScale['medium']);
|
|
1029
|
+
return `filter: blur(${cssValue});`;
|
|
1030
|
+
},
|
|
1031
|
+
|
|
1032
|
+
'brightness': () => {
|
|
1033
|
+
const brightnessScale = {
|
|
1034
|
+
'dim': 0.5,
|
|
1035
|
+
'dark': 0.75,
|
|
1036
|
+
'normal': 1,
|
|
1037
|
+
'bright': 1.25,
|
|
1038
|
+
'vivid': 1.5
|
|
1039
|
+
};
|
|
1040
|
+
const cssValue = isArbitrary ? value : (brightnessScale[value] || brightnessScale['normal']);
|
|
1041
|
+
return `filter: brightness(${cssValue});`;
|
|
1042
|
+
},
|
|
1043
|
+
|
|
1044
|
+
'contrast': () => {
|
|
1045
|
+
const contrastScale = {
|
|
1046
|
+
'low': 0.5,
|
|
1047
|
+
'reduced': 0.75,
|
|
1048
|
+
'normal': 1,
|
|
1049
|
+
'high': 1.25,
|
|
1050
|
+
'max': 1.5
|
|
1051
|
+
};
|
|
1052
|
+
const cssValue = isArbitrary ? value : (contrastScale[value] || contrastScale['normal']);
|
|
1053
|
+
return `filter: contrast(${cssValue});`;
|
|
1054
|
+
},
|
|
1055
|
+
|
|
1056
|
+
'drop-shadow': () => {
|
|
1057
|
+
const shadowPresets = {
|
|
1058
|
+
'none': 'none',
|
|
1059
|
+
'tiny': '0 1px 1px rgba(0,0,0,0.05)',
|
|
1060
|
+
'small': '0 1px 2px rgba(0,0,0,0.1), 0 1px 1px rgba(0,0,0,0.06)',
|
|
1061
|
+
'medium': '0 4px 3px rgba(0,0,0,0.07), 0 2px 2px rgba(0,0,0,0.06)',
|
|
1062
|
+
'big': '0 10px 8px rgba(0,0,0,0.04), 0 4px 3px rgba(0,0,0,0.1)',
|
|
1063
|
+
'giant': '0 20px 13px rgba(0,0,0,0.03), 0 8px 5px rgba(0,0,0,0.08)'
|
|
1064
|
+
};
|
|
1065
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (shadowPresets[value] || shadowPresets['medium']);
|
|
1066
|
+
return `filter: drop-shadow(${cssValue});`;
|
|
1067
|
+
},
|
|
1068
|
+
|
|
1069
|
+
'grayscale': () => {
|
|
1070
|
+
const grayscaleScale = {
|
|
1071
|
+
'none': '0%',
|
|
1072
|
+
'partial': '50%',
|
|
1073
|
+
'full': '100%'
|
|
1074
|
+
};
|
|
1075
|
+
const cssValue = isArbitrary ? value : (grayscaleScale[value] || grayscaleScale['full']);
|
|
1076
|
+
return `filter: grayscale(${cssValue});`;
|
|
1077
|
+
},
|
|
1078
|
+
|
|
1079
|
+
'hue-rotate': () => {
|
|
1080
|
+
const cssValue = isArbitrary ? value : `${value}deg`;
|
|
1081
|
+
return `filter: hue-rotate(${cssValue});`;
|
|
1082
|
+
},
|
|
1083
|
+
|
|
1084
|
+
'invert': () => {
|
|
1085
|
+
const invertScale = {
|
|
1086
|
+
'none': '0%',
|
|
1087
|
+
'partial': '50%',
|
|
1088
|
+
'full': '100%'
|
|
1089
|
+
};
|
|
1090
|
+
const cssValue = isArbitrary ? value : (invertScale[value] || invertScale['full']);
|
|
1091
|
+
return `filter: invert(${cssValue});`;
|
|
1092
|
+
},
|
|
1093
|
+
|
|
1094
|
+
'saturate': () => {
|
|
1095
|
+
const saturateScale = {
|
|
1096
|
+
'none': 0,
|
|
1097
|
+
'low': 0.5,
|
|
1098
|
+
'normal': 1,
|
|
1099
|
+
'high': 1.5,
|
|
1100
|
+
'vivid': 2
|
|
1101
|
+
};
|
|
1102
|
+
const cssValue = isArbitrary ? value : (saturateScale[value] || saturateScale['normal']);
|
|
1103
|
+
return `filter: saturate(${cssValue});`;
|
|
1104
|
+
},
|
|
1105
|
+
|
|
1106
|
+
'sepia': () => {
|
|
1107
|
+
const sepiaScale = {
|
|
1108
|
+
'none': '0%',
|
|
1109
|
+
'partial': '50%',
|
|
1110
|
+
'full': '100%'
|
|
1111
|
+
};
|
|
1112
|
+
const cssValue = isArbitrary ? value : (sepiaScale[value] || sepiaScale['full']);
|
|
1113
|
+
return `filter: sepia(${cssValue});`;
|
|
1114
|
+
},
|
|
1115
|
+
|
|
1116
|
+
// Backdrop Filter utilities
|
|
1117
|
+
'backdrop-blur': () => {
|
|
1118
|
+
const blurScale = {
|
|
1119
|
+
'none': '0',
|
|
1120
|
+
'tiny': '2px',
|
|
1121
|
+
'small': '4px',
|
|
1122
|
+
'medium': '8px',
|
|
1123
|
+
'big': '12px',
|
|
1124
|
+
'giant': '24px',
|
|
1125
|
+
'vast': '48px'
|
|
1126
|
+
};
|
|
1127
|
+
const cssValue = isArbitrary ? value : (blurScale[value] || blurScale['medium']);
|
|
1128
|
+
return `backdrop-filter: blur(${cssValue});`;
|
|
1129
|
+
},
|
|
1130
|
+
|
|
1131
|
+
'backdrop-brightness': () => {
|
|
1132
|
+
const brightnessScale = {
|
|
1133
|
+
'dim': 0.5,
|
|
1134
|
+
'dark': 0.75,
|
|
1135
|
+
'normal': 1,
|
|
1136
|
+
'bright': 1.25,
|
|
1137
|
+
'vivid': 1.5
|
|
1138
|
+
};
|
|
1139
|
+
const cssValue = isArbitrary ? value : (brightnessScale[value] || brightnessScale['normal']);
|
|
1140
|
+
return `backdrop-filter: brightness(${cssValue});`;
|
|
1141
|
+
},
|
|
1142
|
+
|
|
1143
|
+
'backdrop-contrast': () => {
|
|
1144
|
+
const contrastScale = {
|
|
1145
|
+
'low': 0.5,
|
|
1146
|
+
'reduced': 0.75,
|
|
1147
|
+
'normal': 1,
|
|
1148
|
+
'high': 1.25,
|
|
1149
|
+
'max': 1.5
|
|
1150
|
+
};
|
|
1151
|
+
const cssValue = isArbitrary ? value : (contrastScale[value] || contrastScale['normal']);
|
|
1152
|
+
return `backdrop-filter: contrast(${cssValue});`;
|
|
1153
|
+
},
|
|
1154
|
+
|
|
1155
|
+
'backdrop-grayscale': () => {
|
|
1156
|
+
const grayscaleScale = {
|
|
1157
|
+
'none': '0%',
|
|
1158
|
+
'partial': '50%',
|
|
1159
|
+
'full': '100%'
|
|
1160
|
+
};
|
|
1161
|
+
const cssValue = isArbitrary ? value : (grayscaleScale[value] || grayscaleScale['full']);
|
|
1162
|
+
return `backdrop-filter: grayscale(${cssValue});`;
|
|
1163
|
+
},
|
|
1164
|
+
|
|
1165
|
+
'backdrop-hue-rotate': () => {
|
|
1166
|
+
const cssValue = isArbitrary ? value : `${value}deg`;
|
|
1167
|
+
return `backdrop-filter: hue-rotate(${cssValue});`;
|
|
1168
|
+
},
|
|
1169
|
+
|
|
1170
|
+
'backdrop-invert': () => {
|
|
1171
|
+
const invertScale = {
|
|
1172
|
+
'none': '0%',
|
|
1173
|
+
'partial': '50%',
|
|
1174
|
+
'full': '100%'
|
|
1175
|
+
};
|
|
1176
|
+
const cssValue = isArbitrary ? value : (invertScale[value] || invertScale['full']);
|
|
1177
|
+
return `backdrop-filter: invert(${cssValue});`;
|
|
1178
|
+
},
|
|
1179
|
+
|
|
1180
|
+
'backdrop-opacity': () => {
|
|
1181
|
+
const opacityScale = {
|
|
1182
|
+
'invisible': 0,
|
|
1183
|
+
'faint': 0.25,
|
|
1184
|
+
'half': 0.5,
|
|
1185
|
+
'visible': 0.75,
|
|
1186
|
+
'solid': 1
|
|
1187
|
+
};
|
|
1188
|
+
const cssValue = isArbitrary ? value : (opacityScale[value] || opacityScale['solid']);
|
|
1189
|
+
return `backdrop-filter: opacity(${cssValue});`;
|
|
1190
|
+
},
|
|
1191
|
+
|
|
1192
|
+
'backdrop-saturate': () => {
|
|
1193
|
+
const saturateScale = {
|
|
1194
|
+
'none': 0,
|
|
1195
|
+
'low': 0.5,
|
|
1196
|
+
'normal': 1,
|
|
1197
|
+
'high': 1.5,
|
|
1198
|
+
'vivid': 2
|
|
1199
|
+
};
|
|
1200
|
+
const cssValue = isArbitrary ? value : (saturateScale[value] || saturateScale['normal']);
|
|
1201
|
+
return `backdrop-filter: saturate(${cssValue});`;
|
|
1202
|
+
},
|
|
1203
|
+
|
|
1204
|
+
'backdrop-sepia': () => {
|
|
1205
|
+
const sepiaScale = {
|
|
1206
|
+
'none': '0%',
|
|
1207
|
+
'partial': '50%',
|
|
1208
|
+
'full': '100%'
|
|
1209
|
+
};
|
|
1210
|
+
const cssValue = isArbitrary ? value : (sepiaScale[value] || sepiaScale['full']);
|
|
1211
|
+
return `backdrop-filter: sepia(${cssValue});`;
|
|
1212
|
+
},
|
|
1213
|
+
|
|
1214
|
+
// =====================
|
|
1215
|
+
// TRANSITION UTILITIES
|
|
1216
|
+
// =====================
|
|
1217
|
+
|
|
1218
|
+
// Transition Property
|
|
1219
|
+
'transition': () => {
|
|
1220
|
+
const transitionPresets = {
|
|
1221
|
+
'none': 'none',
|
|
1222
|
+
'all': 'all',
|
|
1223
|
+
'DEFAULT': 'color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
|
|
1224
|
+
'colors': 'color, background-color, border-color, text-decoration-color, fill, stroke',
|
|
1225
|
+
'opacity': 'opacity',
|
|
1226
|
+
'shadow': 'box-shadow',
|
|
1227
|
+
'transform': 'transform'
|
|
1228
|
+
};
|
|
1229
|
+
const prop = transitionPresets[value] || transitionPresets['DEFAULT'];
|
|
1230
|
+
return `transition-property: ${prop}; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;`;
|
|
1231
|
+
},
|
|
1232
|
+
|
|
1233
|
+
'transition-none': () => {
|
|
1234
|
+
return 'transition-property: none;';
|
|
1235
|
+
},
|
|
1236
|
+
|
|
1237
|
+
// Transition Duration
|
|
1238
|
+
'duration': () => {
|
|
1239
|
+
const durationScale = {
|
|
1240
|
+
'instant': '75ms',
|
|
1241
|
+
'quick': '100ms',
|
|
1242
|
+
'fast': '150ms',
|
|
1243
|
+
'normal': '200ms',
|
|
1244
|
+
'slow': '300ms',
|
|
1245
|
+
'slower': '500ms',
|
|
1246
|
+
'lazy': '700ms'
|
|
1247
|
+
};
|
|
1248
|
+
const cssValue = isArbitrary ? value : (durationScale[value] || durationScale['normal']);
|
|
1249
|
+
return `transition-duration: ${cssValue};`;
|
|
1250
|
+
},
|
|
1251
|
+
|
|
1252
|
+
// Transition Timing Function
|
|
1253
|
+
'ease': () => {
|
|
1254
|
+
const easingMap = {
|
|
1255
|
+
'linear': 'linear',
|
|
1256
|
+
'in': 'cubic-bezier(0.4, 0, 1, 1)',
|
|
1257
|
+
'out': 'cubic-bezier(0, 0, 0.2, 1)',
|
|
1258
|
+
'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)'
|
|
1259
|
+
};
|
|
1260
|
+
const cssValue = isArbitrary ? value : (easingMap[value] || easingMap['in-out']);
|
|
1261
|
+
return `transition-timing-function: ${cssValue};`;
|
|
1262
|
+
},
|
|
1263
|
+
|
|
1264
|
+
// Transition Delay
|
|
1265
|
+
'delay': () => {
|
|
1266
|
+
const delayScale = {
|
|
1267
|
+
'instant': '75ms',
|
|
1268
|
+
'quick': '100ms',
|
|
1269
|
+
'fast': '150ms',
|
|
1270
|
+
'normal': '200ms',
|
|
1271
|
+
'slow': '300ms',
|
|
1272
|
+
'slower': '500ms',
|
|
1273
|
+
'lazy': '700ms'
|
|
1274
|
+
};
|
|
1275
|
+
const cssValue = isArbitrary ? value : (delayScale[value] || delayScale['normal']);
|
|
1276
|
+
return `transition-delay: ${cssValue};`;
|
|
1277
|
+
},
|
|
1278
|
+
|
|
1279
|
+
// Transition Behavior
|
|
1280
|
+
'transition-behavior': () => {
|
|
1281
|
+
return `transition-behavior: ${value};`;
|
|
1282
|
+
},
|
|
1283
|
+
|
|
1284
|
+
// =====================
|
|
1285
|
+
// ANIMATION UTILITIES
|
|
1286
|
+
// =====================
|
|
1287
|
+
|
|
1288
|
+
'animate': () => {
|
|
1289
|
+
const animationPresets = {
|
|
1290
|
+
'none': 'none',
|
|
1291
|
+
'spin': 'spin 1s linear infinite',
|
|
1292
|
+
'ping': 'ping 1s cubic-bezier(0, 0, 0.2, 1) infinite',
|
|
1293
|
+
'pulse': 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
|
1294
|
+
'bounce': 'bounce 1s infinite'
|
|
1295
|
+
};
|
|
1296
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (animationPresets[value] || value);
|
|
1297
|
+
return `animation: ${cssValue};`;
|
|
1298
|
+
},
|
|
1299
|
+
|
|
1300
|
+
// Animation Duration
|
|
1301
|
+
'animation-duration': () => {
|
|
1302
|
+
const durationScale = {
|
|
1303
|
+
'instant': '75ms',
|
|
1304
|
+
'quick': '100ms',
|
|
1305
|
+
'fast': '150ms',
|
|
1306
|
+
'normal': '200ms',
|
|
1307
|
+
'slow': '300ms',
|
|
1308
|
+
'slower': '500ms',
|
|
1309
|
+
'lazy': '700ms'
|
|
1310
|
+
};
|
|
1311
|
+
const cssValue = isArbitrary ? value : (durationScale[value] || durationScale['normal']);
|
|
1312
|
+
return `animation-duration: ${cssValue};`;
|
|
1313
|
+
},
|
|
1314
|
+
|
|
1315
|
+
// Animation Delay
|
|
1316
|
+
'animation-delay': () => {
|
|
1317
|
+
const delayScale = {
|
|
1318
|
+
'instant': '75ms',
|
|
1319
|
+
'quick': '100ms',
|
|
1320
|
+
'fast': '150ms',
|
|
1321
|
+
'normal': '200ms',
|
|
1322
|
+
'slow': '300ms',
|
|
1323
|
+
'slower': '500ms',
|
|
1324
|
+
'lazy': '700ms'
|
|
1325
|
+
};
|
|
1326
|
+
const cssValue = isArbitrary ? value : (delayScale[value] || delayScale['normal']);
|
|
1327
|
+
return `animation-delay: ${cssValue};`;
|
|
1328
|
+
},
|
|
1329
|
+
|
|
1330
|
+
// Animation Iteration Count
|
|
1331
|
+
'animation-iteration': () => {
|
|
1332
|
+
return `animation-iteration-count: ${value};`;
|
|
1333
|
+
},
|
|
1334
|
+
|
|
1335
|
+
// Animation Direction
|
|
1336
|
+
'animation-direction': () => {
|
|
1337
|
+
return `animation-direction: ${value};`;
|
|
1338
|
+
},
|
|
1339
|
+
|
|
1340
|
+
// Animation Fill Mode
|
|
1341
|
+
'animation-fill': () => {
|
|
1342
|
+
return `animation-fill-mode: ${value};`;
|
|
1343
|
+
},
|
|
1344
|
+
|
|
1345
|
+
// Animation Play State
|
|
1346
|
+
'animation-play': () => {
|
|
1347
|
+
return `animation-play-state: ${value};`;
|
|
1348
|
+
},
|
|
1349
|
+
|
|
1350
|
+
// =====================
|
|
1351
|
+
// TRANSFORM UTILITIES
|
|
1352
|
+
// =====================
|
|
1353
|
+
|
|
1354
|
+
// Scale
|
|
1355
|
+
'scale': () => {
|
|
1356
|
+
const cssValue = isArbitrary ? value : (parseInt(value) / 100);
|
|
1357
|
+
return `transform: scale(${cssValue});`;
|
|
1358
|
+
},
|
|
1359
|
+
|
|
1360
|
+
'scale-x': () => {
|
|
1361
|
+
const cssValue = isArbitrary ? value : (parseInt(value) / 100);
|
|
1362
|
+
return `transform: scaleX(${cssValue});`;
|
|
1363
|
+
},
|
|
1364
|
+
|
|
1365
|
+
'scale-y': () => {
|
|
1366
|
+
const cssValue = isArbitrary ? value : (parseInt(value) / 100);
|
|
1367
|
+
return `transform: scaleY(${cssValue});`;
|
|
1368
|
+
},
|
|
1369
|
+
|
|
1370
|
+
// Rotate
|
|
1371
|
+
'rotate': () => {
|
|
1372
|
+
const cssValue = isArbitrary ? value : `${value}deg`;
|
|
1373
|
+
return `transform: rotate(${cssValue});`;
|
|
1374
|
+
},
|
|
1375
|
+
|
|
1376
|
+
// Translate
|
|
1377
|
+
'translate-x': () => {
|
|
1378
|
+
const translatePresets = {
|
|
1379
|
+
'full': '100%',
|
|
1380
|
+
'1/2': '50%',
|
|
1381
|
+
'1/3': '33.333333%',
|
|
1382
|
+
'2/3': '66.666667%',
|
|
1383
|
+
'1/4': '25%',
|
|
1384
|
+
'3/4': '75%'
|
|
1385
|
+
};
|
|
1386
|
+
const cssValue = isArbitrary ? value : (translatePresets[value] || `var(--s-${value})`);
|
|
1387
|
+
return `transform: translateX(${cssValue});`;
|
|
1388
|
+
},
|
|
1389
|
+
|
|
1390
|
+
'translate-y': () => {
|
|
1391
|
+
const translatePresets = {
|
|
1392
|
+
'full': '100%',
|
|
1393
|
+
'1/2': '50%',
|
|
1394
|
+
'1/3': '33.333333%',
|
|
1395
|
+
'2/3': '66.666667%',
|
|
1396
|
+
'1/4': '25%',
|
|
1397
|
+
'3/4': '75%'
|
|
1398
|
+
};
|
|
1399
|
+
const cssValue = isArbitrary ? value : (translatePresets[value] || `var(--s-${value})`);
|
|
1400
|
+
return `transform: translateY(${cssValue});`;
|
|
1401
|
+
},
|
|
1402
|
+
|
|
1403
|
+
'-translate-x': () => {
|
|
1404
|
+
const translatePresets = {
|
|
1405
|
+
'full': '-100%',
|
|
1406
|
+
'1/2': '-50%',
|
|
1407
|
+
'1/3': '-33.333333%',
|
|
1408
|
+
'2/3': '-66.666667%',
|
|
1409
|
+
'1/4': '-25%',
|
|
1410
|
+
'3/4': '-75%'
|
|
1411
|
+
};
|
|
1412
|
+
const cssValue = isArbitrary ? `-${value}` : (translatePresets[value] || `calc(var(--s-${value}) * -1)`);
|
|
1413
|
+
return `transform: translateX(${cssValue});`;
|
|
1414
|
+
},
|
|
1415
|
+
|
|
1416
|
+
'-translate-y': () => {
|
|
1417
|
+
const translatePresets = {
|
|
1418
|
+
'full': '-100%',
|
|
1419
|
+
'1/2': '-50%',
|
|
1420
|
+
'1/3': '-33.333333%',
|
|
1421
|
+
'2/3': '-66.666667%',
|
|
1422
|
+
'1/4': '-25%',
|
|
1423
|
+
'3/4': '-75%'
|
|
1424
|
+
};
|
|
1425
|
+
const cssValue = isArbitrary ? `-${value}` : (translatePresets[value] || `calc(var(--s-${value}) * -1)`);
|
|
1426
|
+
return `transform: translateY(${cssValue});`;
|
|
1427
|
+
},
|
|
1428
|
+
|
|
1429
|
+
// Skew
|
|
1430
|
+
'skew-x': () => {
|
|
1431
|
+
const cssValue = isArbitrary ? value : `${value}deg`;
|
|
1432
|
+
return `transform: skewX(${cssValue});`;
|
|
1433
|
+
},
|
|
1434
|
+
|
|
1435
|
+
'skew-y': () => {
|
|
1436
|
+
const cssValue = isArbitrary ? value : `${value}deg`;
|
|
1437
|
+
return `transform: skewY(${cssValue});`;
|
|
1438
|
+
},
|
|
1439
|
+
|
|
1440
|
+
'-skew-x': () => {
|
|
1441
|
+
const cssValue = isArbitrary ? `-${value}` : `-${value}deg`;
|
|
1442
|
+
return `transform: skewX(${cssValue});`;
|
|
1443
|
+
},
|
|
1444
|
+
|
|
1445
|
+
'-skew-y': () => {
|
|
1446
|
+
const cssValue = isArbitrary ? `-${value}` : `-${value}deg`;
|
|
1447
|
+
return `transform: skewY(${cssValue});`;
|
|
1448
|
+
},
|
|
1449
|
+
|
|
1450
|
+
// Transform Origin
|
|
1451
|
+
'origin': () => {
|
|
1452
|
+
const originMap = {
|
|
1453
|
+
'center': 'center',
|
|
1454
|
+
'top': 'top',
|
|
1455
|
+
'top-right': 'top right',
|
|
1456
|
+
'right': 'right',
|
|
1457
|
+
'bottom-right': 'bottom right',
|
|
1458
|
+
'bottom': 'bottom',
|
|
1459
|
+
'bottom-left': 'bottom left',
|
|
1460
|
+
'left': 'left',
|
|
1461
|
+
'top-left': 'top left'
|
|
1462
|
+
};
|
|
1463
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (originMap[value] || value);
|
|
1464
|
+
return `transform-origin: ${cssValue};`;
|
|
1465
|
+
},
|
|
1466
|
+
|
|
1467
|
+
// Transform Style (for 3D transforms)
|
|
1468
|
+
'transform-style': () => {
|
|
1469
|
+
return `transform-style: ${value};`;
|
|
1470
|
+
},
|
|
1471
|
+
|
|
1472
|
+
// Backface Visibility
|
|
1473
|
+
'backface': () => {
|
|
1474
|
+
return `backface-visibility: ${value};`;
|
|
1475
|
+
},
|
|
1476
|
+
|
|
1477
|
+
// Perspective
|
|
1478
|
+
'perspective': () => {
|
|
1479
|
+
const perspectivePresets = {
|
|
1480
|
+
'none': 'none',
|
|
1481
|
+
'small': '250px',
|
|
1482
|
+
'medium': '500px',
|
|
1483
|
+
'big': '750px',
|
|
1484
|
+
'giant': '1000px',
|
|
1485
|
+
'vast': '1500px'
|
|
1486
|
+
};
|
|
1487
|
+
const cssValue = isArbitrary ? value : (perspectivePresets[value] || perspectivePresets['medium']);
|
|
1488
|
+
return `perspective: ${cssValue};`;
|
|
1489
|
+
},
|
|
1490
|
+
|
|
1491
|
+
// Perspective Origin
|
|
1492
|
+
'perspective-origin': () => {
|
|
1493
|
+
const originMap = {
|
|
1494
|
+
'center': 'center',
|
|
1495
|
+
'top': 'top',
|
|
1496
|
+
'top-right': 'top right',
|
|
1497
|
+
'right': 'right',
|
|
1498
|
+
'bottom-right': 'bottom right',
|
|
1499
|
+
'bottom': 'bottom',
|
|
1500
|
+
'bottom-left': 'bottom left',
|
|
1501
|
+
'left': 'left',
|
|
1502
|
+
'top-left': 'top left'
|
|
1503
|
+
};
|
|
1504
|
+
const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (originMap[value] || value);
|
|
1505
|
+
return `perspective-origin: ${cssValue};`;
|
|
1506
|
+
},
|
|
1507
|
+
|
|
1508
|
+
// =====================
|
|
1509
|
+
// INTERACTIVITY UTILITIES
|
|
1510
|
+
// =====================
|
|
1511
|
+
|
|
1512
|
+
// Accent Color
|
|
1513
|
+
'accent': () => {
|
|
1514
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
1515
|
+
return `accent-color: ${cssValue};`;
|
|
1516
|
+
},
|
|
1517
|
+
|
|
1518
|
+
// Appearance
|
|
1519
|
+
'appearance': () => {
|
|
1520
|
+
return `appearance: ${value};`;
|
|
1521
|
+
},
|
|
1522
|
+
|
|
1523
|
+
// Caret Color
|
|
1524
|
+
'caret': () => {
|
|
1525
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
1526
|
+
return `caret-color: ${cssValue};`;
|
|
1527
|
+
},
|
|
1528
|
+
|
|
1529
|
+
// Color Scheme
|
|
1530
|
+
'color-scheme': () => {
|
|
1531
|
+
return `color-scheme: ${value};`;
|
|
1532
|
+
},
|
|
1533
|
+
|
|
1534
|
+
// Cursor
|
|
1535
|
+
'cursor': () => {
|
|
1536
|
+
return `cursor: ${value};`;
|
|
1537
|
+
},
|
|
1538
|
+
|
|
1539
|
+
// Field Sizing
|
|
1540
|
+
'field-sizing': () => {
|
|
1541
|
+
return `field-sizing: ${value};`;
|
|
1542
|
+
},
|
|
1543
|
+
|
|
1544
|
+
// Pointer Events
|
|
1545
|
+
'pointer-events': () => {
|
|
1546
|
+
return `pointer-events: ${value};`;
|
|
1547
|
+
},
|
|
1548
|
+
|
|
1549
|
+
// Resize
|
|
1550
|
+
'resize': () => {
|
|
1551
|
+
const resizeMap = {
|
|
1552
|
+
'none': 'none',
|
|
1553
|
+
'both': 'both',
|
|
1554
|
+
'x': 'horizontal',
|
|
1555
|
+
'y': 'vertical'
|
|
1556
|
+
};
|
|
1557
|
+
const cssValue = resizeMap[value] || value;
|
|
1558
|
+
return `resize: ${cssValue};`;
|
|
1559
|
+
},
|
|
1560
|
+
|
|
1561
|
+
// Scroll Behavior
|
|
1562
|
+
'scroll': () => {
|
|
1563
|
+
return `scroll-behavior: ${value};`;
|
|
1564
|
+
},
|
|
1565
|
+
|
|
1566
|
+
// Scroll Margin
|
|
1567
|
+
'scroll-m': () => {
|
|
1568
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1569
|
+
return `scroll-margin: ${cssValue};`;
|
|
1570
|
+
},
|
|
1571
|
+
'scroll-m-t': () => {
|
|
1572
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1573
|
+
return `scroll-margin-top: ${cssValue};`;
|
|
1574
|
+
},
|
|
1575
|
+
'scroll-m-r': () => {
|
|
1576
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1577
|
+
return `scroll-margin-right: ${cssValue};`;
|
|
1578
|
+
},
|
|
1579
|
+
'scroll-m-b': () => {
|
|
1580
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1581
|
+
return `scroll-margin-bottom: ${cssValue};`;
|
|
1582
|
+
},
|
|
1583
|
+
'scroll-m-l': () => {
|
|
1584
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1585
|
+
return `scroll-margin-left: ${cssValue};`;
|
|
1586
|
+
},
|
|
1587
|
+
'scroll-m-x': () => {
|
|
1588
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1589
|
+
return `scroll-margin-left: ${cssValue}; scroll-margin-right: ${cssValue};`;
|
|
1590
|
+
},
|
|
1591
|
+
'scroll-m-y': () => {
|
|
1592
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1593
|
+
return `scroll-margin-top: ${cssValue}; scroll-margin-bottom: ${cssValue};`;
|
|
1594
|
+
},
|
|
1595
|
+
|
|
1596
|
+
// Scroll Padding
|
|
1597
|
+
'scroll-p': () => {
|
|
1598
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1599
|
+
return `scroll-padding: ${cssValue};`;
|
|
1600
|
+
},
|
|
1601
|
+
'scroll-p-t': () => {
|
|
1602
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1603
|
+
return `scroll-padding-top: ${cssValue};`;
|
|
1604
|
+
},
|
|
1605
|
+
'scroll-p-r': () => {
|
|
1606
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1607
|
+
return `scroll-padding-right: ${cssValue};`;
|
|
1608
|
+
},
|
|
1609
|
+
'scroll-p-b': () => {
|
|
1610
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1611
|
+
return `scroll-padding-bottom: ${cssValue};`;
|
|
1612
|
+
},
|
|
1613
|
+
'scroll-p-l': () => {
|
|
1614
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1615
|
+
return `scroll-padding-left: ${cssValue};`;
|
|
1616
|
+
},
|
|
1617
|
+
'scroll-p-x': () => {
|
|
1618
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1619
|
+
return `scroll-padding-left: ${cssValue}; scroll-padding-right: ${cssValue};`;
|
|
1620
|
+
},
|
|
1621
|
+
'scroll-p-y': () => {
|
|
1622
|
+
const cssValue = isArbitrary ? value : `var(--s-${value})`;
|
|
1623
|
+
return `scroll-padding-top: ${cssValue}; scroll-padding-bottom: ${cssValue};`;
|
|
1624
|
+
},
|
|
1625
|
+
|
|
1626
|
+
// Scroll Snap Align
|
|
1627
|
+
'snap-align': () => {
|
|
1628
|
+
return `scroll-snap-align: ${value};`;
|
|
1629
|
+
},
|
|
1630
|
+
|
|
1631
|
+
// Scroll Snap Stop
|
|
1632
|
+
'snap-stop': () => {
|
|
1633
|
+
return `scroll-snap-stop: ${value};`;
|
|
1634
|
+
},
|
|
1635
|
+
|
|
1636
|
+
// Scroll Snap Type
|
|
1637
|
+
'snap': () => {
|
|
1638
|
+
const snapMap = {
|
|
1639
|
+
'none': 'none',
|
|
1640
|
+
'x': 'x mandatory',
|
|
1641
|
+
'x-proximity': 'x proximity',
|
|
1642
|
+
'y': 'y mandatory',
|
|
1643
|
+
'y-proximity': 'y proximity',
|
|
1644
|
+
'both': 'both mandatory',
|
|
1645
|
+
'both-proximity': 'both proximity'
|
|
1646
|
+
};
|
|
1647
|
+
const cssValue = snapMap[value] || value;
|
|
1648
|
+
return `scroll-snap-type: ${cssValue};`;
|
|
1649
|
+
},
|
|
1650
|
+
|
|
1651
|
+
// Touch Action
|
|
1652
|
+
'touch': () => {
|
|
1653
|
+
const touchMap = {
|
|
1654
|
+
'auto': 'auto',
|
|
1655
|
+
'none': 'none',
|
|
1656
|
+
'pan-x': 'pan-x',
|
|
1657
|
+
'pan-y': 'pan-y',
|
|
1658
|
+
'pan-left': 'pan-left',
|
|
1659
|
+
'pan-right': 'pan-right',
|
|
1660
|
+
'pan-up': 'pan-up',
|
|
1661
|
+
'pan-down': 'pan-down',
|
|
1662
|
+
'pinch-zoom': 'pinch-zoom',
|
|
1663
|
+
'manipulation': 'manipulation'
|
|
1664
|
+
};
|
|
1665
|
+
const cssValue = touchMap[value] || value;
|
|
1666
|
+
return `touch-action: ${cssValue};`;
|
|
1667
|
+
},
|
|
1668
|
+
|
|
1669
|
+
// User Select
|
|
1670
|
+
'select': () => {
|
|
1671
|
+
return `user-select: ${value};`;
|
|
1672
|
+
},
|
|
1673
|
+
|
|
1674
|
+
// Will Change
|
|
1675
|
+
'will-change': () => {
|
|
1676
|
+
const willChangeMap = {
|
|
1677
|
+
'auto': 'auto',
|
|
1678
|
+
'scroll': 'scroll-position',
|
|
1679
|
+
'contents': 'contents',
|
|
1680
|
+
'transform': 'transform',
|
|
1681
|
+
'opacity': 'opacity'
|
|
1682
|
+
};
|
|
1683
|
+
const cssValue = willChangeMap[value] || value;
|
|
1684
|
+
return `will-change: ${cssValue};`;
|
|
1685
|
+
},
|
|
1686
|
+
|
|
1687
|
+
// =====================
|
|
1688
|
+
// SVG UTILITIES
|
|
1689
|
+
// =====================
|
|
1690
|
+
|
|
1691
|
+
// Fill
|
|
1692
|
+
'fill': () => {
|
|
1693
|
+
if (value === 'none') {
|
|
1694
|
+
return 'fill: none;';
|
|
1695
|
+
}
|
|
1696
|
+
if (value === 'current') {
|
|
1697
|
+
return 'fill: currentColor;';
|
|
1698
|
+
}
|
|
1699
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
1700
|
+
return `fill: ${cssValue};`;
|
|
1701
|
+
},
|
|
1702
|
+
|
|
1703
|
+
// Stroke
|
|
1704
|
+
'stroke': () => {
|
|
1705
|
+
if (value === 'none') {
|
|
1706
|
+
return 'stroke: none;';
|
|
1707
|
+
}
|
|
1708
|
+
if (value === 'current') {
|
|
1709
|
+
return 'stroke: currentColor;';
|
|
1710
|
+
}
|
|
1711
|
+
const cssValue = isArbitrary ? value : `var(--c-${value})`;
|
|
1712
|
+
return `stroke: ${cssValue};`;
|
|
1713
|
+
},
|
|
1714
|
+
|
|
1715
|
+
// Stroke Width
|
|
1716
|
+
'stroke-w': () => {
|
|
1717
|
+
const cssValue = isArbitrary ? value : `${value}px`;
|
|
1718
|
+
return `stroke-width: ${cssValue};`;
|
|
1719
|
+
},
|
|
1720
|
+
|
|
1721
|
+
// =====================
|
|
1722
|
+
// ACCESSIBILITY UTILITIES
|
|
1723
|
+
// =====================
|
|
1724
|
+
|
|
1725
|
+
// Forced Color Adjust
|
|
1726
|
+
'forced-colors': () => {
|
|
1727
|
+
return `forced-color-adjust: ${value};`;
|
|
231
1728
|
}
|
|
232
1729
|
};
|
|
233
1730
|
|
|
@@ -304,13 +1801,28 @@ export function generateCSS(tokens, config) {
|
|
|
304
1801
|
// Add CSS variables
|
|
305
1802
|
css += generateCSSVariables(config);
|
|
306
1803
|
|
|
307
|
-
// Add base
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
1804
|
+
// Add Preflight base styles if enabled (default: true)
|
|
1805
|
+
if (config.preflight !== false) {
|
|
1806
|
+
css += generatePreflight(config);
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
// Add animation keyframes
|
|
1810
|
+
css += `/* SenangStart CSS - Animation Keyframes */
|
|
1811
|
+
@keyframes spin {
|
|
1812
|
+
to { transform: rotate(360deg); }
|
|
1813
|
+
}
|
|
1814
|
+
@keyframes ping {
|
|
1815
|
+
75%, 100% { transform: scale(2); opacity: 0; }
|
|
1816
|
+
}
|
|
1817
|
+
@keyframes pulse {
|
|
1818
|
+
50% { opacity: .5; }
|
|
1819
|
+
}
|
|
1820
|
+
@keyframes bounce {
|
|
1821
|
+
0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
|
|
1822
|
+
50% { transform: none; animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
|
|
311
1823
|
}
|
|
312
1824
|
|
|
313
|
-
/*
|
|
1825
|
+
/* SenangStart CSS - Utility Classes */
|
|
314
1826
|
`;
|
|
315
1827
|
|
|
316
1828
|
// Group tokens by breakpoint and dark mode
|