@webstudio-is/css-engine 0.0.0-5844e28 → 0.0.0-7cb4145
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 +42 -10
- package/lib/runtime.js +114 -0
- package/lib/types/__generated__/types.d.ts +2 -1
- package/lib/types/core/merger.d.ts +338 -8
- package/lib/types/core/rules.d.ts +5 -2
- package/lib/types/core/to-property.d.ts +2 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/runtime.d.ts +1 -0
- package/lib/types/schema.d.ts +7267 -1569
- package/package.json +15 -8
package/lib/index.js
CHANGED
|
@@ -14,7 +14,7 @@ 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") {
|
|
17
|
+
if (property === "view-timeline-name" || property === "scroll-timeline-name" || property === "view-timeline-inset") {
|
|
18
18
|
newStyleMap.set(`--${property}`, value);
|
|
19
19
|
}
|
|
20
20
|
newStyleMap.set(property, value);
|
|
@@ -108,6 +108,22 @@ var toValue = (styleValue, transformValue) => {
|
|
|
108
108
|
}
|
|
109
109
|
return value.value.filter((value2) => value2.hidden !== true).map((value2) => toValue(value2, transformValue)).join(" ");
|
|
110
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
|
+
}
|
|
111
127
|
if (value.type === "function") {
|
|
112
128
|
if (value.hidden === true) {
|
|
113
129
|
return "";
|
|
@@ -218,12 +234,23 @@ var TupleValue = z.object({
|
|
|
218
234
|
value: z.array(TupleValueItem),
|
|
219
235
|
hidden: z.boolean().optional()
|
|
220
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
|
+
});
|
|
221
247
|
var LayerValueItem = z.union([
|
|
222
248
|
UnitValue,
|
|
223
249
|
KeywordValue,
|
|
224
250
|
UnparsedValue,
|
|
225
251
|
ImageValue,
|
|
226
252
|
TupleValue,
|
|
253
|
+
ShadowValue,
|
|
227
254
|
RgbValue,
|
|
228
255
|
InvalidValue,
|
|
229
256
|
FunctionValue,
|
|
@@ -247,9 +274,9 @@ var StyleValue = z.union([
|
|
|
247
274
|
GuaranteedInvalidValue,
|
|
248
275
|
InvalidValue,
|
|
249
276
|
UnsetValue,
|
|
250
|
-
VarValue
|
|
277
|
+
VarValue,
|
|
278
|
+
ShadowValue
|
|
251
279
|
]);
|
|
252
|
-
var Style = z.record(z.string(), StyleValue);
|
|
253
280
|
|
|
254
281
|
// src/css.ts
|
|
255
282
|
var cssWideKeywords = /* @__PURE__ */ new Set([
|
|
@@ -380,7 +407,10 @@ var mergeStyles = (styleMap) => {
|
|
|
380
407
|
};
|
|
381
408
|
|
|
382
409
|
// src/core/to-property.ts
|
|
383
|
-
var hyphenateProperty = (property) => property.replace(
|
|
410
|
+
var hyphenateProperty = (property) => property.replace(
|
|
411
|
+
/[A-Z]/g,
|
|
412
|
+
(match) => "-" + match.toLowerCase()
|
|
413
|
+
);
|
|
384
414
|
|
|
385
415
|
// src/core/rules.ts
|
|
386
416
|
var mapGroupBy = (array, getKey) => {
|
|
@@ -420,11 +450,10 @@ var mergeDeclarations = (declarations) => {
|
|
|
420
450
|
}
|
|
421
451
|
return newDeclarations;
|
|
422
452
|
};
|
|
423
|
-
var generateStyleMap = ({
|
|
424
|
-
style,
|
|
453
|
+
var generateStyleMap = (style, {
|
|
425
454
|
indent = 0,
|
|
426
455
|
transformValue
|
|
427
|
-
}) => {
|
|
456
|
+
} = {}) => {
|
|
428
457
|
const spaces = " ".repeat(indent);
|
|
429
458
|
let lines = "";
|
|
430
459
|
for (const [property, value] of style) {
|
|
@@ -555,7 +584,10 @@ var NestingRule = class {
|
|
|
555
584
|
if (declaration.breakpoint !== breakpoint) {
|
|
556
585
|
continue;
|
|
557
586
|
}
|
|
558
|
-
|
|
587
|
+
let nestedSelector = declaration.selector;
|
|
588
|
+
if (nestedSelector === ":local-link") {
|
|
589
|
+
nestedSelector = "[aria-current=page]";
|
|
590
|
+
}
|
|
559
591
|
const selector = this.#selector + this.#descendantSuffix + nestedSelector;
|
|
560
592
|
let style = styleBySelector.get(selector);
|
|
561
593
|
if (style === void 0) {
|
|
@@ -568,8 +600,7 @@ var NestingRule = class {
|
|
|
568
600
|
const generated = Array.from(styleBySelector).sort(
|
|
569
601
|
([leftSelector], [rightSelector]) => leftSelector.localeCompare(rightSelector)
|
|
570
602
|
).map(([selector, style]) => {
|
|
571
|
-
const content = generateStyleMap({
|
|
572
|
-
style: prefixStyles(style),
|
|
603
|
+
const content = generateStyleMap(prefixStyles(style), {
|
|
573
604
|
indent: indent + 2,
|
|
574
605
|
transformValue
|
|
575
606
|
});
|
|
@@ -934,6 +965,7 @@ export {
|
|
|
934
965
|
InvalidValue,
|
|
935
966
|
KeywordValue,
|
|
936
967
|
LayersValue,
|
|
968
|
+
ShadowValue,
|
|
937
969
|
StyleValue,
|
|
938
970
|
TupleValue,
|
|
939
971
|
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
|
|
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";
|