From ffb5685e1146e0ae9671efa52dac18525f70270d Mon Sep 17 00:00:00 2001 From: "asamuzaK (Kazz)" Date: Fri, 20 Feb 2026 22:26:29 +0900 Subject: [PATCH] Add paint for function types --- lib/utils/propertyDescriptors.js | 4 ++-- scripts/prepare.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/propertyDescriptors.js b/lib/utils/propertyDescriptors.js index c036d72c..1953eabb 100644 --- a/lib/utils/propertyDescriptors.js +++ b/lib/utils/propertyDescriptors.js @@ -40,7 +40,7 @@ function createGenericPropertyDescriptor(property, { caseSensitive, dimensionTyp number: numberType, percentage: percentageType } = dimensionTypes; - const { color: colorType, image: imageType } = functionTypes; + const { color: colorType, image: imageType, paint: paintType } = functionTypes; const [{ name, type, value: itemValue }] = parsedValue; switch (type) { case AST_TYPES.CALC: { @@ -111,7 +111,7 @@ function createGenericPropertyDescriptor(property, { caseSensitive, dimensionTyp } case AST_TYPES.FUNCTION: default: { - if (colorType) { + if (colorType || paintType) { this._setProperty(property, parsers.serializeColor(parsedValue), priority); } else if (imageType) { this._setProperty(property, parsers.serializeGradient(parsedValue), priority); diff --git a/scripts/prepare.mjs b/scripts/prepare.mjs index dc2a3e02..8cd80b4a 100644 --- a/scripts/prepare.mjs +++ b/scripts/prepare.mjs @@ -38,7 +38,7 @@ const dimensionTypes = [ "time", "time-percentage" ]; -const functionTypes = ["color", "image"]; +const functionTypes = ["color", "image", "paint"]; const typeList = new Set([...caseSensitiveTypes, ...dimensionTypes, ...functionTypes]); await Promise.all([generateDefinitions(), generateDescriptors()]);