@webstudio-is/css-engine 0.0.0-c575b54 → 0.0.0-ca00e2a

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/lib/index.js CHANGED
@@ -14,6 +14,9 @@ var prefixStyles = (styleMap) => {
14
14
  if (property === "backdrop-filter") {
15
15
  newStyleMap.set("-webkit-backdrop-filter", value);
16
16
  }
17
+ if (property === "view-timeline-name" || property === "scroll-timeline-name" || property === "view-timeline-inset") {
18
+ newStyleMap.set(`--${property}`, value);
19
+ }
17
20
  newStyleMap.set(property, value);
18
21
  }
19
22
  return newStyleMap;
@@ -23,7 +26,6 @@ var prefixStyles = (styleMap) => {
23
26
  import { z } from "zod";
24
27
 
25
28
  // src/core/to-value.ts
26
- import { captureError } from "@webstudio-is/error-utils";
27
29
  import { DEFAULT_FONT_FALLBACK, SYSTEM_FONTS } from "@webstudio-is/fonts";
28
30
  var fallbackTransform = (styleValue) => {
29
31
  if (styleValue.type !== "fontFamily") {
@@ -106,6 +108,22 @@ var toValue = (styleValue, transformValue) => {
106
108
  }
107
109
  return value.value.filter((value2) => value2.hidden !== true).map((value2) => toValue(value2, transformValue)).join(" ");
108
110
  }
111
+ if (value.type === "shadow") {
112
+ let shadow = `${toValue(value.offsetX)} ${toValue(value.offsetY)}`;
113
+ if (value.blur) {
114
+ shadow += ` ${toValue(value.blur)}`;
115
+ }
116
+ if (value.spread) {
117
+ shadow += ` ${toValue(value.spread)}`;
118
+ }
119
+ if (value.color) {
120
+ shadow += ` ${toValue(value.color)}`;
121
+ }
122
+ if (value.position === "inset") {
123
+ shadow += ` inset`;
124
+ }
125
+ return shadow;
126
+ }
109
127
  if (value.type === "function") {
110
128
  if (value.hidden === true) {
111
129
  return "";
@@ -115,7 +133,8 @@ var toValue = (styleValue, transformValue) => {
115
133
  if (value.type === "guaranteedInvalid") {
116
134
  return "";
117
135
  }
118
- return captureError(new Error("Unknown value type"), value);
136
+ value;
137
+ return "";
119
138
  };
120
139
 
121
140
  // src/schema.ts
@@ -215,12 +234,23 @@ var TupleValue = z.object({
215
234
  value: z.array(TupleValueItem),
216
235
  hidden: z.boolean().optional()
217
236
  });
237
+ var ShadowValue = z.object({
238
+ type: z.literal("shadow"),
239
+ hidden: z.boolean().optional(),
240
+ position: z.union([z.literal("inset"), z.literal("outset")]),
241
+ offsetX: z.union([UnitValue, VarValue]),
242
+ offsetY: z.union([UnitValue, VarValue]),
243
+ blur: z.union([UnitValue, VarValue]).optional(),
244
+ spread: z.union([UnitValue, VarValue]).optional(),
245
+ color: z.union([RgbValue, KeywordValue, VarValue]).optional()
246
+ });
218
247
  var LayerValueItem = z.union([
219
248
  UnitValue,
220
249
  KeywordValue,
221
250
  UnparsedValue,
222
251
  ImageValue,
223
252
  TupleValue,
253
+ ShadowValue,
224
254
  RgbValue,
225
255
  InvalidValue,
226
256
  FunctionValue,
@@ -244,9 +274,9 @@ var StyleValue = z.union([
244
274
  GuaranteedInvalidValue,
245
275
  InvalidValue,
246
276
  UnsetValue,
247
- VarValue
277
+ VarValue,
278
+ ShadowValue
248
279
  ]);
249
- var Style = z.record(z.string(), StyleValue);
250
280
 
251
281
  // src/css.ts
252
282
  var cssWideKeywords = /* @__PURE__ */ new Set([
@@ -377,7 +407,10 @@ var mergeStyles = (styleMap) => {
377
407
  };
378
408
 
379
409
  // src/core/to-property.ts
380
- var hyphenateProperty = (property) => property.replace(/[A-Z]/g, (match) => "-" + match.toLowerCase());
410
+ var hyphenateProperty = (property) => property.replace(
411
+ /[A-Z]/g,
412
+ (match) => "-" + match.toLowerCase()
413
+ );
381
414
 
382
415
  // src/core/rules.ts
383
416
  var mapGroupBy = (array, getKey) => {
@@ -417,11 +450,10 @@ var mergeDeclarations = (declarations) => {
417
450
  }
418
451
  return newDeclarations;
419
452
  };
420
- var generateStyleMap = ({
421
- style,
453
+ var generateStyleMap = (style, {
422
454
  indent = 0,
423
455
  transformValue
424
- }) => {
456
+ } = {}) => {
425
457
  const spaces = " ".repeat(indent);
426
458
  let lines = "";
427
459
  for (const [property, value] of style) {
@@ -565,8 +597,7 @@ var NestingRule = class {
565
597
  const generated = Array.from(styleBySelector).sort(
566
598
  ([leftSelector], [rightSelector]) => leftSelector.localeCompare(rightSelector)
567
599
  ).map(([selector, style]) => {
568
- const content = generateStyleMap({
569
- style: prefixStyles(style),
600
+ const content = generateStyleMap(prefixStyles(style), {
570
601
  indent: indent + 2,
571
602
  transformValue
572
603
  });
@@ -931,6 +962,7 @@ export {
931
962
  InvalidValue,
932
963
  KeywordValue,
933
964
  LayersValue,
965
+ ShadowValue,
934
966
  StyleValue,
935
967
  TupleValue,
936
968
  TupleValueItem,
package/lib/runtime.js ADDED
@@ -0,0 +1,114 @@
1
+ // src/core/to-value.ts
2
+ import { DEFAULT_FONT_FALLBACK, SYSTEM_FONTS } from "@webstudio-is/fonts";
3
+ var fallbackTransform = (styleValue) => {
4
+ if (styleValue.type !== "fontFamily") {
5
+ return;
6
+ }
7
+ let { value } = styleValue;
8
+ if (value.length === 0) {
9
+ value = [DEFAULT_FONT_FALLBACK];
10
+ }
11
+ if (value.length === 1) {
12
+ const stack = SYSTEM_FONTS.get(value[0])?.stack;
13
+ value = stack ?? [value[0], DEFAULT_FONT_FALLBACK];
14
+ }
15
+ return {
16
+ type: "fontFamily",
17
+ value: Array.from(new Set(value))
18
+ };
19
+ };
20
+ var sanitizeCssUrl = (str) => JSON.stringify(str);
21
+ var toValue = (styleValue, transformValue) => {
22
+ if (styleValue === void 0) {
23
+ return "";
24
+ }
25
+ const transformedValue = transformValue?.(styleValue) ?? fallbackTransform(styleValue);
26
+ const value = transformedValue ?? styleValue;
27
+ if (value.type === "unit") {
28
+ return value.value + (value.unit === "number" ? "" : value.unit);
29
+ }
30
+ if (value.type === "fontFamily") {
31
+ const families = [];
32
+ for (const family of value.value) {
33
+ families.push(family.includes(" ") ? `"${family}"` : family);
34
+ }
35
+ return families.join(", ");
36
+ }
37
+ if (value.type === "var") {
38
+ if (value.hidden) {
39
+ return "";
40
+ }
41
+ let fallbacksString = "";
42
+ if (value.fallback) {
43
+ fallbacksString = `, ${toValue(value.fallback, transformValue)}`;
44
+ }
45
+ return `var(--${value.value}${fallbacksString})`;
46
+ }
47
+ if (value.type === "keyword") {
48
+ if (value.hidden === true) {
49
+ return "";
50
+ }
51
+ return value.value;
52
+ }
53
+ if (value.type === "invalid") {
54
+ return value.value;
55
+ }
56
+ if (value.type === "unset") {
57
+ return value.value;
58
+ }
59
+ if (value.type === "rgb") {
60
+ return `rgba(${value.r}, ${value.g}, ${value.b}, ${value.alpha})`;
61
+ }
62
+ if (value.type === "image") {
63
+ if (value.hidden || value.value.type !== "url") {
64
+ return "none";
65
+ }
66
+ return `url(${sanitizeCssUrl(value.value.url)})`;
67
+ }
68
+ if (value.type === "unparsed") {
69
+ if (value.hidden === true) {
70
+ return "none";
71
+ }
72
+ return value.value;
73
+ }
74
+ if (value.type === "layers") {
75
+ const valueString = value.value.filter((layer) => layer.hidden !== true).map((layer) => toValue(layer, transformValue)).join(", ");
76
+ return valueString === "" ? "none" : valueString;
77
+ }
78
+ if (value.type === "tuple") {
79
+ if (value.hidden === true) {
80
+ return "none";
81
+ }
82
+ return value.value.filter((value2) => value2.hidden !== true).map((value2) => toValue(value2, transformValue)).join(" ");
83
+ }
84
+ if (value.type === "shadow") {
85
+ let shadow = `${toValue(value.offsetX)} ${toValue(value.offsetY)}`;
86
+ if (value.blur) {
87
+ shadow += ` ${toValue(value.blur)}`;
88
+ }
89
+ if (value.spread) {
90
+ shadow += ` ${toValue(value.spread)}`;
91
+ }
92
+ if (value.color) {
93
+ shadow += ` ${toValue(value.color)}`;
94
+ }
95
+ if (value.position === "inset") {
96
+ shadow += ` inset`;
97
+ }
98
+ return shadow;
99
+ }
100
+ if (value.type === "function") {
101
+ if (value.hidden === true) {
102
+ return "";
103
+ }
104
+ return `${value.name}(${toValue(value.args, transformValue)})`;
105
+ }
106
+ if (value.type === "guaranteedInvalid") {
107
+ return "";
108
+ }
109
+ value;
110
+ return "";
111
+ };
112
+ export {
113
+ toValue
114
+ };
@@ -1,2 +1,3 @@
1
- export type Property = "WebkitFontSmoothing" | "MozOsxFontSmoothing" | "-webkit-box-orient" | "-webkit-line-clamp" | "-webkit-overflow-scrolling" | "-webkit-tap-highlight-color" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backdropFilter" | "backfaceVisibility" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "blockSize" | "borderBlockColor" | "borderBlockStyle" | "borderBlockWidth" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInlineColor" | "borderInlineStyle" | "borderInlineWidth" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "boxDecorationBreak" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clip" | "clipPath" | "color" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "contain" | "containIntrinsicBlockSize" | "containIntrinsicHeight" | "containIntrinsicInlineSize" | "containIntrinsicWidth" | "containerName" | "containerType" | "content" | "contentVisibility" | "counterIncrement" | "counterReset" | "counterSet" | "cursor" | "direction" | "display" | "emptyCells" | "fieldSizing" | "filter" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontLanguageOverride" | "fontOpticalSizing" | "fontVariationSettings" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesisSmallCaps" | "fontSynthesisStyle" | "fontSynthesisWeight" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hangingPunctuation" | "height" | "hyphenateCharacter" | "hyphenateLimitChars" | "hyphens" | "imageOrientation" | "imageRendering" | "inlineSize" | "insetBlockEnd" | "insetBlockStart" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineBreak" | "lineHeight" | "listStyleImage" | "listStylePosition" | "listStyleType" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maskBorderMode" | "maskBorderOutset" | "maskBorderRepeat" | "maskBorderSlice" | "maskBorderSource" | "maskBorderWidth" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "mathDepth" | "mathShift" | "mathStyle" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetPosition" | "offsetRotate" | "opacity" | "order" | "orphans" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "page" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "pointerEvents" | "position" | "printColorAdjust" | "quotes" | "resize" | "right" | "rotate" | "rowGap" | "scale" | "scrollbarColor" | "scrollbarGutter" | "scrollbarWidth" | "scrollBehavior" | "scrollMarginBlockStart" | "scrollMarginBlockEnd" | "scrollMarginBottom" | "scrollMarginInlineStart" | "scrollMarginInlineEnd" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPaddingBlockStart" | "scrollPaddingBlockEnd" | "scrollPaddingBottom" | "scrollPaddingInlineStart" | "scrollPaddingInlineEnd" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textJustify" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textSizeAdjust" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "textWrapMode" | "textWrapStyle" | "top" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transitionBehavior" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpaceCollapse" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "zoom";
1
+ export type CamelCasedProperty = "WebkitFontSmoothing" | "MozOsxFontSmoothing" | "-webkit-box-orient" | "viewTimelineName" | "scrollTimelineName" | "viewTimelineInset" | "-webkit-line-clamp" | "-webkit-overflow-scrolling" | "-webkit-tap-highlight-color" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backdropFilter" | "backfaceVisibility" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "blockSize" | "borderBlockColor" | "borderBlockStyle" | "borderBlockWidth" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInlineColor" | "borderInlineStyle" | "borderInlineWidth" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "boxDecorationBreak" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clip" | "clipPath" | "color" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "contain" | "containIntrinsicBlockSize" | "containIntrinsicHeight" | "containIntrinsicInlineSize" | "containIntrinsicWidth" | "containerName" | "containerType" | "content" | "contentVisibility" | "counterIncrement" | "counterReset" | "counterSet" | "cursor" | "direction" | "display" | "emptyCells" | "fieldSizing" | "filter" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontLanguageOverride" | "fontOpticalSizing" | "fontVariationSettings" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesisSmallCaps" | "fontSynthesisStyle" | "fontSynthesisWeight" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hangingPunctuation" | "height" | "hyphenateCharacter" | "hyphenateLimitChars" | "hyphens" | "imageOrientation" | "imageRendering" | "inlineSize" | "insetBlockEnd" | "insetBlockStart" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineBreak" | "lineHeight" | "listStyleImage" | "listStylePosition" | "listStyleType" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maskBorderMode" | "maskBorderOutset" | "maskBorderRepeat" | "maskBorderSlice" | "maskBorderSource" | "maskBorderWidth" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "mathDepth" | "mathShift" | "mathStyle" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetPosition" | "offsetRotate" | "opacity" | "order" | "orphans" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "page" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "pointerEvents" | "position" | "printColorAdjust" | "quotes" | "resize" | "right" | "rotate" | "rowGap" | "scale" | "scrollbarColor" | "scrollbarGutter" | "scrollbarWidth" | "scrollBehavior" | "scrollMarginBlockStart" | "scrollMarginBlockEnd" | "scrollMarginBottom" | "scrollMarginInlineStart" | "scrollMarginInlineEnd" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPaddingBlockStart" | "scrollPaddingBlockEnd" | "scrollPaddingBottom" | "scrollPaddingInlineStart" | "scrollPaddingInlineEnd" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textJustify" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textSizeAdjust" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "textWrapMode" | "textWrapStyle" | "top" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transitionBehavior" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpaceCollapse" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "zoom";
2
+ export type HyphenatedProperty = "-webkit-font-smoothing" | "-moz-osx-font-smoothing" | "-webkit-box-orient" | "view-timeline-name" | "scroll-timeline-name" | "view-timeline-inset" | "-webkit-line-clamp" | "-webkit-overflow-scrolling" | "-webkit-tap-highlight-color" | "accent-color" | "align-content" | "align-items" | "align-self" | "animation-delay" | "animation-direction" | "animation-duration" | "animation-fill-mode" | "animation-iteration-count" | "animation-name" | "animation-play-state" | "animation-timing-function" | "appearance" | "aspect-ratio" | "backdrop-filter" | "backface-visibility" | "background-attachment" | "background-blend-mode" | "background-clip" | "background-color" | "background-image" | "background-origin" | "background-position-x" | "background-position-y" | "background-repeat" | "background-size" | "block-size" | "border-block-color" | "border-block-style" | "border-block-width" | "border-block-end-color" | "border-block-end-style" | "border-block-end-width" | "border-block-start-color" | "border-block-start-style" | "border-block-start-width" | "border-bottom-color" | "border-bottom-left-radius" | "border-bottom-right-radius" | "border-bottom-style" | "border-bottom-width" | "border-collapse" | "border-end-end-radius" | "border-end-start-radius" | "border-image-outset" | "border-image-repeat" | "border-image-slice" | "border-image-source" | "border-image-width" | "border-inline-color" | "border-inline-style" | "border-inline-width" | "border-inline-end-color" | "border-inline-end-style" | "border-inline-end-width" | "border-inline-start-color" | "border-inline-start-style" | "border-inline-start-width" | "border-left-color" | "border-left-style" | "border-left-width" | "border-right-color" | "border-right-style" | "border-right-width" | "border-spacing" | "border-start-end-radius" | "border-start-start-radius" | "border-top-color" | "border-top-left-radius" | "border-top-right-radius" | "border-top-style" | "border-top-width" | "bottom" | "box-decoration-break" | "box-shadow" | "box-sizing" | "break-after" | "break-before" | "break-inside" | "caption-side" | "caret-color" | "clear" | "clip" | "clip-path" | "color" | "color-scheme" | "column-count" | "column-fill" | "column-gap" | "column-rule-color" | "column-rule-style" | "column-rule-width" | "column-span" | "column-width" | "contain" | "contain-intrinsic-block-size" | "contain-intrinsic-height" | "contain-intrinsic-inline-size" | "contain-intrinsic-width" | "container-name" | "container-type" | "content" | "content-visibility" | "counter-increment" | "counter-reset" | "counter-set" | "cursor" | "direction" | "display" | "empty-cells" | "field-sizing" | "filter" | "flex-basis" | "flex-direction" | "flex-grow" | "flex-shrink" | "flex-wrap" | "float" | "font-family" | "font-feature-settings" | "font-kerning" | "font-language-override" | "font-optical-sizing" | "font-variation-settings" | "font-size" | "font-size-adjust" | "font-stretch" | "font-style" | "font-synthesis-small-caps" | "font-synthesis-style" | "font-synthesis-weight" | "font-variant-alternates" | "font-variant-caps" | "font-variant-east-asian" | "font-variant-ligatures" | "font-variant-numeric" | "font-variant-position" | "font-weight" | "grid-auto-columns" | "grid-auto-flow" | "grid-auto-rows" | "grid-column-end" | "grid-column-start" | "grid-row-end" | "grid-row-start" | "grid-template-areas" | "grid-template-columns" | "grid-template-rows" | "hanging-punctuation" | "height" | "hyphenate-character" | "hyphenate-limit-chars" | "hyphens" | "image-orientation" | "image-rendering" | "inline-size" | "inset-block-end" | "inset-block-start" | "inset-inline-end" | "inset-inline-start" | "isolation" | "justify-content" | "justify-items" | "justify-self" | "left" | "letter-spacing" | "line-break" | "line-height" | "list-style-image" | "list-style-position" | "list-style-type" | "margin-block-end" | "margin-block-start" | "margin-bottom" | "margin-inline-end" | "margin-inline-start" | "margin-left" | "margin-right" | "margin-top" | "mask-border-mode" | "mask-border-outset" | "mask-border-repeat" | "mask-border-slice" | "mask-border-source" | "mask-border-width" | "mask-clip" | "mask-composite" | "mask-image" | "mask-mode" | "mask-origin" | "mask-position" | "mask-repeat" | "mask-size" | "mask-type" | "math-depth" | "math-shift" | "math-style" | "max-block-size" | "max-height" | "max-inline-size" | "max-width" | "min-block-size" | "min-height" | "min-inline-size" | "min-width" | "mix-blend-mode" | "object-fit" | "object-position" | "offset-anchor" | "offset-distance" | "offset-path" | "offset-position" | "offset-rotate" | "opacity" | "order" | "orphans" | "outline-color" | "outline-offset" | "outline-style" | "outline-width" | "overflow-wrap" | "overflow-x" | "overflow-y" | "overscroll-behavior" | "overscroll-behavior-block" | "overscroll-behavior-inline" | "overscroll-behavior-x" | "overscroll-behavior-y" | "padding-block-end" | "padding-block-start" | "padding-bottom" | "padding-inline-end" | "padding-inline-start" | "padding-left" | "padding-right" | "padding-top" | "page" | "page-break-after" | "page-break-before" | "page-break-inside" | "paint-order" | "perspective" | "perspective-origin" | "pointer-events" | "position" | "print-color-adjust" | "quotes" | "resize" | "right" | "rotate" | "row-gap" | "scale" | "scrollbar-color" | "scrollbar-gutter" | "scrollbar-width" | "scroll-behavior" | "scroll-margin-block-start" | "scroll-margin-block-end" | "scroll-margin-bottom" | "scroll-margin-inline-start" | "scroll-margin-inline-end" | "scroll-margin-left" | "scroll-margin-right" | "scroll-margin-top" | "scroll-padding-block-start" | "scroll-padding-block-end" | "scroll-padding-bottom" | "scroll-padding-inline-start" | "scroll-padding-inline-end" | "scroll-padding-left" | "scroll-padding-right" | "scroll-padding-top" | "scroll-snap-align" | "scroll-snap-stop" | "scroll-snap-type" | "shape-image-threshold" | "shape-margin" | "shape-outside" | "tab-size" | "table-layout" | "text-align" | "text-align-last" | "text-combine-upright" | "text-decoration-color" | "text-decoration-line" | "text-decoration-skip-ink" | "text-decoration-style" | "text-decoration-thickness" | "text-emphasis-color" | "text-emphasis-position" | "text-emphasis-style" | "text-indent" | "text-justify" | "text-orientation" | "text-overflow" | "text-rendering" | "text-shadow" | "text-size-adjust" | "text-transform" | "text-underline-offset" | "text-underline-position" | "text-wrap-mode" | "text-wrap-style" | "top" | "touch-action" | "transform" | "transform-box" | "transform-origin" | "transform-style" | "transition-behavior" | "transition-delay" | "transition-duration" | "transition-property" | "transition-timing-function" | "translate" | "unicode-bidi" | "user-select" | "vertical-align" | "visibility" | "white-space-collapse" | "widows" | "width" | "will-change" | "word-break" | "word-spacing" | "word-wrap" | "writing-mode" | "z-index" | "zoom";
2
3
  export type Unit = "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";