react-native-css 0.0.0-nightly.61d67fe → 0.0.0-nightly.8c2d0a1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -10
- package/dist/commonjs/babel/index.js +6 -2
- package/dist/commonjs/babel/index.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +6 -26
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +70 -23
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/compiler.types.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +174 -83
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/inline-variables.js +142 -0
- package/dist/commonjs/compiler/inline-variables.js.map +1 -0
- package/dist/commonjs/compiler/selector-builder.js +6 -4
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +8 -4
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/components/react-native-safe-area-context.native.js +3 -3
- package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -1
- package/dist/commonjs/jest/index.js +1 -2
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/index.js +8 -8
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/runtime/native/api.js +29 -4
- package/dist/commonjs/runtime/native/api.js.map +1 -1
- package/dist/commonjs/runtime/native/react/useNativeCss.js +3 -2
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
- package/dist/commonjs/runtime/native/reactivity.js +3 -11
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/calculate-props.js +13 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/line-height.js +25 -0
- package/dist/commonjs/runtime/native/styles/line-height.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +2 -0
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +11 -13
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/units.js +10 -8
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/variables.js +1 -1
- package/dist/commonjs/runtime/native/styles/variables.js.map +1 -1
- package/dist/commonjs/runtime/web/api.js +18 -0
- package/dist/commonjs/runtime/web/api.js.map +1 -1
- package/dist/commonjs/style-collection/index.js +6 -1
- package/dist/commonjs/style-collection/index.js.map +1 -1
- package/dist/commonjs/style-collection/root.js +6 -0
- package/dist/commonjs/style-collection/root.js.map +1 -1
- package/dist/module/babel/index.js +2 -2
- package/dist/module/babel/index.js.map +1 -1
- package/dist/module/compiler/atRules.js +6 -26
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +72 -25
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js.map +1 -1
- package/dist/module/compiler/declarations.js +169 -83
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/inline-variables.js +138 -0
- package/dist/module/compiler/inline-variables.js.map +1 -0
- package/dist/module/compiler/selector-builder.js +6 -4
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +8 -4
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/components/react-native-safe-area-context.native.js +1 -1
- package/dist/module/components/react-native-safe-area-context.native.js.map +1 -1
- package/dist/module/jest/index.js +2 -3
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/index.js +8 -8
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/runtime/native/api.js +24 -5
- package/dist/module/runtime/native/api.js.map +1 -1
- package/dist/module/runtime/native/react/useNativeCss.js +2 -1
- package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
- package/dist/module/runtime/native/reactivity.js +1 -9
- package/dist/module/runtime/native/reactivity.js.map +1 -1
- package/dist/module/runtime/native/styles/calculate-props.js +13 -0
- package/dist/module/runtime/native/styles/calculate-props.js.map +1 -1
- package/dist/module/runtime/native/styles/line-height.js +20 -0
- package/dist/module/runtime/native/styles/line-height.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +2 -0
- package/dist/module/runtime/native/styles/resolve.js.map +1 -1
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js +11 -13
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/module/runtime/native/styles/units.js +11 -8
- package/dist/module/runtime/native/styles/units.js.map +1 -1
- package/dist/module/runtime/native/styles/variables.js +1 -1
- package/dist/module/runtime/native/styles/variables.js.map +1 -1
- package/dist/module/runtime/web/api.js +18 -1
- package/dist/module/runtime/web/api.js.map +1 -1
- package/dist/module/style-collection/index.js +6 -1
- package/dist/module/style-collection/index.js.map +1 -1
- package/dist/module/style-collection/root.js +6 -0
- package/dist/module/style-collection/root.js.map +1 -1
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/index.d.ts +3 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +10 -6
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +19 -8
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts +4 -0
- package/dist/typescript/commonjs/src/compiler/inline-variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +14 -2
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +0 -3
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/line-height.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/line-height.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +8 -2
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/style-collection/index.d.ts +4 -1
- package/dist/typescript/commonjs/src/style-collection/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/style-collection/root.d.ts.map +1 -1
- package/dist/typescript/module/example/src/App.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/index.d.ts +3 -0
- package/dist/typescript/module/src/babel/index.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +10 -6
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +19 -8
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/inline-variables.d.ts +4 -0
- package/dist/typescript/module/src/compiler/inline-variables.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts +1 -1
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/api.d.ts +14 -2
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +0 -3
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/line-height.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/line-height.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/web/api.d.ts +8 -2
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/style-collection/index.d.ts +4 -1
- package/dist/typescript/module/src/style-collection/index.d.ts.map +1 -1
- package/dist/typescript/module/src/style-collection/root.d.ts.map +1 -1
- package/package.json +11 -13
- package/src/babel/index.ts +2 -2
- package/src/compiler/atRules.ts +4 -26
- package/src/compiler/compiler.ts +89 -27
- package/src/compiler/compiler.types.ts +15 -6
- package/src/compiler/declarations.ts +231 -121
- package/src/compiler/inline-variables.ts +209 -0
- package/src/compiler/selector-builder.ts +7 -5
- package/src/compiler/stylesheet.ts +10 -9
- package/src/components/react-native-safe-area-context.native.tsx +1 -2
- package/src/jest/index.ts +3 -4
- package/src/metro/index.ts +12 -11
- package/src/runtime/native/{api.ts → api.tsx} +37 -6
- package/src/runtime/native/react/useNativeCss.ts +2 -1
- package/src/runtime/native/reactivity.ts +1 -8
- package/src/runtime/native/styles/calculate-props.ts +19 -1
- package/src/runtime/native/styles/line-height.ts +25 -0
- package/src/runtime/native/styles/resolve.ts +2 -0
- package/src/runtime/native/styles/shorthands/box-shadow.ts +15 -19
- package/src/runtime/native/styles/units.ts +13 -8
- package/src/runtime/native/styles/variables.ts +1 -1
- package/src/runtime/web/{api.ts → api.tsx} +28 -2
- package/src/style-collection/index.ts +14 -0
- package/src/style-collection/root.ts +13 -0
|
@@ -13,6 +13,7 @@ exports.parseAlignItems = parseAlignItems;
|
|
|
13
13
|
exports.parseAlignSelf = parseAlignSelf;
|
|
14
14
|
exports.parseAngle = parseAngle;
|
|
15
15
|
exports.parseAspectRatio = parseAspectRatio;
|
|
16
|
+
exports.parseBackfaceVisibility = parseBackfaceVisibility;
|
|
16
17
|
exports.parseBorderBlockWidth = parseBorderBlockWidth;
|
|
17
18
|
exports.parseBorderInlineStyle = parseBorderInlineStyle;
|
|
18
19
|
exports.parseBorderInlineWidth = parseBorderInlineWidth;
|
|
@@ -21,6 +22,7 @@ exports.parseBorderSideWidthDeclaration = parseBorderSideWidthDeclaration;
|
|
|
21
22
|
exports.parseBorderStyle = parseBorderStyle;
|
|
22
23
|
exports.parseBorderStyleDeclaration = parseBorderStyleDeclaration;
|
|
23
24
|
exports.parseBoxShadow = parseBoxShadow;
|
|
25
|
+
exports.parseBoxSizing = parseBoxSizing;
|
|
24
26
|
exports.parseCalcArguments = parseCalcArguments;
|
|
25
27
|
exports.parseCalcFn = parseCalcFn;
|
|
26
28
|
exports.parseColor = parseColor;
|
|
@@ -30,6 +32,7 @@ exports.parseCustomDeclaration = parseCustomDeclaration;
|
|
|
30
32
|
exports.parseDeclaration = parseDeclaration;
|
|
31
33
|
exports.parseDimension = parseDimension;
|
|
32
34
|
exports.parseDimensionPercentageFor_LengthValue = parseDimensionPercentageFor_LengthValue;
|
|
35
|
+
exports.parseDirection = parseDirection;
|
|
33
36
|
exports.parseDisplay = parseDisplay;
|
|
34
37
|
exports.parseEnv = parseEnv;
|
|
35
38
|
exports.parseFontColorDeclaration = parseFontColorDeclaration;
|
|
@@ -46,6 +49,7 @@ exports.parseJustifyContent = parseJustifyContent;
|
|
|
46
49
|
exports.parseLength = parseLength;
|
|
47
50
|
exports.parseLengthDeclaration = parseLengthDeclaration;
|
|
48
51
|
exports.parseLengthOrCoercePercentageToRuntime = parseLengthOrCoercePercentageToRuntime;
|
|
52
|
+
exports.parseLengthPercentageDeclaration = parseLengthPercentageDeclaration;
|
|
49
53
|
exports.parseLengthPercentageOrAuto = parseLengthPercentageOrAuto;
|
|
50
54
|
exports.parseLengthPercentageOrAutoDeclaration = parseLengthPercentageOrAutoDeclaration;
|
|
51
55
|
exports.parseLineHeight = parseLineHeight;
|
|
@@ -59,6 +63,7 @@ exports.parseSize = parseSize;
|
|
|
59
63
|
exports.parseSize2DDimensionPercentage = parseSize2DDimensionPercentage;
|
|
60
64
|
exports.parseSize2DDimensionPercentageDeclaration = parseSize2DDimensionPercentageDeclaration;
|
|
61
65
|
exports.parseSizeDeclaration = parseSizeDeclaration;
|
|
66
|
+
exports.parseSizeWithAutoDeclaration = parseSizeWithAutoDeclaration;
|
|
62
67
|
exports.parseTextAlign = parseTextAlign;
|
|
63
68
|
exports.parseTextDecorationLine = parseTextDecorationLine;
|
|
64
69
|
exports.parseTextDecorationLineDeclaration = parseTextDecorationLineDeclaration;
|
|
@@ -75,18 +80,17 @@ exports.reduceParseUnparsed = reduceParseUnparsed;
|
|
|
75
80
|
exports.round = round;
|
|
76
81
|
exports.unparsedFunction = unparsedFunction;
|
|
77
82
|
var _colorjs = _interopRequireDefault(require("colorjs.io"));
|
|
83
|
+
var _index = require("../runtime/utils/index.js");
|
|
78
84
|
var _keyframes = require("./keyframes.js");
|
|
79
85
|
var _selectors = require("./selectors.js");
|
|
80
86
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
81
|
-
// cSpell:ignore rcap,vmin,svmin,lvmin,dvmin,cqmin,vmax,svmax,lvmax,dvmax,cqmax,currentcolor,oklab,oklch,prophoto
|
|
87
|
+
// cSpell:ignore rcap,vmin,svmin,lvmin,dvmin,cqmin,vmax,svmax,lvmax,dvmax,cqmax,currentcolor,oklab,oklch,prophoto,squircle,oldstyle,nums
|
|
82
88
|
|
|
83
89
|
const CommaSeparator = Symbol("CommaSeparator");
|
|
84
90
|
const propertyRename = {
|
|
85
91
|
"background-image": "experimental_backgroundImage"
|
|
86
92
|
};
|
|
87
|
-
|
|
88
|
-
// TODO: We need a better way to handle this
|
|
89
|
-
const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "text-shadow", "transform", "scale", "rotate", "translate"]);
|
|
93
|
+
const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "line-height", "rotate", "scale", "text-shadow", "transform", "translate"]);
|
|
90
94
|
const parsers = {
|
|
91
95
|
"align-content": parseAlignContent,
|
|
92
96
|
"align-items": parseAlignItems,
|
|
@@ -101,6 +105,7 @@ const parsers = {
|
|
|
101
105
|
"animation-play-state": addAnimationValue,
|
|
102
106
|
"animation-timing-function": addAnimationValue,
|
|
103
107
|
"aspect-ratio": parseAspectRatio,
|
|
108
|
+
"backface-visibility": parseBackfaceVisibility,
|
|
104
109
|
"background-color": parseColorDeclaration,
|
|
105
110
|
"background-image": parseBackgroundImage,
|
|
106
111
|
"block-size": parseSizeDeclaration,
|
|
@@ -156,8 +161,9 @@ const parsers = {
|
|
|
156
161
|
"border-top-style": parseBorderStyleDeclaration,
|
|
157
162
|
"border-top-width": parseBorderSideWidthDeclaration,
|
|
158
163
|
"border-width": parseBorderWidth,
|
|
159
|
-
"bottom":
|
|
164
|
+
"bottom": parseSizeWithAutoDeclaration,
|
|
160
165
|
"box-shadow": parseBoxShadow,
|
|
166
|
+
"box-sizing": parseBoxSizing,
|
|
161
167
|
"caret-color": parseColorOrAutoDeclaration,
|
|
162
168
|
"color": parseFontColorDeclaration,
|
|
163
169
|
"column-gap": parseGap,
|
|
@@ -165,10 +171,11 @@ const parsers = {
|
|
|
165
171
|
"container-name": parseContainerName,
|
|
166
172
|
"container-type": parseContainerType,
|
|
167
173
|
"display": parseDisplay,
|
|
174
|
+
"direction": parseDirection,
|
|
168
175
|
"fill": parseSVGPaint,
|
|
169
176
|
"filter": parseFilter,
|
|
170
177
|
"flex": parseFlex,
|
|
171
|
-
"flex-basis":
|
|
178
|
+
"flex-basis": parseLengthPercentageDeclaration,
|
|
172
179
|
"flex-direction": ({
|
|
173
180
|
value
|
|
174
181
|
}) => value,
|
|
@@ -189,30 +196,30 @@ const parsers = {
|
|
|
189
196
|
"font-variant-caps": parseFontVariantCapsDeclaration,
|
|
190
197
|
"font-weight": parseFontWeightDeclaration,
|
|
191
198
|
"gap": parseGap,
|
|
192
|
-
"height":
|
|
193
|
-
"inline-size":
|
|
199
|
+
"height": parseSizeWithAutoDeclaration,
|
|
200
|
+
"inline-size": parseSizeWithAutoDeclaration,
|
|
194
201
|
"inset": parseInset,
|
|
195
202
|
"inset-block": parseInsetBlock,
|
|
196
|
-
"inset-block-end":
|
|
197
|
-
"inset-block-start":
|
|
203
|
+
"inset-block-end": parseLengthPercentageDeclaration,
|
|
204
|
+
"inset-block-start": parseLengthPercentageDeclaration,
|
|
198
205
|
"inset-inline": parseInsetInline,
|
|
199
|
-
"inset-inline-end":
|
|
200
|
-
"inset-inline-start":
|
|
206
|
+
"inset-inline-end": parseLengthPercentageDeclaration,
|
|
207
|
+
"inset-inline-start": parseLengthPercentageDeclaration,
|
|
201
208
|
"justify-content": parseJustifyContent,
|
|
202
|
-
"left":
|
|
209
|
+
"left": parseSizeWithAutoDeclaration,
|
|
203
210
|
"letter-spacing": parseLetterSpacing,
|
|
204
211
|
"line-height": parseLineHeightDeclaration,
|
|
205
212
|
"margin": parseMargin,
|
|
206
213
|
"margin-block": parseMarginBlock,
|
|
207
214
|
"margin-block-end": parseLengthPercentageOrAutoDeclaration,
|
|
208
215
|
"margin-block-start": parseLengthPercentageOrAutoDeclaration,
|
|
209
|
-
"margin-bottom":
|
|
216
|
+
"margin-bottom": parseSizeWithAutoDeclaration,
|
|
210
217
|
"margin-inline": parseMarginInline,
|
|
211
218
|
"margin-inline-end": parseLengthPercentageOrAutoDeclaration,
|
|
212
219
|
"margin-inline-start": parseLengthPercentageOrAutoDeclaration,
|
|
213
|
-
"margin-left":
|
|
214
|
-
"margin-right":
|
|
215
|
-
"margin-top":
|
|
220
|
+
"margin-left": parseSizeWithAutoDeclaration,
|
|
221
|
+
"margin-right": parseSizeWithAutoDeclaration,
|
|
222
|
+
"margin-top": parseSizeWithAutoDeclaration,
|
|
216
223
|
"max-block-size": parseSizeDeclaration,
|
|
217
224
|
"max-height": parseSizeDeclaration,
|
|
218
225
|
"max-inline-size": parseSizeDeclaration,
|
|
@@ -223,21 +230,24 @@ const parsers = {
|
|
|
223
230
|
"min-width": parseSizeDeclaration,
|
|
224
231
|
"opacity": ({
|
|
225
232
|
value
|
|
226
|
-
}) => value,
|
|
233
|
+
}) => round(value),
|
|
234
|
+
"outline-color": parseColorDeclaration,
|
|
235
|
+
"outline-style": parseOutlineStyle,
|
|
236
|
+
"outline-width": parseBorderSideWidthDeclaration,
|
|
227
237
|
"overflow": parseOverflow,
|
|
228
238
|
"padding": parsePadding,
|
|
229
239
|
"padding-block": parsePaddingBlock,
|
|
230
|
-
"padding-block-end":
|
|
231
|
-
"padding-block-start":
|
|
240
|
+
"padding-block-end": parseLengthPercentageDeclaration,
|
|
241
|
+
"padding-block-start": parseLengthPercentageDeclaration,
|
|
232
242
|
"padding-bottom": parseSizeDeclaration,
|
|
233
243
|
"padding-inline": parsePaddingInline,
|
|
234
|
-
"padding-inline-end":
|
|
235
|
-
"padding-inline-start":
|
|
244
|
+
"padding-inline-end": parseLengthPercentageDeclaration,
|
|
245
|
+
"padding-inline-start": parseLengthPercentageDeclaration,
|
|
236
246
|
"padding-left": parseSizeDeclaration,
|
|
237
247
|
"padding-right": parseSizeDeclaration,
|
|
238
248
|
"padding-top": parseSizeDeclaration,
|
|
239
249
|
"position": parsePosition,
|
|
240
|
-
"right":
|
|
250
|
+
"right": parseSizeWithAutoDeclaration,
|
|
241
251
|
"rotate": parseRotate,
|
|
242
252
|
"row-gap": parseGap,
|
|
243
253
|
"scale": parseScale,
|
|
@@ -252,7 +262,7 @@ const parsers = {
|
|
|
252
262
|
"text-transform": ({
|
|
253
263
|
value
|
|
254
264
|
}) => value.case,
|
|
255
|
-
"top":
|
|
265
|
+
"top": parseSizeWithAutoDeclaration,
|
|
256
266
|
"transform": parseTransform,
|
|
257
267
|
"transition": addTransitionValue,
|
|
258
268
|
"transition-delay": addTransitionValue,
|
|
@@ -263,7 +273,7 @@ const parsers = {
|
|
|
263
273
|
"user-select": parseUserSelect,
|
|
264
274
|
"vertical-align": parseVerticalAlign,
|
|
265
275
|
"visibility": parseVisibility,
|
|
266
|
-
"width":
|
|
276
|
+
"width": parseSizeWithAutoDeclaration,
|
|
267
277
|
"z-index": parseZIndex
|
|
268
278
|
};
|
|
269
279
|
|
|
@@ -335,23 +345,25 @@ function parseBorderRadius({
|
|
|
335
345
|
});
|
|
336
346
|
}
|
|
337
347
|
function parseBorderColor(declaration, builder) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
builder.addDescriptor(
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
builder.addDescriptor("border-
|
|
353
|
-
|
|
354
|
-
|
|
348
|
+
if (declaration.property === "border-color") {
|
|
349
|
+
builder.addShorthand("border-color", {
|
|
350
|
+
"border-top-color": parseColor(declaration.value.top, builder),
|
|
351
|
+
"border-bottom-color": parseColor(declaration.value.bottom, builder),
|
|
352
|
+
"border-left-color": parseColor(declaration.value.left, builder),
|
|
353
|
+
"border-right-color": parseColor(declaration.value.right, builder)
|
|
354
|
+
});
|
|
355
|
+
} else {
|
|
356
|
+
const start = parseColor(declaration.value.start, builder);
|
|
357
|
+
const end = parseColor(declaration.value.end, builder);
|
|
358
|
+
if (start === end) {
|
|
359
|
+
builder.addDescriptor(declaration.property, start);
|
|
360
|
+
} else if (declaration.property === "border-block-color") {
|
|
361
|
+
builder.addDescriptor("border-top-color", start);
|
|
362
|
+
builder.addDescriptor("border-bottom-color", end);
|
|
363
|
+
} else {
|
|
364
|
+
builder.addDescriptor("border-left-color", start);
|
|
365
|
+
builder.addDescriptor("border-right-color", end);
|
|
366
|
+
}
|
|
355
367
|
}
|
|
356
368
|
}
|
|
357
369
|
function parseBorderWidth({
|
|
@@ -468,16 +480,24 @@ function parseMarginBlock({
|
|
|
468
480
|
value
|
|
469
481
|
}, builder) {
|
|
470
482
|
builder.addShorthand("margin-block", {
|
|
471
|
-
"margin-block-start": parseLengthPercentageOrAuto(value.blockStart, builder
|
|
472
|
-
|
|
483
|
+
"margin-block-start": parseLengthPercentageOrAuto(value.blockStart, builder, {
|
|
484
|
+
allowAuto: true
|
|
485
|
+
}),
|
|
486
|
+
"margin-block-end": parseLengthPercentageOrAuto(value.blockEnd, builder, {
|
|
487
|
+
allowAuto: true
|
|
488
|
+
})
|
|
473
489
|
});
|
|
474
490
|
}
|
|
475
491
|
function parseMarginInline({
|
|
476
492
|
value
|
|
477
493
|
}, builder) {
|
|
478
494
|
builder.addShorthand("margin-inline", {
|
|
479
|
-
"margin-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder
|
|
480
|
-
|
|
495
|
+
"margin-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder, {
|
|
496
|
+
allowAuto: true
|
|
497
|
+
}),
|
|
498
|
+
"margin-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder, {
|
|
499
|
+
allowAuto: true
|
|
500
|
+
})
|
|
481
501
|
});
|
|
482
502
|
}
|
|
483
503
|
function parsePadding({
|
|
@@ -598,11 +618,7 @@ function parseLetterSpacing({
|
|
|
598
618
|
if (value.type === "normal") {
|
|
599
619
|
return;
|
|
600
620
|
}
|
|
601
|
-
|
|
602
|
-
if (Array.isArray(descriptor) && descriptor[1] === "em" && typeof descriptor[2] === "number") {
|
|
603
|
-
return descriptor[2];
|
|
604
|
-
}
|
|
605
|
-
return descriptor;
|
|
621
|
+
return parseLength(value.value, builder);
|
|
606
622
|
}
|
|
607
623
|
function parseTextDecoration({
|
|
608
624
|
value
|
|
@@ -670,7 +686,9 @@ function parseUnparsedDeclaration(declaration, builder) {
|
|
|
670
686
|
builder.addDescriptor("--__rn-css-em", value);
|
|
671
687
|
}
|
|
672
688
|
if (property === "color") {
|
|
673
|
-
|
|
689
|
+
if (!(0, _index.isStyleFunction)(value) || value[1] !== "var" || value[2] !== "-css-color") {
|
|
690
|
+
builder.addDescriptor("--__rn-css-color", value);
|
|
691
|
+
}
|
|
674
692
|
}
|
|
675
693
|
}
|
|
676
694
|
}
|
|
@@ -679,13 +697,24 @@ function parseCustomDeclaration(declaration, builder) {
|
|
|
679
697
|
if (property === "-webkit-line-clamp") {
|
|
680
698
|
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
681
699
|
} else if (property === "-rn-ripple-style") {
|
|
682
|
-
|
|
700
|
+
if (parseUnparsed(declaration.value.value, builder, property) === "borderless") {
|
|
701
|
+
builder.addDescriptor(property, true);
|
|
702
|
+
}
|
|
703
|
+
} else if (property === "-rn-ripple-layer") {
|
|
704
|
+
if (parseUnparsed(declaration.value.value, builder, property) === "foreground") {
|
|
705
|
+
builder.addDescriptor(property, true);
|
|
706
|
+
}
|
|
683
707
|
} else if (property === "object-fit") {
|
|
684
708
|
// https://github.com/parcel-bundler/lightningcss/issues/1046
|
|
685
709
|
parseObjectFit(declaration.value, builder);
|
|
686
710
|
} else if (property === "object-position") {
|
|
687
711
|
// https://github.com/parcel-bundler/lightningcss/issues/1047
|
|
688
712
|
parseObjectPosition(declaration.value, builder);
|
|
713
|
+
} else if (property === "outline-offset") {
|
|
714
|
+
// https://github.com/parcel-bundler/lightningcss/issues/1048
|
|
715
|
+
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
716
|
+
} else if (property === "corner-shape") {
|
|
717
|
+
parseCornerShape(declaration.value, builder);
|
|
689
718
|
} else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
|
|
690
719
|
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
691
720
|
} else {
|
|
@@ -752,7 +781,7 @@ function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoPro
|
|
|
752
781
|
} else if (tokenOrValue === "false") {
|
|
753
782
|
return false;
|
|
754
783
|
} else if (tokenOrValue === "currentcolor") {
|
|
755
|
-
return [{}, "var", "__rn-css-
|
|
784
|
+
return [{}, "var", "__rn-css-color"];
|
|
756
785
|
} else {
|
|
757
786
|
return tokenOrValue;
|
|
758
787
|
}
|
|
@@ -763,8 +792,13 @@ function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoPro
|
|
|
763
792
|
if (Array.isArray(tokenOrValue)) {
|
|
764
793
|
const args = reduceParseUnparsed(tokenOrValue, builder, property, allowAuto);
|
|
765
794
|
if (!args) return;
|
|
766
|
-
if (Array.isArray(args) && args.length === 1)
|
|
767
|
-
|
|
795
|
+
if (Array.isArray(args) && args.length === 1) {
|
|
796
|
+
return args[0];
|
|
797
|
+
} else if ((property === "filter" || property === "transform") && (0, _index.isStyleFunction)(args)) {
|
|
798
|
+
return [args];
|
|
799
|
+
} else {
|
|
800
|
+
return args;
|
|
801
|
+
}
|
|
768
802
|
}
|
|
769
803
|
switch (tokenOrValue.type) {
|
|
770
804
|
case "unresolved-color":
|
|
@@ -853,7 +887,7 @@ function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoPro
|
|
|
853
887
|
builder.addWarning("value", value);
|
|
854
888
|
return;
|
|
855
889
|
} else if (value === "currentcolor") {
|
|
856
|
-
return [{}, "var", "__rn-css-
|
|
890
|
+
return [{}, "var", "__rn-css-color"];
|
|
857
891
|
}
|
|
858
892
|
if (value === "true") {
|
|
859
893
|
return true;
|
|
@@ -948,9 +982,9 @@ function parseLength(length, builder) {
|
|
|
948
982
|
case "px":
|
|
949
983
|
{
|
|
950
984
|
if (length.value === Infinity) {
|
|
951
|
-
return
|
|
985
|
+
return Number.MAX_SAFE_INTEGER;
|
|
952
986
|
} else if (length.value === -Infinity) {
|
|
953
|
-
return
|
|
987
|
+
return Number.MIN_SAFE_INTEGER;
|
|
954
988
|
} else {
|
|
955
989
|
// Normalize large values to safe integers, e.g. `calc(infinity * 1px)`
|
|
956
990
|
const value = Math.max(Math.min(length.value, Number.MAX_SAFE_INTEGER), Number.MIN_SAFE_INTEGER);
|
|
@@ -1058,6 +1092,11 @@ function parseAngle(angle, builder) {
|
|
|
1058
1092
|
function parseSizeDeclaration(declaration, builder) {
|
|
1059
1093
|
return parseSize(declaration.value, builder);
|
|
1060
1094
|
}
|
|
1095
|
+
function parseSizeWithAutoDeclaration(declaration, builder) {
|
|
1096
|
+
return parseSize(declaration.value, builder, {
|
|
1097
|
+
allowAuto: true
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1061
1100
|
function parsePointerEvents({
|
|
1062
1101
|
value
|
|
1063
1102
|
}, builder) {
|
|
@@ -1121,7 +1160,9 @@ function parseColorOrAutoDeclaration({
|
|
|
1121
1160
|
}
|
|
1122
1161
|
function parseFontColorDeclaration(declaration, builder) {
|
|
1123
1162
|
parseColorDeclaration(declaration, builder);
|
|
1124
|
-
|
|
1163
|
+
if (typeof declaration.value !== "object" || declaration.value.type !== "currentcolor") {
|
|
1164
|
+
builder.addDescriptor("--__rn-css-color", parseColor(declaration.value, builder));
|
|
1165
|
+
}
|
|
1125
1166
|
}
|
|
1126
1167
|
function parseColorDeclaration(declaration, builder) {
|
|
1127
1168
|
builder.addDescriptor(declaration.property, parseColor(declaration.value, builder));
|
|
@@ -1140,7 +1181,7 @@ function parseColor(cssColor, builder) {
|
|
|
1140
1181
|
} = builder.getOptions();
|
|
1141
1182
|
switch (cssColor.type) {
|
|
1142
1183
|
case "currentcolor":
|
|
1143
|
-
return [{}, "var", "__rn-css-
|
|
1184
|
+
return [{}, "var", "__rn-css-color"];
|
|
1144
1185
|
case "light-dark":
|
|
1145
1186
|
{
|
|
1146
1187
|
const extraRule = {
|
|
@@ -1273,9 +1314,14 @@ function parseColor(cssColor, builder) {
|
|
|
1273
1314
|
});
|
|
1274
1315
|
}
|
|
1275
1316
|
}
|
|
1276
|
-
function
|
|
1317
|
+
function parseLengthPercentageDeclaration(value, builder) {
|
|
1277
1318
|
return parseLengthPercentageOrAuto(value.value, builder);
|
|
1278
1319
|
}
|
|
1320
|
+
function parseLengthPercentageOrAutoDeclaration(value, builder) {
|
|
1321
|
+
return parseLengthPercentageOrAuto(value.value, builder, {
|
|
1322
|
+
allowAuto: true
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1279
1325
|
function parseLengthPercentageOrAuto(lengthPercentageOrAuto, builder, {
|
|
1280
1326
|
allowAuto = false
|
|
1281
1327
|
} = {}) {
|
|
@@ -1321,7 +1367,7 @@ function parseJustifyContent(declaration, builder) {
|
|
|
1321
1367
|
return value;
|
|
1322
1368
|
}
|
|
1323
1369
|
function parseAlignContent(declaration, builder) {
|
|
1324
|
-
const allowed = new Set(["flex-start", "flex-end", "center", "stretch", "space-between", "space-around"]);
|
|
1370
|
+
const allowed = new Set(["flex-start", "flex-end", "center", "stretch", "space-between", "space-around", "space-evenly"]);
|
|
1325
1371
|
let value;
|
|
1326
1372
|
switch (declaration.value.type) {
|
|
1327
1373
|
case "normal":
|
|
@@ -1405,7 +1451,7 @@ function parseFontWeight(fontWeight, builder) {
|
|
|
1405
1451
|
switch (fontWeight.type) {
|
|
1406
1452
|
case "absolute":
|
|
1407
1453
|
if (fontWeight.value.type === "weight") {
|
|
1408
|
-
return fontWeight.value.value
|
|
1454
|
+
return fontWeight.value.value;
|
|
1409
1455
|
} else {
|
|
1410
1456
|
return fontWeight.value.type;
|
|
1411
1457
|
}
|
|
@@ -1426,8 +1472,8 @@ function parseTextShadow(declaration, builder) {
|
|
|
1426
1472
|
return;
|
|
1427
1473
|
}
|
|
1428
1474
|
builder.addDescriptor("textShadowColor", parseColor(textShadow.color, builder));
|
|
1429
|
-
builder.addDescriptor("textShadowOffset.width", parseLength(textShadow.xOffset, builder));
|
|
1430
|
-
builder.addDescriptor("textShadowOffset.height", parseLength(textShadow.yOffset, builder));
|
|
1475
|
+
builder.addDescriptor("*.textShadowOffset.width", parseLength(textShadow.xOffset, builder));
|
|
1476
|
+
builder.addDescriptor("*.textShadowOffset.height", parseLength(textShadow.yOffset, builder));
|
|
1431
1477
|
builder.addDescriptor("textShadowRadius", parseLength(textShadow.blur, builder));
|
|
1432
1478
|
}
|
|
1433
1479
|
function parseTextDecorationStyle(declaration, builder) {
|
|
@@ -1465,7 +1511,7 @@ function parseTextDecorationLine(value, builder) {
|
|
|
1465
1511
|
function parsePosition({
|
|
1466
1512
|
value
|
|
1467
1513
|
}, builder) {
|
|
1468
|
-
if (value.type === "absolute" || value.type === "relative") {
|
|
1514
|
+
if (value.type === "absolute" || value.type === "relative" || value.type === "static") {
|
|
1469
1515
|
return value.type;
|
|
1470
1516
|
}
|
|
1471
1517
|
builder.addWarning("value", value.type);
|
|
@@ -1549,7 +1595,7 @@ function parseFontFamily({
|
|
|
1549
1595
|
return value[0];
|
|
1550
1596
|
}
|
|
1551
1597
|
function parseLineHeightDeclaration(declaration, builder) {
|
|
1552
|
-
|
|
1598
|
+
builder.addDescriptor("line-height", [{}, "lineHeight", [parseLineHeight(declaration.value, builder)], 1]);
|
|
1553
1599
|
}
|
|
1554
1600
|
function parseLineHeight(value, builder) {
|
|
1555
1601
|
switch (value.type) {
|
|
@@ -1635,16 +1681,20 @@ function parseLengthOrCoercePercentageToRuntime(value, builder) {
|
|
|
1635
1681
|
}
|
|
1636
1682
|
function parseGap(declaration, builder) {
|
|
1637
1683
|
if ("column" in declaration.value) {
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1684
|
+
const row = parseGapValue(declaration.value.row, builder);
|
|
1685
|
+
const column = parseGapValue(declaration.value.column, builder);
|
|
1686
|
+
if (row !== column) {
|
|
1687
|
+
builder.addDescriptor("row-gap", row);
|
|
1688
|
+
builder.addDescriptor("column-gap", column);
|
|
1689
|
+
} else {
|
|
1690
|
+
builder.addDescriptor("gap", row);
|
|
1645
1691
|
}
|
|
1692
|
+
} else if (declaration.value.type === "normal") {
|
|
1693
|
+
builder.addWarning("value", declaration.value.type);
|
|
1694
|
+
} else {
|
|
1646
1695
|
return parseLength(declaration.value.value, builder);
|
|
1647
1696
|
}
|
|
1697
|
+
return;
|
|
1648
1698
|
}
|
|
1649
1699
|
function parseGapValue(value, builder) {
|
|
1650
1700
|
if (value.type === "normal") {
|
|
@@ -1667,19 +1717,26 @@ function parseBoxShadow({
|
|
|
1667
1717
|
value
|
|
1668
1718
|
}, builder) {
|
|
1669
1719
|
for (const [index, shadow] of value.entries()) {
|
|
1670
|
-
builder.addDescriptor(
|
|
1671
|
-
builder.addDescriptor(
|
|
1672
|
-
builder.addDescriptor(
|
|
1673
|
-
builder.addDescriptor(
|
|
1674
|
-
builder.addDescriptor(
|
|
1675
|
-
builder.addDescriptor(
|
|
1720
|
+
builder.addDescriptor(`*.boxShadow.[${index}].color`, parseColor(shadow.color, builder));
|
|
1721
|
+
builder.addDescriptor(`*.boxShadow.[${index}].offsetX`, parseLength(shadow.xOffset, builder));
|
|
1722
|
+
builder.addDescriptor(`*.boxShadow.[${index}].offsetY`, parseLength(shadow.yOffset, builder));
|
|
1723
|
+
builder.addDescriptor(`*.boxShadow.[${index}].blurRadius`, parseLength(shadow.blur, builder));
|
|
1724
|
+
builder.addDescriptor(`*.boxShadow.[${index}].spreadDistance`, parseLength(shadow.spread, builder));
|
|
1725
|
+
builder.addDescriptor(`*.boxShadow.[${index}].inset`, shadow.inset ? true : undefined);
|
|
1676
1726
|
}
|
|
1677
1727
|
}
|
|
1728
|
+
function parseBoxSizing(declaration, builder) {
|
|
1729
|
+
if (["border-box", "content-box"].includes(declaration.value)) {
|
|
1730
|
+
return declaration.value;
|
|
1731
|
+
}
|
|
1732
|
+
builder.addWarning("value", declaration.value);
|
|
1733
|
+
return undefined;
|
|
1734
|
+
}
|
|
1678
1735
|
function parseDisplay({
|
|
1679
1736
|
value
|
|
1680
1737
|
}, builder) {
|
|
1681
1738
|
if (value.type === "keyword") {
|
|
1682
|
-
if (value.value === "none") {
|
|
1739
|
+
if (value.value === "none" || value.value === "contents") {
|
|
1683
1740
|
return value.value;
|
|
1684
1741
|
} else {
|
|
1685
1742
|
builder.addWarning("value", value.value);
|
|
@@ -1730,6 +1787,14 @@ function parseDisplay({
|
|
|
1730
1787
|
}
|
|
1731
1788
|
}
|
|
1732
1789
|
}
|
|
1790
|
+
function parseDirection(declaration, builder) {
|
|
1791
|
+
if (["ltr", "rtl"].includes(declaration.value)) {
|
|
1792
|
+
builder.addDescriptor("direction", declaration.value);
|
|
1793
|
+
builder.addDescriptor("--__rn-css-direction", declaration.value);
|
|
1794
|
+
}
|
|
1795
|
+
builder.addWarning("value", declaration.value);
|
|
1796
|
+
return;
|
|
1797
|
+
}
|
|
1733
1798
|
function parseAspectRatio({
|
|
1734
1799
|
value
|
|
1735
1800
|
}) {
|
|
@@ -1746,6 +1811,16 @@ function parseAspectRatio({
|
|
|
1746
1811
|
}
|
|
1747
1812
|
}
|
|
1748
1813
|
}
|
|
1814
|
+
function parseBackfaceVisibility({
|
|
1815
|
+
value
|
|
1816
|
+
}, builder) {
|
|
1817
|
+
if (["visible", "hidden"].includes(value)) {
|
|
1818
|
+
return value;
|
|
1819
|
+
} else {
|
|
1820
|
+
builder.addWarning("value", value);
|
|
1821
|
+
return;
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1749
1824
|
function parseDimension({
|
|
1750
1825
|
unit,
|
|
1751
1826
|
value
|
|
@@ -1982,7 +2057,7 @@ function equal(a, b) {
|
|
|
1982
2057
|
return false;
|
|
1983
2058
|
}
|
|
1984
2059
|
function parseTime(time) {
|
|
1985
|
-
return time.type === "milliseconds" ? time.value : time.value * 1000;
|
|
2060
|
+
return round(time.type === "milliseconds" ? time.value : time.value * 1000);
|
|
1986
2061
|
}
|
|
1987
2062
|
function parseSize2DDimensionPercentageDeclaration(declaration, builder) {
|
|
1988
2063
|
return parseSize2DDimensionPercentage(declaration.value, builder);
|
|
@@ -2155,6 +2230,14 @@ function parseObjectPosition(declaration, builder) {
|
|
|
2155
2230
|
});
|
|
2156
2231
|
builder.addDescriptor("object-position", [{}, "join", [parseUnparsed(declaration.value, builder, "object-position"), " "]]);
|
|
2157
2232
|
}
|
|
2233
|
+
function parseCornerShape(declaration, builder) {
|
|
2234
|
+
const shape = parseUnparsed(declaration.value, builder, "corner-shape");
|
|
2235
|
+
if (shape === "round") {
|
|
2236
|
+
builder.addDescriptor("borderCurve", "circular");
|
|
2237
|
+
} else if (shape === "squircle") {
|
|
2238
|
+
builder.addDescriptor("borderCurve", "continuous");
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2158
2241
|
function parseVisibility(declaration, builder) {
|
|
2159
2242
|
if (declaration.value === "visible") {
|
|
2160
2243
|
builder.addDescriptor("opacity", 1);
|
|
@@ -2164,6 +2247,14 @@ function parseVisibility(declaration, builder) {
|
|
|
2164
2247
|
builder.addWarning("value", declaration.value);
|
|
2165
2248
|
}
|
|
2166
2249
|
}
|
|
2250
|
+
function parseOutlineStyle(declaration, builder) {
|
|
2251
|
+
const allowed = ["solid", "dotted", "dashed"];
|
|
2252
|
+
if (declaration.value.type !== "auto" && allowed.includes(declaration.value.value)) {
|
|
2253
|
+
builder.addDescriptor("outlineStyle", declaration.value.value);
|
|
2254
|
+
} else {
|
|
2255
|
+
builder.addWarning("value", declaration.value.type === "auto" ? "auto" : declaration.value.value);
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2167
2258
|
function parseFilter(declaration, builder) {
|
|
2168
2259
|
if (declaration.value.type === "none") {
|
|
2169
2260
|
return "unset";
|