Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Cross rule CSS var resolution (#5698)

Oleg Isonen198ae5d65aac
diff --git a/apps/builder/app/builder/shared/css-editor/parse-style-input.test.ts b/apps/builder/app/builder/shared/css-editor/parse-style-input.test.ts
index 552d97b734..e1c756b01a 100644
--- a/apps/builder/app/builder/shared/css-editor/parse-style-input.test.ts
+++ b/apps/builder/app/builder/shared/css-editor/parse-style-input.test.ts
@@ -107,7 +107,7 @@ describe("parseStyleInput", () => {
);
});
- test("preserves -webkit-text-stroke as shorthand property, not as CSS variable", () => {
+ test("keeps expanded -webkit-text-stroke longhands as regular properties", () => {
const { styleMap: result } = parseStyleInput(
"-webkit-text-stroke: 1px red",
new Map()
@@ -115,13 +115,18 @@ describe("parseStyleInput", () => {
expect(result).toEqual(
new Map([
[
- "-webkit-text-stroke",
+ "-webkit-text-stroke-width",
{
- type: "tuple",
- value: [
- { type: "unit", unit: "px", value: 1 },
- { type: "keyword", value: "red" },
- ],
+ type: "unit",
+ unit: "px",
+ value: 1,
+ },
+ ],
+ [
+ "-webkit-text-stroke-color",
+ {
+ type: "keyword",
+ value: "red",
},
],
])
diff --git a/apps/builder/app/builder/shared/css-editor/parse-style-input.ts b/apps/builder/app/builder/shared/css-editor/parse-style-input.ts
index 3bd5f0779e..8ce315f0b3 100644
--- a/apps/builder/app/builder/shared/css-editor/parse-style-input.ts
+++ b/apps/builder/app/builder/shared/css-editor/parse-style-input.ts
@@ -54,6 +54,7 @@ export const parseStyleInput = (
const { styles, errors } = parseCss(`selector{${css}}`, cssVars);
const styleMap: CssStyleMap = new Map();
for (const { property, value } of styles) {
+ const keepVendorLonghand = property.startsWith("-webkit-text-stroke-");
if (property.startsWith("--")) {
styleMap.set(property, value);
continue;
@@ -62,6 +63,7 @@ export const parseStyleInput = (
// but keep known shorthands like -webkit-text-stroke as-is
if (
propertiesData[property] === undefined &&
+ keepVendorLonghand === false &&
shorthandProperties.includes(
property as (typeof shorthandProperties)[number]
) === false
diff --git a/apps/builder/app/shared/html.test.tsx b/apps/builder/app/shared/html.test.tsx
index 59a49dcd4f..0a04d5fff2 100644
--- a/apps/builder/app/shared/html.test.tsx
+++ b/apps/builder/app/shared/html.test.tsx
@@ -2948,4 +2948,31 @@ describe("style tag to tokens", () => {
);
});
});
+
+ test("resolves cross-rule CSS variable in background shorthand", () => {
+ // --clr-red is defined in .my-parent but used in .my-child.
+ // background: var(--clr-red) must expand to background-color with the
+ // var() reference preserved — NOT inlined to the concrete color #f00.
+ const result = _generateFragmentFromHtml(`
+ <style>
+ .my-parent { --clr-red: #f00; }
+ .my-child { background: var(--clr-red); }
+ </style>
+ <div class="my-parent">
+ <div class="my-child">test</div>
+ </div>
+ `);
+ const childToken = result.styleSources.find(
+ (s) => s.type === "token" && s.name === "my-child"
+ );
+ expect(childToken).toBeDefined();
+ const bgColor = result.styles.find(
+ (s) =>
+ s.styleSourceId === childToken!.id && s.property === "backgroundColor"
+ );
+ // Must be a var() reference, not a concrete inlined color
+ expect(bgColor?.value).toEqual(
+ expect.objectContaining({ type: "var", value: "clr-red" })
+ );
+ });
});
diff --git a/apps/builder/app/shared/html.ts b/apps/builder/app/shared/html.ts
index 931dcc0678..c6ca75c645 100644
--- a/apps/builder/app/shared/html.ts
+++ b/apps/builder/app/shared/html.ts
@@ -18,6 +18,7 @@ import { ariaAttributes, attributesByTag } from "@webstudio-is/html-data";
import {
camelCaseProperty,
parseCss,
+ extractCssCustomProperties,
parseClassBasedSelector,
parseMediaQuery,
type ParsedStyleDecl,
@@ -530,8 +531,12 @@ export const generateFragmentFromHtml = (
const styleTexts = collectStyleTexts(documentFragment);
const allCssText = styleTexts.join("\n");
+ // Extract all CSS custom properties across all rules so cross-rule var()
+ // references (e.g. --clr defined in .parent, used in .child) can be resolved.
+ const allCssVars = extractCssCustomProperties(allCssText);
+
// Parse all CSS and classify rules
- const { styles: allDecls } = parseCss(allCssText, new Map());
+ const { styles: allDecls } = parseCss(allCssText, allCssVars);
const { classRules, nestedClassRules } = classifyRules(allDecls);
// Track which class names are used by elements — IDs will be assigned later
@@ -552,7 +557,7 @@ export const generateFragmentFromHtml = (
styleTagActions.push({ type: "skip" });
continue;
}
- const { styles: parsedDecls } = parseCss(text, new Map());
+ const { styles: parsedDecls } = parseCss(text, allCssVars);
const {
classRules: tagClassRules,
nestedClassRules: tagNestedRules,
diff --git a/apps/builder/app/shared/tailwind/tailwind.ts b/apps/builder/app/shared/tailwind/tailwind.ts
index b464e38286..aa86c37bab 100644
--- a/apps/builder/app/shared/tailwind/tailwind.ts
+++ b/apps/builder/app/shared/tailwind/tailwind.ts
@@ -267,7 +267,7 @@ const parseTailwindClasses = async (
}`;
parsedStyles.push(...parseCss(reset, new Map()).styles);
}
- parsedStyles.push(...parseCss(normalizedCss, new Map()).styles);
+ parsedStyles.push(...parseCss(normalizedCss, finalVars).styles);
// skip preflights with ::before, ::after and ::backdrop
parsedStyles = parsedStyles.filter(
(styleDecl) => !styleDecl.state?.startsWith("::")
diff --git a/packages/css-data/bin/shorthand-test-fixtures.ts b/packages/css-data/bin/shorthand-test-fixtures.ts
new file mode 100644
index 0000000000..b0895a6b72
--- /dev/null
+++ b/packages/css-data/bin/shorthand-test-fixtures.ts
@@ -0,0 +1,252 @@
+/**
+ * Generates src/__generated__/shorthand-test-fixtures.ts
+ *
+ * For every shorthand in shorthandProperties we produce two test cases:
+ *
+ * • singleToken – a CSS value string that, when used as the shorthand's value,
+ * expands so that exactly one (or more, if identical) longhand receives it.
+ * This tests the "cross-rule single-token var() preservation" path.
+ *
+ * • multiToken – a CSS value string that spans *all* longhands of the shorthand
+ * with different values per longhand, so no single longhand string equals the
+ * full value. This tests the "multi-token var() preservation" path.
+ *
+ * Values are derived from properties.ts initial values so the fixture stays in
+ * sync with the CSS spec data automatically.
+ *
+ * Run with: pnpm build:shorthand-fixtures
+ */
+
+import { writeFileSync, mkdirSync } from "node:fs";
+import { join, dirname } from "node:path";
+import { fileURLToPath } from "node:url";
+import { generate, parse } from "css-tree";
+import { toValue } from "@webstudio-is/css-engine";
+import { shorthandProperties } from "../src/__generated__/shorthand-properties";
+import { properties } from "../src/__generated__/properties";
+import { expandShorthands } from "../src/shorthands";
+import type { CssProperty } from "@webstudio-is/css-engine";
+
+const __dir = dirname(fileURLToPath(import.meta.url));
+const targetDir = join(__dir, "../src/__generated__");
+
+const autogeneratedHint =
+ "// This file was generated by pnpm build:shorthand-fixtures\n";
+
+const longhandProbeOverrides: Record<string, string[]> = {
+ "-webkit-text-stroke": ["1px red", "red", "1px"],
+ container: ["main / inline-size", "none", "normal"],
+ "grid-area": ["1 / 2", "auto"],
+ "grid-column": ["1 / 3", "auto"],
+ "grid-row": ["1 / 3", "auto"],
+ "grid-template": ["none / none", "none", "auto / 1fr"],
+ font: ["16px serif", "bold 18px/1.5 sans-serif", "menu"],
+};
+
+const fixtureOverrides: Record<
+ string,
+ { singleToken: string; multiToken: string }
+> = {
+ "-webkit-text-stroke": { singleToken: "red", multiToken: "1px red" },
+ container: { singleToken: "none", multiToken: "main / inline-size" },
+ font: {
+ singleToken: "16px serif",
+ multiToken: "bold 18px/1.5 sans-serif",
+ },
+ "grid-area": { singleToken: "auto", multiToken: "1 / 2 / 3 / 4" },
+ "grid-column": { singleToken: "auto", multiToken: "1 / 3" },
+ "grid-row": { singleToken: "auto", multiToken: "1 / 3" },
+ "grid-template": { singleToken: "none", multiToken: "none / 1fr" },
+};
+
+// ---------------------------------------------------------------------------
+// Helpers
+// ---------------------------------------------------------------------------
+
+/** Normalise a CSS value string through css-tree so whitespace/format matches
+ * what expandShorthands produces internally. */
+const normalizeCss = (value: string): string => {
+ try {
+ return generate(parse(value, { context: "value" }));
+ } catch {
+ return value;
+ }
+};
+
+/** Return the initial CSS string for a longhand that exists in properties.ts,
+ * or undefined if unknown. */
+const initialFor = (longhand: string): string | undefined => {
+ const p = properties[longhand as keyof typeof properties];
+ if (!p) {
+ return undefined;
+ }
+ return toValue(p.initial);
+};
+
+/** Given a shorthand name, drive expandShorthands with a placeholder value to
+ * get the canonical set of longhands it produces. Returns null when the
+ * shorthand passes straight through (i.e. expandShorthands doesn't know it). */
+const getLonghands = (shorthand: string): string[] | null => {
+ // Probe with a value that is accepted by virtually every shorthand.
+ // We go through a few candidates until we get genuine expansion.
+ const probes = [
+ ...(longhandProbeOverrides[shorthand] ?? []),
+ "none",
+ "initial",
+ "0",
+ "auto",
+ "normal",
+ ];
+ for (const probe of probes) {
+ const expanded = [...expandShorthands([[shorthand as CssProperty, probe]])];
+ // A passthrough means expandShorthands didn't handle it.
+ if (expanded.length === 1 && expanded[0][0] === shorthand) {
+ continue;
+ }
+ if (expanded.length > 0) {
+ return expanded.map(([k]) => k);
+ }
+ }
+ return null;
+};
+
+// ---------------------------------------------------------------------------
+// Build fixture entries
+// ---------------------------------------------------------------------------
+
+export type ShorthandFixture = {
+ /** The shorthand property name, e.g. "margin". */
+ property: string;
+ /**
+ * A CSS value string that maps to exactly one specific longhand initial value.
+ * When used as `margin: var(--v)` with `--v: <singleToken>`, the cross-rule
+ * path must:
+ * • preserve var() on whichever longhands match the single value
+ * • assign concrete initial resets to all other longhands
+ *
+ * If ALL longhands share the same initial value, singleToken equals that
+ * shared value and ALL longhands get var().
+ */
+ singleToken: string;
+ /**
+ * A CSS value string that spans multiple longhands differently.
+ * When used as `margin: var(--v)` with `--v: <multiToken>`, the cross-rule
+ * path must assign var() to ALL longhands (because no individual longhand
+ * string equals the multi-token string).
+ */
+ multiToken: string;
+ /** All longhand properties this shorthand expands to. */
+ longhands: string[];
+};
+
+const fixtures: ShorthandFixture[] = [];
+
+for (const shorthand of shorthandProperties) {
+ const longhands = getLonghands(shorthand);
+ if (!longhands || longhands.length === 0) {
+ // expandShorthands doesn't handle this shorthand; skip so the test can
+ // explicitly mark it as "passthrough" rather than silently missing it.
+ fixtures.push({
+ property: shorthand,
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ });
+ continue;
+ }
+
+ const override = fixtureOverrides[shorthand];
+ if (override) {
+ fixtures.push({
+ property: shorthand,
+ singleToken: override.singleToken,
+ multiToken: override.multiToken,
+ longhands,
+ });
+ continue;
+ }
+
+ // Collect normalised initial value strings for every known longhand.
+ const initStrings = longhands.map((l) => {
+ const raw = initialFor(l);
+ return raw !== undefined ? normalizeCss(raw) : null;
+ });
+
+ // --- singleToken: use the initial value of the first longhand that has one.
+ const singleToken =
+ initStrings.find((s): s is string => s !== null) ??
+ // absolute fallback – should not be reached for any supported shorthand
+ "none";
+
+ // --- multiToken: we need a value that, when used as the shorthand,
+ // produces different strings per longhand (so no individual longhand
+ // string equals the full shorthand string).
+ //
+ // Strategy: expand with a concrete value through expandShorthands and
+ // re-join the distinct longhand values. If we can reconstruct a valid
+ // shorthand value from the longhand initials via a known concrete
+ // shorthand value, we use it. Otherwise we pick a value where the
+ // longest longhand value is different from the shortest, making the
+ // "full string ≠ any single expanded string" invariant hold.
+ //
+ // For properties where every longhand has the same initial (margin,
+ // padding, …) we make multiToken a two-value variant so they differ.
+ const allSame =
+ initStrings.every((s) => s !== null) &&
+ new Set(initStrings as string[]).size === 1;
+
+ let multiToken: string;
+ if (allSame && initStrings[0] !== null) {
+ // Build a two-value form, e.g. "0px 8px" for margin.
+ // The two values must be genuinely different.
+ const base = initStrings[0] as string;
+ // Pick an alternative that is obviously different.
+ const alt =
+ base === "0px"
+ ? "8px"
+ : base === "none"
+ ? "url(#x)"
+ : base === "auto"
+ ? "0px"
+ : "16px";
+ multiToken = `${base} ${alt}`;
+ } else {
+ // Join all distinct non-null initial values. Even though this may not be
+ // valid CSS for the shorthand, it will:
+ // a) not parse as a valid shorthand via expandShorthands, OR
+ // b) parse and give genuinely different per-longhand values.
+ // Either way the multi-token cross-rule path kicks in correctly.
+ const distinct = [
+ ...new Set(initStrings.filter((s): s is string => s !== null)),
+ ];
+ multiToken =
+ distinct.length >= 2
+ ? distinct.join(" ")
+ : `${distinct[0] ?? "none"} extra`;
+ }
+
+ fixtures.push({ property: shorthand, singleToken, multiToken, longhands });
+}
+
+// ---------------------------------------------------------------------------
+// Write output
+// ---------------------------------------------------------------------------
+
+const content =
+ autogeneratedHint +
+ `
+export type ShorthandFixture = {
+ property: string;
+ singleToken: string;
+ multiToken: string;
+ longhands: string[];
+};
+
+export const shorthandTestFixtures: ShorthandFixture[] = ${JSON.stringify(fixtures, null, 2)} as const;
+`;
+
+mkdirSync(targetDir, { recursive: true });
+writeFileSync(join(targetDir, "shorthand-test-fixtures.ts"), content, "utf8");
+console.info(
+ `Written ${fixtures.length} fixtures to shorthand-test-fixtures.ts`
+);
diff --git a/packages/css-data/package.json b/packages/css-data/package.json
index ccf72a2ca1..09909241e3 100644
--- a/packages/css-data/package.json
+++ b/packages/css-data/package.json
@@ -10,6 +10,8 @@
"build:html.css": "tsx ./bin/html.css.ts && prettier --write ./src/__generated__/html.ts",
"build:mdn-data": "tsx ./bin/mdn-data.ts ./src/__generated__ && prettier --write \"./src/__generated__/\" \"../css-engine/src/__generated__/\"",
"build:descriptions": "tsx ./bin/property-value-descriptions.ts && prettier --write ./src/__generated__/property-value-descriptions.ts",
+ "build:shorthand-fixtures": "tsx ./bin/shorthand-test-fixtures.ts && prettier --write ./src/__generated__/shorthand-test-fixtures.ts",
+ "build:all": "pnpm build:html.css && pnpm build:mdn-data && pnpm build:descriptions && pnpm build:shorthand-fixtures",
"test": "vitest run"
},
"bin": {
@@ -18,7 +20,7 @@
"devDependencies": {
"@webstudio-is/tsconfig": "workspace:*",
"html-tags": "^4.0.0",
- "mdn-data": "2.23.0",
+ "mdn-data": "2.28.0",
"vitest": "^3.1.2",
"zod": "^3.24.2"
},
diff --git a/packages/css-data/src/__generated__/animatable-properties.ts b/packages/css-data/src/__generated__/animatable-properties.ts
index fe6f949504..3319412a4d 100644
--- a/packages/css-data/src/__generated__/animatable-properties.ts
+++ b/packages/css-data/src/__generated__/animatable-properties.ts
@@ -44,6 +44,7 @@ export const animatableProperties = [
"color",
"column-count",
"column-gap",
+ "column-height",
"column-rule-color",
"column-rule-width",
"column-width",
@@ -53,6 +54,14 @@ export const animatableProperties = [
"contain-intrinsic-width",
"container-type",
"content-visibility",
+ "corner-bottom-left-shape",
+ "corner-bottom-right-shape",
+ "corner-end-end-shape",
+ "corner-end-start-shape",
+ "corner-start-start-shape",
+ "corner-start-end-shape",
+ "corner-top-left-shape",
+ "corner-top-right-shape",
"counter-increment",
"counter-reset",
"counter-set",
@@ -60,6 +69,7 @@ export const animatableProperties = [
"cy",
"d",
"display",
+ "dynamic-range-limit",
"fill",
"fill-opacity",
"filter",
@@ -86,6 +96,8 @@ export const animatableProperties = [
"inset-block-start",
"inset-inline-end",
"inset-inline-start",
+ "interest-delay-end",
+ "interest-delay-start",
"left",
"letter-spacing",
"lighting-color",
@@ -133,6 +145,7 @@ export const animatableProperties = [
"perspective",
"perspective-origin",
"r",
+ "reading-order",
"right",
"rotate",
"row-gap",
@@ -167,6 +180,7 @@ export const animatableProperties = [
"stroke-width",
"tab-size",
"text-decoration-color",
+ "text-decoration-inset",
"text-decoration-thickness",
"text-emphasis-color",
"text-indent",
@@ -177,8 +191,6 @@ export const animatableProperties = [
"transform",
"transform-origin",
"translate",
- "vertical-align",
- "visibility",
"widows",
"width",
"word-spacing",
diff --git a/packages/css-data/src/__generated__/html.ts b/packages/css-data/src/__generated__/html.ts
index ab93882f5a..536e56353a 100644
--- a/packages/css-data/src/__generated__/html.ts
+++ b/packages/css-data/src/__generated__/html.ts
@@ -127,7 +127,10 @@ export const html: Map<string, StyleValue> = new Map([
["sup:font-size", { type: "keyword", value: "smaller" }],
["a:text-decoration-line", { type: "keyword", value: "underline" }],
["a:cursor", { type: "keyword", value: "pointer" }],
- ["a:color", { type: "rgb", alpha: 1, r: 0, g: 0, b: 238 }],
+ [
+ "a:color",
+ { type: "color", colorSpace: "srgb", components: [0, 0, 0.9333], alpha: 1 },
+ ],
["ul:display", { type: "keyword", value: "block" }],
["ul:list-style-type", { type: "keyword", value: "disc" }],
["ul:margin-top", { type: "unit", unit: "em", value: 1 }],
@@ -215,24 +218,15 @@ export const html: Map<string, StyleValue> = new Map([
["button:text-indent", { type: "unit", unit: "number", value: 0 }],
[
"textarea:text-shadow",
- {
- type: "layers",
- value: [{ type: "tuple", value: [{ type: "keyword", value: "none" }] }],
- },
+ { type: "layers", value: [{ type: "unparsed", value: "none" }] },
],
[
"select:text-shadow",
- {
- type: "layers",
- value: [{ type: "tuple", value: [{ type: "keyword", value: "none" }] }],
- },
+ { type: "layers", value: [{ type: "unparsed", value: "none" }] },
],
[
"button:text-shadow",
- {
- type: "layers",
- value: [{ type: "tuple", value: [{ type: "keyword", value: "none" }] }],
- },
+ { type: "layers", value: [{ type: "unparsed", value: "none" }] },
],
["textarea:display", { type: "keyword", value: "inline-block" }],
["select:display", { type: "keyword", value: "inline-block" }],
diff --git a/packages/css-data/src/__generated__/keyword-values.ts b/packages/css-data/src/__generated__/keyword-values.ts
index 0ccefb0230..21c345da65 100644
--- a/packages/css-data/src/__generated__/keyword-values.ts
+++ b/packages/css-data/src/__generated__/keyword-values.ts
@@ -430,6 +430,7 @@ export const keywordValues: KeywordValues = {
"self-end",
"flex-start",
"flex-end",
+ "anchor-center",
"initial",
"inherit",
"unset",
@@ -450,6 +451,7 @@ export const keywordValues: KeywordValues = {
"self-end",
"flex-start",
"flex-end",
+ "anchor-center",
"initial",
"inherit",
"unset",
@@ -510,23 +512,33 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
+ "animation-trigger": [
+ "none",
+ "play",
+ "play-once",
+ "play-forwards",
+ "play-backwards",
+ "pause",
+ "reset",
+ "replay",
+ "initial",
+ "inherit",
+ "unset",
+ ],
appearance: [
"none",
"auto",
- "textfield",
- "menulist-button",
"searchfield",
"textarea",
- "push-button",
- "slider-horizontal",
"checkbox",
"radio",
- "square-button",
"menulist",
"listbox",
"meter",
"progress-bar",
"button",
+ "textfield",
+ "menulist-button",
"initial",
"inherit",
"unset",
@@ -795,6 +807,7 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
+ "baseline-source": ["auto", "first", "last", "initial", "inherit", "unset"],
"block-size": [
"auto",
"min-content",
@@ -1397,7 +1410,7 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
- "border-collapse": ["collapse", "separate", "initial", "inherit", "unset"],
+ "border-collapse": ["separate", "collapse", "initial", "inherit", "unset"],
"border-end-end-radius": ["initial", "inherit", "unset"],
"border-end-start-radius": ["initial", "inherit", "unset"],
"border-image-outset": ["initial", "inherit", "unset"],
@@ -2403,7 +2416,23 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
- bottom: ["auto", "initial", "inherit", "unset"],
+ bottom: [
+ "auto",
+ "inside",
+ "outside",
+ "top",
+ "left",
+ "right",
+ "bottom",
+ "start",
+ "end",
+ "self-start",
+ "self-end",
+ "center",
+ "initial",
+ "inherit",
+ "unset",
+ ],
"box-decoration-break": ["slice", "clone", "initial", "inherit", "unset"],
"box-shadow": [
"none",
@@ -2631,6 +2660,7 @@ export const keywordValues: KeywordValues = {
"unset",
],
"caption-side": ["top", "bottom", "initial", "inherit", "unset"],
+ "caret-animation": ["auto", "manual", "initial", "inherit", "unset"],
"caret-color": [
"auto",
"aliceblue",
@@ -3025,6 +3055,7 @@ export const keywordValues: KeywordValues = {
"column-count": ["auto", "initial", "inherit", "unset"],
"column-fill": ["auto", "balance", "initial", "inherit", "unset"],
"column-gap": ["normal", "initial", "inherit", "unset"],
+ "column-height": ["auto", "initial", "inherit", "unset"],
"column-rule-color": [
"aliceblue",
"antiquewhite",
@@ -3224,6 +3255,7 @@ export const keywordValues: KeywordValues = {
],
"column-span": ["none", "all", "initial", "inherit", "unset"],
"column-width": ["auto", "initial", "inherit", "unset"],
+ "column-wrap": ["auto", "nowrap", "wrap", "initial", "inherit", "unset"],
contain: [
"none",
"strict",
@@ -3266,7 +3298,6 @@ export const keywordValues: KeywordValues = {
content: [
"normal",
"none",
- "contents",
"open-quote",
"close-quote",
"no-open-quote",
@@ -3283,6 +3314,94 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
+ "corner-bottom-left-shape": [
+ "round",
+ "scoop",
+ "bevel",
+ "notch",
+ "square",
+ "squircle",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "corner-bottom-right-shape": [
+ "round",
+ "scoop",
+ "bevel",
+ "notch",
+ "square",
+ "squircle",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "corner-end-end-shape": [
+ "round",
+ "scoop",
+ "bevel",
+ "notch",
+ "square",
+ "squircle",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "corner-end-start-shape": [
+ "round",
+ "scoop",
+ "bevel",
+ "notch",
+ "square",
+ "squircle",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "corner-start-start-shape": [
+ "round",
+ "scoop",
+ "bevel",
+ "notch",
+ "square",
+ "squircle",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "corner-start-end-shape": [
+ "round",
+ "scoop",
+ "bevel",
+ "notch",
+ "square",
+ "squircle",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "corner-top-left-shape": [
+ "round",
+ "scoop",
+ "bevel",
+ "notch",
+ "square",
+ "squircle",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "corner-top-right-shape": [
+ "round",
+ "scoop",
+ "bevel",
+ "notch",
+ "square",
+ "squircle",
+ "initial",
+ "inherit",
+ "unset",
+ ],
"counter-increment": ["none", "initial", "inherit", "unset"],
"counter-reset": ["none", "initial", "inherit", "unset"],
"counter-set": ["none", "initial", "inherit", "unset"],
@@ -3379,6 +3498,14 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
+ "dynamic-range-limit": [
+ "standard",
+ "no-limit",
+ "constrained",
+ "initial",
+ "inherit",
+ "unset",
+ ],
"empty-cells": ["show", "hide", "initial", "inherit", "unset"],
"field-sizing": ["content", "fixed", "initial", "inherit", "unset"],
fill: [
@@ -4018,11 +4145,78 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
- "inset-block-end": ["auto", "initial", "inherit", "unset"],
- "inset-block-start": ["auto", "initial", "inherit", "unset"],
- "inset-inline-end": ["auto", "initial", "inherit", "unset"],
- "inset-inline-start": ["auto", "initial", "inherit", "unset"],
+ "inset-block-end": [
+ "auto",
+ "inside",
+ "outside",
+ "top",
+ "left",
+ "right",
+ "bottom",
+ "start",
+ "end",
+ "self-start",
+ "self-end",
+ "center",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "inset-block-start": [
+ "auto",
+ "inside",
+ "outside",
+ "top",
+ "left",
+ "right",
+ "bottom",
+ "start",
+ "end",
+ "self-start",
+ "self-end",
+ "center",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "inset-inline-end": [
+ "auto",
+ "inside",
+ "outside",
+ "top",
+ "left",
+ "right",
+ "bottom",
+ "start",
+ "end",
+ "self-start",
+ "self-end",
+ "center",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "inset-inline-start": [
+ "auto",
+ "inside",
+ "outside",
+ "top",
+ "left",
+ "right",
+ "bottom",
+ "start",
+ "end",
+ "self-start",
+ "self-end",
+ "center",
+ "initial",
+ "inherit",
+ "unset",
+ ],
isolation: ["auto", "isolate", "initial", "inherit", "unset"],
+ interactivity: ["auto", "inert", "initial", "inherit", "unset"],
+ "interest-delay-end": ["normal", "initial", "inherit", "unset"],
+ "interest-delay-start": ["normal", "initial", "inherit", "unset"],
"justify-content": [
"normal",
"space-between",
@@ -4060,6 +4254,7 @@ export const keywordValues: KeywordValues = {
"left",
"right",
"legacy",
+ "anchor-center",
"initial",
"inherit",
"unset",
@@ -4082,11 +4277,28 @@ export const keywordValues: KeywordValues = {
"flex-end",
"left",
"right",
+ "anchor-center",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ left: [
+ "auto",
+ "inside",
+ "outside",
+ "top",
+ "left",
+ "right",
+ "bottom",
+ "start",
+ "end",
+ "self-start",
+ "self-end",
+ "center",
"initial",
"inherit",
"unset",
],
- left: ["auto", "initial", "inherit", "unset"],
"letter-spacing": ["normal", "initial", "inherit", "unset"],
"lighting-color": [
"aliceblue",
@@ -4456,6 +4668,7 @@ export const keywordValues: KeywordValues = {
"saturation",
"color",
"luminosity",
+ "plus-darker",
"plus-lighter",
"initial",
"inherit",
@@ -4879,6 +5092,19 @@ export const keywordValues: KeywordValues = {
"print-color-adjust": ["economy", "exact", "initial", "inherit", "unset"],
quotes: ["none", "auto", "initial", "inherit", "unset"],
r: ["initial", "inherit", "unset"],
+ "reading-flow": [
+ "normal",
+ "source-order",
+ "flex-visual",
+ "flex-flow",
+ "grid-rows",
+ "grid-columns",
+ "grid-order",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "reading-order": ["initial", "inherit", "unset"],
resize: [
"none",
"both",
@@ -4890,7 +5116,23 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
- right: ["auto", "initial", "inherit", "unset"],
+ right: [
+ "auto",
+ "inside",
+ "outside",
+ "top",
+ "left",
+ "right",
+ "bottom",
+ "start",
+ "end",
+ "self-start",
+ "self-end",
+ "center",
+ "initial",
+ "inherit",
+ "unset",
+ ],
rotate: ["none", "x", "y", "z", "initial", "inherit", "unset"],
"row-gap": ["normal", "initial", "inherit", "unset"],
"ruby-align": [
@@ -4911,8 +5153,8 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
- rx: ["initial", "inherit", "unset"],
- ry: ["initial", "inherit", "unset"],
+ rx: ["auto", "initial", "inherit", "unset"],
+ ry: ["auto", "initial", "inherit", "unset"],
scale: ["none", "initial", "inherit", "unset"],
"scroll-behavior": ["auto", "smooth", "initial", "inherit", "unset"],
"scroll-margin-block-end": ["initial", "inherit", "unset"],
@@ -4923,6 +5165,14 @@ export const keywordValues: KeywordValues = {
"scroll-margin-left": ["initial", "inherit", "unset"],
"scroll-margin-right": ["initial", "inherit", "unset"],
"scroll-margin-top": ["initial", "inherit", "unset"],
+ "scroll-marker-group": [
+ "none",
+ "before",
+ "after",
+ "initial",
+ "inherit",
+ "unset",
+ ],
"scroll-padding-block-end": ["auto", "initial", "inherit", "unset"],
"scroll-padding-block-start": ["auto", "initial", "inherit", "unset"],
"scroll-padding-bottom": ["auto", "initial", "inherit", "unset"],
@@ -4954,6 +5204,7 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
+ "scroll-target-group": ["none", "auto", "initial", "inherit", "unset"],
"scrollbar-color": [
"auto",
"aliceblue",
@@ -5377,6 +5628,7 @@ export const keywordValues: KeywordValues = {
"unset",
],
"text-anchor": ["start", "middle", "end", "initial", "inherit", "unset"],
+ "text-autospace": ["normal", "auto", "initial", "inherit", "unset"],
"text-combine-upright": [
"none",
"all",
@@ -5559,6 +5811,7 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
+ "text-decoration-inset": ["auto", "initial", "inherit", "unset"],
"text-decoration-line": [
"none",
"underline",
@@ -6030,7 +6283,75 @@ export const keywordValues: KeywordValues = {
"inherit",
"unset",
],
- top: ["auto", "initial", "inherit", "unset"],
+ "timeline-trigger-activation-range-end": [
+ "normal",
+ "cover",
+ "contain",
+ "entry",
+ "exit",
+ "entry-crossing",
+ "exit-crossing",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "timeline-trigger-activation-range-start": [
+ "normal",
+ "cover",
+ "contain",
+ "entry",
+ "exit",
+ "entry-crossing",
+ "exit-crossing",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "timeline-trigger-active-range-end": [
+ "auto",
+ "normal",
+ "cover",
+ "contain",
+ "entry",
+ "exit",
+ "entry-crossing",
+ "exit-crossing",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "timeline-trigger-active-range-start": [
+ "auto",
+ "normal",
+ "cover",
+ "contain",
+ "entry",
+ "exit",
+ "entry-crossing",
+ "exit-crossing",
+ "initial",
+ "inherit",
+ "unset",
+ ],
+ "timeline-trigger-name": ["none", "initial", "inherit", "unset"],
+ "timeline-trigger-source": ["auto", "none", "initial", "inherit", "unset"],
+ top: [
+ "auto",
+ "inside",
+ "outside",
+ "top",
+ "left",
+ "right",
+ "bottom",
+ "start",
+ "end",
+ "self-start",
+ "self-end",
+ "center",
+ "initial",
+ "inherit",
+ "unset",
+ ],
"touch-action": [
"auto",
"none",
@@ -6091,6 +6412,7 @@ export const keywordValues: KeywordValues = {
"unset",
],
translate: ["none", "initial", "inherit", "unset"],
+ "trigger-scope": ["none", "all", "initial", "inherit", "unset"],
"unicode-bidi": [
"normal",
"embed",
diff --git a/packages/css-data/src/__generated__/properties.ts b/packages/css-data/src/__generated__/properties.ts
index adaf24892e..bca85a5cba 100644
--- a/packages/css-data/src/__generated__/properties.ts
+++ b/packages/css-data/src/__generated__/properties.ts
@@ -239,6 +239,16 @@ export const properties: Properties = {
mdnUrl:
"https://developer.mozilla.org/docs/Web/CSS/animation-timing-function",
},
+ "animation-trigger": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "none",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/animation-trigger",
+ },
appearance: {
unitGroups: [],
inherited: false,
@@ -367,6 +377,15 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/background-size",
},
+ "baseline-source": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "auto",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/baseline-source",
+ },
"block-size": {
unitGroups: ["length", "percentage"],
inherited: false,
@@ -826,6 +845,15 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/caption-side",
},
+ "caret-animation": {
+ unitGroups: [],
+ inherited: true,
+ initial: {
+ type: "keyword",
+ value: "auto",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/caret-animation",
+ },
"caret-color": {
unitGroups: [],
inherited: true,
@@ -918,6 +946,15 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/column-gap",
},
+ "column-height": {
+ unitGroups: ["length"],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "auto",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/column-height",
+ },
"column-rule-color": {
unitGroups: [],
inherited: false,
@@ -963,6 +1000,15 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/column-width",
},
+ "column-wrap": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "auto",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/column-wrap",
+ },
contain: {
unitGroups: [],
inherited: false,
@@ -1048,6 +1094,81 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/content-visibility",
},
+ "corner-bottom-left-shape": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "round",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/corner-bottom-left-shape",
+ },
+ "corner-bottom-right-shape": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "round",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/corner-bottom-right-shape",
+ },
+ "corner-end-end-shape": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "round",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/corner-end-end-shape",
+ },
+ "corner-end-start-shape": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "round",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/corner-end-start-shape",
+ },
+ "corner-start-start-shape": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "round",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/corner-start-start-shape",
+ },
+ "corner-start-end-shape": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "round",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/corner-start-end-shape",
+ },
+ "corner-top-left-shape": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "round",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/corner-top-left-shape",
+ },
+ "corner-top-right-shape": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "round",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/corner-top-right-shape",
+ },
"counter-increment": {
unitGroups: ["number"],
inherited: false,
@@ -1140,6 +1261,15 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/dominant-baseline",
},
+ "dynamic-range-limit": {
+ unitGroups: [],
+ inherited: true,
+ initial: {
+ type: "keyword",
+ value: "no-limit",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/dynamic-range-limit",
+ },
"empty-cells": {
unitGroups: [],
inherited: true,
@@ -1687,6 +1817,33 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/isolation",
},
+ interactivity: {
+ unitGroups: [],
+ inherited: true,
+ initial: {
+ type: "keyword",
+ value: "auto",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/interactivity",
+ },
+ "interest-delay-end": {
+ unitGroups: ["time"],
+ inherited: true,
+ initial: {
+ type: "keyword",
+ value: "normal",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/interest-delay-end",
+ },
+ "interest-delay-start": {
+ unitGroups: ["time"],
+ inherited: true,
+ initial: {
+ type: "keyword",
+ value: "normal",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/interest-delay-start",
+ },
"justify-content": {
unitGroups: [],
inherited: false,
@@ -2578,6 +2735,25 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/r",
},
+ "reading-flow": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "normal",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/reading-flow",
+ },
+ "reading-order": {
+ unitGroups: ["number"],
+ inherited: false,
+ initial: {
+ type: "unit",
+ unit: "number",
+ value: 0,
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/reading-order",
+ },
resize: {
unitGroups: [],
inherited: false,
@@ -2637,9 +2813,8 @@ export const properties: Properties = {
unitGroups: ["length", "percentage"],
inherited: false,
initial: {
- type: "unit",
- unit: "px",
- value: 0,
+ type: "keyword",
+ value: "auto",
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/rx",
},
@@ -2647,9 +2822,8 @@ export const properties: Properties = {
unitGroups: ["length", "percentage"],
inherited: false,
initial: {
- type: "unit",
- unit: "px",
- value: 0,
+ type: "keyword",
+ value: "auto",
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/ry",
},
@@ -2755,6 +2929,15 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top",
},
+ "scroll-marker-group": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "none",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/scroll-marker-group",
+ },
"scroll-padding-block-end": {
unitGroups: ["length", "percentage"],
inherited: false,
@@ -2858,6 +3041,15 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type",
},
+ "scroll-target-group": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "none",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/scroll-target-group",
+ },
"scrollbar-color": {
unitGroups: [],
inherited: true,
@@ -2916,7 +3108,7 @@ export const properties: Properties = {
},
"shape-rendering": {
unitGroups: [],
- inherited: false,
+ inherited: true,
initial: {
type: "keyword",
value: "auto",
@@ -3054,6 +3246,15 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/text-anchor",
},
+ "text-autospace": {
+ unitGroups: [],
+ inherited: true,
+ initial: {
+ type: "keyword",
+ value: "normal",
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/text-autospace",
+ },
"text-combine-upright": {
unitGroups: ["number"],
inherited: true,
@@ -3072,6 +3273,16 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color",
},
+ "text-decoration-inset": {
+ unitGroups: ["length"],
+ inherited: false,
+ initial: {
+ type: "unit",
+ unit: "px",
+ value: 0,
+ },
+ mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-inset",
+ },
"text-decoration-line": {
unitGroups: [],
inherited: false,
@@ -3247,6 +3458,66 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/text-wrap-style",
},
+ "timeline-trigger-activation-range-end": {
+ unitGroups: ["length", "percentage"],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "normal",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/timeline-trigger-activation-range-end",
+ },
+ "timeline-trigger-activation-range-start": {
+ unitGroups: ["length", "percentage"],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "normal",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/timeline-trigger-activation-range-start",
+ },
+ "timeline-trigger-active-range-end": {
+ unitGroups: ["length", "percentage"],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "auto",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/timeline-trigger-active-range-end",
+ },
+ "timeline-trigger-active-range-start": {
+ unitGroups: ["length", "percentage"],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "auto",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/timeline-trigger-active-range-start",
+ },
+ "timeline-trigger-name": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "none",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/timeline-trigger-name",
+ },
+ "timeline-trigger-source": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "auto",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/timeline-trigger-source",
+ },
top: {
unitGroups: ["length", "percentage"],
inherited: false,
@@ -3374,6 +3645,16 @@ export const properties: Properties = {
},
mdnUrl: "https://developer.mozilla.org/docs/Web/CSS/translate",
},
+ "trigger-scope": {
+ unitGroups: [],
+ inherited: false,
+ initial: {
+ type: "keyword",
+ value: "none",
+ },
+ mdnUrl:
+ "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/trigger-scope",
+ },
"unicode-bidi": {
unitGroups: [],
inherited: false,
diff --git a/packages/css-data/src/__generated__/shorthand-properties.ts b/packages/css-data/src/__generated__/shorthand-properties.ts
index e01f9ba960..8ccfdc5b36 100644
--- a/packages/css-data/src/__generated__/shorthand-properties.ts
+++ b/packages/css-data/src/__generated__/shorthand-properties.ts
@@ -23,6 +23,15 @@ export const shorthandProperties = [
"columns",
"contain-intrinsic-size",
"container",
+ "corner-block-end-shape",
+ "corner-block-start-shape",
+ "corner-bottom-shape",
+ "corner-inline-end-shape",
+ "corner-inline-start-shape",
+ "corner-left-shape",
+ "corner-right-shape",
+ "corner-shape",
+ "corner-top-shape",
"flex",
"flex-flow",
"font",
@@ -35,6 +44,7 @@ export const shorthandProperties = [
"inset",
"inset-block",
"inset-inline",
+ "interest-delay",
"list-style",
"margin",
"margin-block",
@@ -59,5 +69,8 @@ export const shorthandProperties = [
"stroke",
"text-decoration",
"text-emphasis",
+ "timeline-trigger",
+ "timeline-trigger-activation-range",
+ "timeline-trigger-active-range",
"transition",
] as const;
diff --git a/packages/css-data/src/__generated__/shorthand-test-fixtures.ts b/packages/css-data/src/__generated__/shorthand-test-fixtures.ts
new file mode 100644
index 0000000000..52f98bb476
--- /dev/null
+++ b/packages/css-data/src/__generated__/shorthand-test-fixtures.ts
@@ -0,0 +1,619 @@
+// This file was generated by pnpm build:shorthand-fixtures
+
+export type ShorthandFixture = {
+ property: string;
+ singleToken: string;
+ multiToken: string;
+ longhands: string[];
+};
+
+export const shorthandTestFixtures: ShorthandFixture[] = [
+ {
+ property: "-webkit-text-stroke",
+ singleToken: "red",
+ multiToken: "1px red",
+ longhands: ["-webkit-text-stroke-width", "-webkit-text-stroke-color"],
+ },
+ {
+ property: "animation",
+ singleToken: "0s",
+ multiToken: "0s ease 1 normal none running",
+ longhands: [
+ "animation-duration",
+ "animation-timing-function",
+ "animation-delay",
+ "animation-iteration-count",
+ "animation-direction",
+ "animation-fill-mode",
+ "animation-play-state",
+ "animation-name",
+ "animation-timeline",
+ "animation-range-start",
+ "animation-range-end",
+ ],
+ },
+ {
+ property: "background",
+ singleToken: "none",
+ multiToken: "none 0% auto repeat scroll padding-box border-box transparent",
+ longhands: [
+ "background-image",
+ "background-position-x",
+ "background-position-y",
+ "background-size",
+ "background-repeat",
+ "background-attachment",
+ "background-origin",
+ "background-clip",
+ "background-color",
+ ],
+ },
+ {
+ property: "border",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: [
+ "border-top-width",
+ "border-right-width",
+ "border-bottom-width",
+ "border-left-width",
+ "border-top-style",
+ "border-right-style",
+ "border-bottom-style",
+ "border-left-style",
+ "border-top-color",
+ "border-right-color",
+ "border-bottom-color",
+ "border-left-color",
+ ],
+ },
+ {
+ property: "border-block",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: [
+ "border-block-start-width",
+ "border-block-end-width",
+ "border-block-start-style",
+ "border-block-end-style",
+ "border-block-start-color",
+ "border-block-end-color",
+ ],
+ },
+ {
+ property: "border-block-end",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: [
+ "border-block-end-width",
+ "border-block-end-style",
+ "border-block-end-color",
+ ],
+ },
+ {
+ property: "border-block-start",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: [
+ "border-block-start-width",
+ "border-block-start-style",
+ "border-block-start-color",
+ ],
+ },
+ {
+ property: "border-bottom",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: [
+ "border-bottom-width",
+ "border-bottom-style",
+ "border-bottom-color",
+ ],
+ },
+ {
+ property: "border-color",
+ singleToken: "currentColor",
+ multiToken: "currentColor 16px",
+ longhands: [
+ "border-top-color",
+ "border-right-color",
+ "border-bottom-color",
+ "border-left-color",
+ ],
+ },
+ {
+ property: "border-image",
+ singleToken: "none",
+ multiToken: "none 100% 1 0 stretch",
+ longhands: [
+ "border-image-source",
+ "border-image-slice",
+ "border-image-width",
+ "border-image-outset",
+ "border-image-repeat",
+ ],
+ },
+ {
+ property: "border-inline",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: [
+ "border-inline-start-width",
+ "border-inline-end-width",
+ "border-inline-start-style",
+ "border-inline-end-style",
+ "border-inline-start-color",
+ "border-inline-end-color",
+ ],
+ },
+ {
+ property: "border-inline-end",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: [
+ "border-inline-end-width",
+ "border-inline-end-style",
+ "border-inline-end-color",
+ ],
+ },
+ {
+ property: "border-inline-start",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: [
+ "border-inline-start-width",
+ "border-inline-start-style",
+ "border-inline-start-color",
+ ],
+ },
+ {
+ property: "border-left",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: ["border-left-width", "border-left-style", "border-left-color"],
+ },
+ {
+ property: "border-radius",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: [
+ "border-top-left-radius",
+ "border-top-right-radius",
+ "border-bottom-right-radius",
+ "border-bottom-left-radius",
+ ],
+ },
+ {
+ property: "border-right",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: [
+ "border-right-width",
+ "border-right-style",
+ "border-right-color",
+ ],
+ },
+ {
+ property: "border-style",
+ singleToken: "none",
+ multiToken: "none url(#x)",
+ longhands: [
+ "border-top-style",
+ "border-right-style",
+ "border-bottom-style",
+ "border-left-style",
+ ],
+ },
+ {
+ property: "border-top",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: ["border-top-width", "border-top-style", "border-top-color"],
+ },
+ {
+ property: "border-width",
+ singleToken: "medium",
+ multiToken: "medium 16px",
+ longhands: [
+ "border-top-width",
+ "border-right-width",
+ "border-bottom-width",
+ "border-left-width",
+ ],
+ },
+ {
+ property: "column-rule",
+ singleToken: "medium",
+ multiToken: "medium none currentColor",
+ longhands: ["column-rule-width", "column-rule-style", "column-rule-color"],
+ },
+ {
+ property: "columns",
+ singleToken: "auto",
+ multiToken: "auto 0px",
+ longhands: ["column-width", "column-count"],
+ },
+ {
+ property: "contain-intrinsic-size",
+ singleToken: "none",
+ multiToken: "none url(#x)",
+ longhands: ["contain-intrinsic-width", "contain-intrinsic-height"],
+ },
+ {
+ property: "container",
+ singleToken: "none",
+ multiToken: "main / inline-size",
+ longhands: ["container-name", "container-type"],
+ },
+ {
+ property: "corner-block-end-shape",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "corner-block-start-shape",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "corner-bottom-shape",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "corner-inline-end-shape",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "corner-inline-start-shape",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "corner-left-shape",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "corner-right-shape",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "corner-shape",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "corner-top-shape",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "flex",
+ singleToken: "0",
+ multiToken: "0 1 auto",
+ longhands: ["flex-grow", "flex-shrink", "flex-basis"],
+ },
+ {
+ property: "flex-flow",
+ singleToken: "row",
+ multiToken: "row nowrap",
+ longhands: ["flex-direction", "flex-wrap"],
+ },
+ {
+ property: "font",
+ singleToken: "16px serif",
+ multiToken: "bold 18px/1.5 sans-serif",
+ longhands: [
+ "font-style",
+ "font-variant-caps",
+ "font-weight",
+ "font-stretch",
+ "font-size",
+ "line-height",
+ "font-family",
+ ],
+ },
+ {
+ property: "gap",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: ["row-gap", "column-gap"],
+ },
+ {
+ property: "grid",
+ singleToken: "none",
+ multiToken: "none auto",
+ longhands: [
+ "grid-template-areas",
+ "grid-template-rows",
+ "grid-template-columns",
+ "grid-auto-flow.",
+ "grid-auto-rows",
+ "grid-auto-columns",
+ ],
+ },
+ {
+ property: "grid-area",
+ singleToken: "auto",
+ multiToken: "1 / 2 / 3 / 4",
+ longhands: [
+ "grid-row-start",
+ "grid-column-start",
+ "grid-row-end",
+ "grid-column-end",
+ ],
+ },
+ {
+ property: "grid-column",
+ singleToken: "auto",
+ multiToken: "1 / 3",
+ longhands: ["grid-column-start", "grid-column-end"],
+ },
+ {
+ property: "grid-row",
+ singleToken: "auto",
+ multiToken: "1 / 3",
+ longhands: ["grid-row-start", "grid-row-end"],
+ },
+ {
+ property: "grid-template",
+ singleToken: "none",
+ multiToken: "none / 1fr",
+ longhands: [
+ "grid-template-areas",
+ "grid-template-rows",
+ "grid-template-columns",
+ ],
+ },
+ {
+ property: "inset",
+ singleToken: "auto",
+ multiToken: "auto 0px",
+ longhands: ["top", "right", "bottom", "left"],
+ },
+ {
+ property: "inset-block",
+ singleToken: "auto",
+ multiToken: "auto 0px",
+ longhands: ["inset-block-start", "inset-block-end"],
+ },
+ {
+ property: "inset-inline",
+ singleToken: "auto",
+ multiToken: "auto 0px",
+ longhands: ["inset-inline-start", "inset-inline-end"],
+ },
+ {
+ property: "interest-delay",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "list-style",
+ singleToken: "outside",
+ multiToken: "outside none disc",
+ longhands: ["list-style-position", "list-style-image", "list-style-type"],
+ },
+ {
+ property: "margin",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: ["margin-top", "margin-right", "margin-bottom", "margin-left"],
+ },
+ {
+ property: "margin-block",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: ["margin-block-start", "margin-block-end"],
+ },
+ {
+ property: "margin-inline",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: ["margin-inline-start", "margin-inline-end"],
+ },
+ {
+ property: "marker",
+ singleToken: "none",
+ multiToken: "none url(#x)",
+ longhands: ["marker-start", "marker-mid", "marker-end"],
+ },
+ {
+ property: "mask",
+ singleToken: "none",
+ multiToken: "none 0% 0% auto repeat border-box add match-source",
+ longhands: [
+ "mask-image",
+ "mask-position",
+ "mask-size",
+ "mask-repeat",
+ "mask-origin",
+ "mask-clip",
+ "mask-composite",
+ "mask-mode",
+ ],
+ },
+ {
+ property: "mask-border",
+ singleToken: "none",
+ multiToken: "none 0 auto stretch alpha",
+ longhands: [
+ "mask-border-source",
+ "mask-border-slice",
+ "mask-border-width",
+ "mask-border-outset",
+ "mask-border-repeat",
+ "mask-border-mode",
+ ],
+ },
+ {
+ property: "offset",
+ singleToken: "normal",
+ multiToken: "normal none 0px auto",
+ longhands: [
+ "offset-position",
+ "offset-path",
+ "offset-distance",
+ "offset-rotate",
+ "offset-anchor",
+ ],
+ },
+ {
+ property: "outline",
+ singleToken: "medium",
+ multiToken: "medium none auto",
+ longhands: ["outline-width", "outline-style", "outline-color"],
+ },
+ {
+ property: "padding",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: [
+ "padding-top",
+ "padding-right",
+ "padding-bottom",
+ "padding-left",
+ ],
+ },
+ {
+ property: "padding-block",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: ["padding-block-start", "padding-block-end"],
+ },
+ {
+ property: "padding-inline",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: ["padding-inline-start", "padding-inline-end"],
+ },
+ {
+ property: "place-content",
+ singleToken: "normal",
+ multiToken: "normal 16px",
+ longhands: ["align-content", "justify-content"],
+ },
+ {
+ property: "place-items",
+ singleToken: "normal",
+ multiToken: "normal legacy",
+ longhands: ["align-items", "justify-items"],
+ },
+ {
+ property: "place-self",
+ singleToken: "auto",
+ multiToken: "auto 0px",
+ longhands: ["align-self", "justify-self"],
+ },
+ {
+ property: "scroll-margin",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: [
+ "scroll-margin-top",
+ "scroll-margin-right",
+ "scroll-margin-bottom",
+ "scroll-margin-left",
+ ],
+ },
+ {
+ property: "scroll-margin-block",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: ["scroll-margin-block-start", "scroll-margin-block-end"],
+ },
+ {
+ property: "scroll-margin-inline",
+ singleToken: "0px",
+ multiToken: "0px 8px",
+ longhands: ["scroll-margin-inline-start", "scroll-margin-inline-end"],
+ },
+ {
+ property: "scroll-padding",
+ singleToken: "auto",
+ multiToken: "auto 0px",
+ longhands: [
+ "scroll-padding-top",
+ "scroll-padding-right",
+ "scroll-padding-bottom",
+ "scroll-padding-left",
+ ],
+ },
+ {
+ property: "scroll-padding-block",
+ singleToken: "auto",
+ multiToken: "auto 0px",
+ longhands: ["scroll-padding-block-start", "scroll-padding-block-end"],
+ },
+ {
+ property: "scroll-padding-inline",
+ singleToken: "auto",
+ multiToken: "auto 0px",
+ longhands: ["scroll-padding-inline-start", "scroll-padding-inline-end"],
+ },
+ {
+ property: "stroke",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "text-decoration",
+ singleToken: "none",
+ multiToken: "none solid currentColor",
+ longhands: [
+ "text-decoration-line",
+ "text-decoration-style",
+ "text-decoration-color",
+ ],
+ },
+ {
+ property: "text-emphasis",
+ singleToken: "none",
+ multiToken: "none currentColor",
+ longhands: ["text-emphasis-style", "text-emphasis-color"],
+ },
+ {
+ property: "timeline-trigger",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "timeline-trigger-activation-range",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "timeline-trigger-active-range",
+ singleToken: "",
+ multiToken: "",
+ longhands: [],
+ },
+ {
+ property: "transition",
+ singleToken: "all",
+ multiToken: "all 0s ease normal",
+ longhands: [
+ "transition-property",
+ "transition-duration",
+ "transition-timing-function",
+ "transition-delay",
+ "transition-behavior",
+ ],
+ },
+] as const;
diff --git a/packages/css-data/src/parse-css.test.ts b/packages/css-data/src/parse-css.test.ts
index 3fb5aacf69..ae38e0e275 100644
--- a/packages/css-data/src/parse-css.test.ts
+++ b/packages/css-data/src/parse-css.test.ts
@@ -5,6 +5,7 @@ import {
parseCss,
parseMediaQuery,
} from "./parse-css";
+import { shorthandTestFixtures } from "./__generated__/shorthand-test-fixtures";
describe("Parse CSS", () => {
test("longhand property name with keyword value", () => {
@@ -564,19 +565,21 @@ describe("Parse CSS", () => {
});
test("keep prefix for -webkit-text-stroke", () => {
- // shorthand is kept as-is (not expanded) but prefix is preserved
+ // shorthand expands to prefixed longhands while preserving the prefix
expect(
parseCss(`a { -webkit-text-stroke: 1px black; }`, new Map()).styles
).toEqual([
{
selector: "a",
- property: "-webkit-text-stroke",
+ property: "-webkit-text-stroke-width",
+ value: { type: "unit", unit: "px", value: 1 },
+ },
+ {
+ selector: "a",
+ property: "-webkit-text-stroke-color",
value: {
- type: "tuple",
- value: [
- { type: "unit", unit: "px", value: 1 },
- { type: "keyword", value: "black" },
- ],
+ type: "keyword",
+ value: "black",
},
},
]);
@@ -2598,24 +2601,15 @@ describe("var() substitution — font", () => {
});
describe("var() substitution — -webkit-text-stroke", () => {
- test("var() for stroke width and color — passes through as tuple (not expanded)", () => {
- // -webkit-text-stroke is in shorthand-properties so it gets var substitution,
- // but shorthands.ts has no expand case for it — it passes through as a tuple
- // value containing the resolved width and color tokens.
+ test("var() for stroke width and color", () => {
const result = decls(
`--w: 1px; --clr: black; -webkit-text-stroke: var(--w) var(--clr);`
);
- const stroke = result.find(
- (d) => (d.property as string) === "-webkit-text-stroke"
- );
- expect(stroke?.value).toEqual(
- expect.objectContaining({
- type: "tuple",
- value: expect.arrayContaining([
- expect.objectContaining({ type: "unit", value: 1, unit: "px" }),
- expect.objectContaining({ type: "keyword", value: "black" }),
- ]),
- })
+ expect(result).toEqual(
+ expect.arrayContaining([
+ prop("-webkit-text-stroke-width", u(1, "px")),
+ prop("-webkit-text-stroke-color", kw("black")),
+ ])
);
});
});
@@ -2630,12 +2624,19 @@ describe("parseCss — external cssVars parameter", () => {
// ── background ────────────────────────────────────────────────────────────
test("background: cross-rule var resolves via cssVars", () => {
- // --clr defined only in cssVars (parent rule), not in same rule
+ // --clr defined only in cssVars (parent rule), not in same rule.
+ // The var() reference must be preserved — it must NOT be inlined to the
+ // concrete color, because the variable lives on an ancestor element.
const result = declsWithVars(`background: var(--clr);`, {
"--clr": "tomato",
});
expect(result).toEqual(
- expect.arrayContaining([prop("background-color", kw("tomato"))])
+ expect.arrayContaining([
+ prop(
+ "background-color",
+ expect.objectContaining({ type: "var", value: "clr" })
+ ),
+ ])
);
});
@@ -2713,15 +2714,18 @@ describe("parseCss — external cssVars parameter", () => {
// ── margin / padding ──────────────────────────────────────────────────────
test("margin: cross-rule var for all sides via cssVars", () => {
+ // Single cross-rule var: var() reference must be preserved on every
+ // expanded longhand (all four sides receive the var's value).
const result = declsWithVars(`margin: var(--space);`, {
"--space": "16px",
});
+ const varSpace = expect.objectContaining({ type: "var", value: "space" });
expect(result).toEqual(
expect.arrayContaining([
- prop("margin-top", u(16, "px")),
- prop("margin-right", u(16, "px")),
- prop("margin-bottom", u(16, "px")),
- prop("margin-left", u(16, "px")),
+ prop("margin-top", varSpace),
+ prop("margin-right", varSpace),
+ prop("margin-bottom", varSpace),
+ prop("margin-left", varSpace),
])
);
});
@@ -2820,6 +2824,72 @@ describe("parseCss — external cssVars parameter", () => {
);
});
+ // ── multi-token cross-rule var ────────────────────────────────────────────
+
+ test("border: cross-rule multi-token var preserves var() on all longhands", () => {
+ // --b resolves to a full shorthand value; no single longhand string equals
+ // "2px solid red", so var() must be assigned to every longhand.
+ const result = declsWithVars(`border: var(--b);`, {
+ "--b": "2px solid red",
+ });
+ const varB = expect.objectContaining({ type: "var", value: "b" });
+ expect(result).toEqual(
+ expect.arrayContaining([
+ prop("border-top-width", varB),
+ prop("border-top-style", varB),
+ prop("border-top-color", varB),
+ prop("border-right-width", varB),
+ ])
+ );
+ });
+
+ test("background: cross-rule multi-token var preserves var() on all longhands", () => {
+ const result = declsWithVars(`background: var(--bg);`, {
+ "--bg": "url(hero.png) no-repeat center",
+ });
+ const varBg = expect.objectContaining({ type: "var", value: "bg" });
+ expect(result).toEqual(
+ expect.arrayContaining([
+ prop("background-image", varBg),
+ prop("background-repeat", varBg),
+ prop("background-position-x", varBg),
+ ])
+ );
+ });
+
+ test("padding: cross-rule two-value var preserves var() on all sides", () => {
+ // --p: 8px 16px resolves to different values per side; none equals the
+ // full "8px 16px" text → all four padding longhands get var(--p).
+ const result = declsWithVars(`padding: var(--p);`, {
+ "--p": "8px 16px",
+ });
+ const varP = expect.objectContaining({ type: "var", value: "p" });
+ expect(result).toEqual(
+ expect.arrayContaining([
+ prop("padding-top", varP),
+ prop("padding-right", varP),
+ prop("padding-bottom", varP),
+ prop("padding-left", varP),
+ ])
+ );
+ });
+
+ test("background: cross-rule rgb-with-spaces var preserves var() on background-color", () => {
+ // csstree normalises rgb(255, 0, 0) to rgb(255,0,0) in expandShorthands;
+ // the comparison must account for this whitespace difference.
+ const result = declsWithVars(`background: var(--clr);`, {
+ "--clr": "rgb(255, 0, 0)",
+ });
+ expect(result).toEqual(
+ expect.arrayContaining([
+ prop(
+ "background-color",
+ expect.objectContaining({ type: "var", value: "clr" })
+ ),
+ ])
+ );
+ });
+
// ── multiple rules: cssVars doesn't bleed between rules ───────────────────
test("cssVars are available in both rules when passed", () => {
@@ -2833,8 +2903,12 @@ describe("parseCss — external cssVars parameter", () => {
const bMarginTop = styles.find(
(d) => d.selector === ".b" && d.property === "margin-top"
);
+ // .a: border has extra tokens ("solid red") — not a single var, so resolved
expect(aBorderTop?.value).toEqual(u(4, "px"));
- expect(bMarginTop?.value).toEqual(u(4, "px"));
+ // .b: margin is a single cross-rule var — var() reference is preserved
+ expect(bMarginTop?.value).toEqual(
+ expect.objectContaining({ type: "var", value: "w" })
+ );
});
test("same-rule var overrides cssVars in first rule, not second", () => {
@@ -2849,9 +2923,79 @@ describe("parseCss — external cssVars parameter", () => {
const bMarginTop = styles.find(
(d) => d.selector === ".b" && d.property === "margin-top"
);
+ // .a: same-rule var → inlined to concrete value
expect(aMarginTop?.value).toEqual(u(10, "px"));
- expect(bMarginTop?.value).toEqual(u(4, "px"));
- });
+ // .b: cross-rule var → var() reference preserved
+ expect(bMarginTop?.value).toEqual(
+ expect.objectContaining({ type: "var", value: "w" })
+ );
+ });
+
+ // ── comprehensive shorthand coverage ─────────────────────────────────────
+ //
+ // Test cases are driven entirely by the generated fixture:
+ // src/__generated__/shorthand-test-fixtures.ts
+ //
+ // Regenerate with: pnpm build:shorthand-fixtures
+ //
+ // For every shorthand that expandShorthands() handles we run two cases:
+ // • singleToken – a value matching exactly a single longhand: at least
+ // one longhand must have type:"var", none may be type:"invalid".
+ // • multiToken – a value spanning *all* longhands differently: every
+ // longhand must have type:"var".
+ //
+ // Shorthands whose longhands[] is empty are not handled by expandShorthands
+ // (they pass through), so no cross-rule substitution is expected from them.
+
+ const expandableFixtures = shorthandTestFixtures.filter(
+ (f) => f.longhands.length > 0
+ );
+
+ test.each(expandableFixtures)(
+ "cross-rule single-token var: $property — at least one var longhand, no invalids",
+ ({ property, singleToken }) => {
+ const result = declsWithVars(`${property}: var(--v);`, {
+ "--v": singleToken,
+ });
+ expect(result.length).toBeGreaterThan(0);
+ const invalids = result.filter((d) => d.value.type === "invalid");
+ const vars = result.filter((d) => d.value.type === "var");
+ expect(invalids).toHaveLength(0);
+ expect(vars.length).toBeGreaterThan(0);
+ }
+ );
+
+ test.each(expandableFixtures)(
+ "cross-rule multi-token var: $property — all longhands are var(), no invalids",
+ ({ property, multiToken }) => {
+ const result = declsWithVars(`${property}: var(--v);`, {
+ "--v": multiToken,
+ });
+ expect(result.length).toBeGreaterThan(0);
+ const invalids = result.filter((d) => d.value.type === "invalid");
+ const vars = result.filter((d) => d.value.type === "var");
+ expect(invalids).toHaveLength(0);
+ expect(vars).toHaveLength(result.length);
+ }
+ );
+
+ // Shorthands not handled by expandShorthands (passthrough): verify they
+ // produce no invalid values when a cross-rule var is used as the value.
+ const passthroughFixtures = shorthandTestFixtures.filter(
+ (f) => f.longhands.length === 0
+ );
+
+ test.each(passthroughFixtures)(
+ "cross-rule passthrough shorthand: $property — no invalid values",
+ ({ property }) => {
+ const result = declsWithVars(`${property}: var(--v);`, {
+ "--v": "none",
+ });
+ expect(result.length).toBeGreaterThan(0);
+ const invalids = result.filter((d) => d.value.type === "invalid");
+ expect(invalids).toHaveLength(0);
+ }
+ );
});
describe("parseMediaQuery", () => {
diff --git a/packages/css-data/src/parse-css.ts b/packages/css-data/src/parse-css.ts
index 63c27dde26..6fa2cb591b 100644
--- a/packages/css-data/src/parse-css.ts
+++ b/packages/css-data/src/parse-css.ts
@@ -191,6 +191,16 @@ const resolveVars = (
* Returns { result: parsed Map, droppedVars } when some vars resolved and
* some did not — droppedVars is non-empty and an error should be reported,
* but the partially-resolved value is still attempted (may produce invalid).
+ *
+ * Special case — cross-rule single var():
+ * When the entire shorthand value is exactly one var(--x) and --x is defined
+ * only in cssVars (not in the same-rule customProperties), the var() reference
+ * is preserved in the expanded longhands instead of being inlined. The
+ * resolved value is used solely to guide shorthand expansion (i.e. to decide
+ * which longhand sub-property the value belongs to). Longhands whose
+ * expanded string differs from the resolved var value are stored as concrete
+ * (reset/initial) values, while the one longhand that received the var's
+ * value is stored as var(--x).
*/
const substituteVarsInShorthand = (
property: string,
@@ -200,6 +210,67 @@ const substituteVarsInShorthand = (
):
| { result: Map<CssProperty, StyleValue>; droppedVars: string[] }
| undefined => {
+ // Cross-rule single-var preservation: when the whole shorthand value is a
+ // single var(--x) whose definition lives in another rule (cssVars only),
+ // expand with the resolved concrete value to find the right sub-property,
+ // but store the original var() text instead of the concrete value.
+ //
+ // Two sub-cases:
+ // Single-token var (--clr: #f00 → background: var(--clr))
+ // expandShorthands maps one longhand to the resolved token; that
+ // longhand gets var(), reset longhands get their concrete defaults.
+ //
+ // Multi-token var (--b: 2px solid red → border: var(--b))
+ // No individual longhand string equals the full resolved text, so
+ // var() is assigned to ALL longhands (the var controls all of them).
+ //
+ // resolvedText is normalised through csstree so that values like
+ // `rgb(255, 0, 0)` (with spaces) compare equal to the `rgb(255,0,0)`
+ // that expandShorthands produces.
+ const crossRuleVarMatch = value.trim().match(/^var\(\s*(--[\w-]+)[^)]*\)$/);
+ if (crossRuleVarMatch !== null && cssVars !== undefined) {
+ const varName = crossRuleVarMatch[1];
+ if (!customProperties.has(varName) && cssVars.has(varName)) {
+ const rawResolved = cssVars.get(varName)!.trim();
+ let normalizedResolved = rawResolved;
+ try {
+ normalizedResolved = csstree.generate(
+ csstree.parse(rawResolved, { context: "value" })
+ );
+ } catch {
+ // keep rawResolved if parsing fails
+ }
+
+ const expandedStrings = new Map(
+ expandShorthands([[property, normalizedResolved]])
+ );
+ const anyMatch = [...expandedStrings.values()].some(
+ (s) => s === normalizedResolved
+ );
+
+ const originalVarText = value.trim();
+ const result = new Map<CssProperty, StyleValue>();
+ for (const [prop, expandedStr] of expandedStrings) {
+ if (!anyMatch || expandedStr === normalizedResolved) {
+ // Multi-token var (no match anywhere) → preserve var() on every
+ // longhand. Single-token var → preserve var() only on the longhand(s)
+ // that actually received the var's value.
+ result.set(
+ prop as CssProperty,
+ parseCssValueLonghand(prop as CssProperty, originalVarText)
+ );
+ } else {
+ // Longhand received a reset/default value — store it as concrete.
+ result.set(
+ prop as CssProperty,
+ parseCssValueLonghand(prop as CssProperty, expandedStr)
+ );
+ }
+ }
+ return { result, droppedVars: [] };
+ }
+ }
+
const resolution = resolveVars(value, customProperties, cssVars);
if (resolution === undefined) {
return;
diff --git a/packages/css-data/src/shorthands.test.ts b/packages/css-data/src/shorthands.test.ts
index 7c94b976c8..0d247ef814 100644
--- a/packages/css-data/src/shorthands.test.ts
+++ b/packages/css-data/src/shorthands.test.ts
@@ -1542,4 +1542,29 @@ test("does not fail on empty value", () => {
expect(() => expandShorthands([["background", ""]])).not.toThrow();
expect(() => expandShorthands([["overscroll-behavior", ""]])).not.toThrow();
expect(() => expandShorthands([["position-try", ""]])).not.toThrow();
+ expect(() => expandShorthands([["marker", ""]])).not.toThrow();
+});
+
+test("expand marker", () => {
+ expect(expandShorthands([["marker", "none"]])).toEqual([
+ ["marker-start", "none"],
+ ["marker-mid", "none"],
+ ["marker-end", "none"],
+ ]);
+ expect(expandShorthands([["marker", "url(#arrow)"]])).toEqual([
+ ["marker-start", "url(#arrow)"],
+ ["marker-mid", "url(#arrow)"],
+ ["marker-end", "url(#arrow)"],
+ ]);
+});
+
+test("expand -webkit-text-stroke", () => {
+ expect(expandShorthands([["-webkit-text-stroke", "1px red"]])).toEqual([
+ ["-webkit-text-stroke-width", "1px"],
+ ["-webkit-text-stroke-color", "red"],
+ ]);
+ expect(expandShorthands([["-webkit-text-stroke", "red"]])).toEqual([
+ ["-webkit-text-stroke-width", "0"],
+ ["-webkit-text-stroke-color", "red"],
+ ]);
});
diff --git a/packages/css-data/src/shorthands.ts b/packages/css-data/src/shorthands.ts
index 3ad7e65f95..a31b73af15 100644
--- a/packages/css-data/src/shorthands.ts
+++ b/packages/css-data/src/shorthands.ts
@@ -1413,6 +1413,31 @@ const expandShorthand = function* (property: string, value: CssNode) {
break;
}
+ // -webkit-text-stroke = <line-width> || <color>
+ // Sets width/color together with standard shorthand reset semantics.
+ case "-webkit-text-stroke": {
+ const [width, color] = parseUnordered(
+ [`<'-webkit-text-stroke-width'>`, `<'-webkit-text-stroke-color'>`],
+ value
+ );
+ yield ["-webkit-text-stroke-width", width ?? createNumber("0")] as const;
+ yield [
+ "-webkit-text-stroke-color",
+ color ?? createIdentifier("currentcolor"),
+ ] as const;
+ break;
+ }
+
+ // marker = none | <url>
+ // Shorthand for marker-start, marker-mid, and marker-end.
+ // All three longhands receive the same value.
+ case "marker": {
+ yield ["marker-start", value] as const;
+ yield ["marker-mid", value] as const;
+ yield ["marker-end", value] as const;
+ break;
+ }
+
default:
yield [property, value] as const;
}
diff --git a/packages/css-engine/src/__generated__/types.ts b/packages/css-engine/src/__generated__/types.ts
index 3f4ad2ead3..2df4a5a9a9 100644
--- a/packages/css-engine/src/__generated__/types.ts
+++ b/packages/css-engine/src/__generated__/types.ts
@@ -23,6 +23,7 @@ export type CamelCasedProperty =
| "animationName"
| "animationPlayState"
| "animationTimingFunction"
+ | "animationTrigger"
| "appearance"
| "aspectRatio"
| "backdropFilter"
@@ -37,6 +38,7 @@ export type CamelCasedProperty =
| "backgroundPositionY"
| "backgroundRepeat"
| "backgroundSize"
+ | "baselineSource"
| "blockSize"
| "borderBlockEndColor"
| "borderBlockEndStyle"
@@ -85,6 +87,7 @@ export type CamelCasedProperty =
| "breakBefore"
| "breakInside"
| "captionSide"
+ | "caretAnimation"
| "caretColor"
| "clear"
| "clipPath"
@@ -95,11 +98,13 @@ export type CamelCasedProperty =
| "columnCount"
| "columnFill"
| "columnGap"
+ | "columnHeight"
| "columnRuleColor"
| "columnRuleStyle"
| "columnRuleWidth"
| "columnSpan"
| "columnWidth"
+ | "columnWrap"
| "contain"
| "containIntrinsicBlockSize"
| "containIntrinsicHeight"
@@ -109,6 +114,14 @@ export type CamelCasedProperty =
| "containerType"
| "content"
| "contentVisibility"
+ | "cornerBottomLeftShape"
+ | "cornerBottomRightShape"
+ | "cornerEndEndShape"
+ | "cornerEndStartShape"
+ | "cornerStartStartShape"
+ | "cornerStartEndShape"
+ | "cornerTopLeftShape"
+ | "cornerTopRightShape"
| "counterIncrement"
| "counterReset"
| "counterSet"
@@ -119,6 +132,7 @@ export type CamelCasedProperty =
| "direction"
| "display"
| "dominantBaseline"
+ | "dynamicRangeLimit"
| "emptyCells"
| "fieldSizing"
| "fill"
@@ -179,6 +193,9 @@ export type CamelCasedProperty =
| "insetInlineEnd"
| "insetInlineStart"
| "isolation"
+ | "interactivity"
+ | "interestDelayEnd"
+ | "interestDelayStart"
| "justifyContent"
| "justifyItems"
| "justifySelf"
@@ -271,6 +288,8 @@ export type CamelCasedProperty =
| "printColorAdjust"
| "quotes"
| "r"
+ | "readingFlow"
+ | "readingOrder"
| "resize"
| "right"
| "rotate"
@@ -289,6 +308,7 @@ export type CamelCasedProperty =
| "scrollMarginLeft"
| "scrollMarginRight"
| "scrollMarginTop"
+ | "scrollMarkerGroup"
| "scrollPaddingBlockEnd"
| "scrollPaddingBlockStart"
| "scrollPaddingBottom"
@@ -300,6 +320,7 @@ export type CamelCasedProperty =
| "scrollSnapAlign"
| "scrollSnapStop"
| "scrollSnapType"
+ | "scrollTargetGroup"
| "scrollbarColor"
| "scrollbarGutter"
| "scrollbarWidth"
@@ -321,8 +342,10 @@ export type CamelCasedProperty =
| "textAlign"
| "textAlignLast"
| "textAnchor"
+ | "textAutospace"
| "textCombineUpright"
| "textDecorationColor"
+ | "textDecorationInset"
| "textDecorationLine"
| "textDecorationSkipInk"
| "textDecorationStyle"
@@ -342,6 +365,12 @@ export type CamelCasedProperty =
| "textUnderlinePosition"
| "textWrapMode"
| "textWrapStyle"
+ | "timelineTriggerActivationRangeEnd"
+ | "timelineTriggerActivationRangeStart"
+ | "timelineTriggerActiveRangeEnd"
+ | "timelineTriggerActiveRangeStart"
+ | "timelineTriggerName"
+ | "timelineTriggerSource"
| "top"
| "touchAction"
| "transform"
@@ -354,6 +383,7 @@ export type CamelCasedProperty =
| "transitionProperty"
| "transitionTimingFunction"
| "translate"
+ | "triggerScope"
| "unicodeBidi"
| "userSelect"
| "vectorEffect"
@@ -397,6 +427,7 @@ export type HyphenatedProperty =
| "animation-name"
| "animation-play-state"
| "animation-timing-function"
+ | "animation-trigger"
| "appearance"
| "aspect-ratio"
| "backdrop-filter"
@@ -411,6 +442,7 @@ export type HyphenatedProperty =
| "background-position-y"
| "background-repeat"
| "background-size"
+ | "baseline-source"
| "block-size"
| "border-block-end-color"
| "border-block-end-style"
@@ -459,6 +491,7 @@ export type HyphenatedProperty =
| "break-before"
| "break-inside"
| "caption-side"
+ | "caret-animation"
| "caret-color"
| "clear"
| "clip-path"
@@ -469,11 +502,13 @@ export type HyphenatedProperty =
| "column-count"
| "column-fill"
| "column-gap"
+ | "column-height"
| "column-rule-color"
| "column-rule-style"
| "column-rule-width"
| "column-span"
| "column-width"
+ | "column-wrap"
| "contain"
| "contain-intrinsic-block-size"
| "contain-intrinsic-height"
@@ -483,6 +518,14 @@ export type HyphenatedProperty =
| "container-type"
| "content"
| "content-visibility"
+ | "corner-bottom-left-shape"
+ | "corner-bottom-right-shape"
+ | "corner-end-end-shape"
+ | "corner-end-start-shape"
+ | "corner-start-start-shape"
+ | "corner-start-end-shape"
+ | "corner-top-left-shape"
+ | "corner-top-right-shape"
| "counter-increment"
| "counter-reset"
| "counter-set"
@@ -493,6 +536,7 @@ export type HyphenatedProperty =
| "direction"
| "display"
| "dominant-baseline"
+ | "dynamic-range-limit"
| "empty-cells"
| "field-sizing"
| "fill"
@@ -553,6 +597,9 @@ export type HyphenatedProperty =
| "inset-inline-end"
| "inset-inline-start"
| "isolation"
+ | "interactivity"
+ | "interest-delay-end"
+ | "interest-delay-start"
| "justify-content"
| "justify-items"
| "justify-self"
@@ -645,6 +692,8 @@ export type HyphenatedProperty =
| "print-color-adjust"
| "quotes"
| "r"
+ | "reading-flow"
+ | "reading-order"
| "resize"
| "right"
| "rotate"
@@ -663,6 +712,7 @@ export type HyphenatedProperty =
| "scroll-margin-left"
| "scroll-margin-right"
| "scroll-margin-top"
+ | "scroll-marker-group"
| "scroll-padding-block-end"
| "scroll-padding-block-start"
| "scroll-padding-bottom"
@@ -674,6 +724,7 @@ export type HyphenatedProperty =
| "scroll-snap-align"
| "scroll-snap-stop"
| "scroll-snap-type"
+ | "scroll-target-group"
| "scrollbar-color"
| "scrollbar-gutter"
| "scrollbar-width"
@@ -695,8 +746,10 @@ export type HyphenatedProperty =
| "text-align"
| "text-align-last"
| "text-anchor"
+ | "text-autospace"
| "text-combine-upright"
| "text-decoration-color"
+ | "text-decoration-inset"
| "text-decoration-line"
| "text-decoration-skip-ink"
| "text-decoration-style"
@@ -716,6 +769,12 @@ export type HyphenatedProperty =
| "text-underline-position"
| "text-wrap-mode"
| "text-wrap-style"
+ | "timeline-trigger-activation-range-end"
+ | "timeline-trigger-activation-range-start"
+ | "timeline-trigger-active-range-end"
+ | "timeline-trigger-active-range-start"
+ | "timeline-trigger-name"
+ | "timeline-trigger-source"
| "top"
| "touch-action"
| "transform"
@@ -728,6 +787,7 @@ export type HyphenatedProperty =
| "transition-property"
| "transition-timing-function"
| "translate"
+ | "trigger-scope"
| "unicode-bidi"
| "user-select"
| "vector-effect"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f38cab655a..5643fe4364 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1269,8 +1269,8 @@ importers:
specifier: ^4.0.0
version: 4.0.0
mdn-data:
- specifier: 2.23.0
- version: 2.23.0
+ specifier: 2.28.0
+ version: 2.28.0
vitest:
specifier: ^3.1.2
@@ -5785,6 +5785,10 @@ packages:
resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==}
engines: {node: '>=0.4.0'}
+ resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==}
+ engines: {node: '>=0.4.0'}
+
resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==}
engines: {node: '>=0.4.0'}
@@ -5795,6 +5799,11 @@ packages:
engines: {node: '>=0.4.0'}
hasBin: true
+ resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==}
+ engines: {node: '>=0.4.0'}
+ hasBin: true
+
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
@@ -5993,6 +6002,10 @@ packages:
resolution: {integrity: sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
+ resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==}
@@ -6299,8 +6312,17 @@ packages:
supports-color:
optional: true
- resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==}
+ resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
+ engines: {node: '>=6.0'}
+ peerDependencies:
+ supports-color: '*'
+ peerDependenciesMeta:
+ supports-color:
+ optional: true
+
+ resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==}
resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==}
@@ -6338,6 +6360,9 @@ packages:
resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==}
+ resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==}
+
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
@@ -6417,6 +6442,10 @@ packages:
peerDependencies:
react: 18.3.0-canary-14898b6a9-20240318
+ resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==}
@@ -6472,6 +6501,10 @@ packages:
resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
engines: {node: '>= 0.4'}
@@ -6479,6 +6512,14 @@ packages:
resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==}
+ resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-nydQGT3RijD8mBd3Hek+2gSAxndgceZU9GIjYYiqU+7CE7veN8utTmupf0frcKpwIXCXWpRofL9CY9k0yU70CA==}
engines: {node: '>=14.0.0'}
@@ -6692,6 +6733,10 @@ packages:
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
engines: {node: '>= 6'}
+ resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==}
+ engines: {node: '>= 6'}
+
resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==}
engines: {node: '>=0.4.x'}
@@ -6759,6 +6804,10 @@ packages:
resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==}
engines: {node: '>=6'}
@@ -6774,6 +6823,10 @@ packages:
resolution: {integrity: sha512-QB9NKEeDg3xxVwCCwJQ9+xycaz6pBB6iQ76wiWMl1927n0Kir6alPiP+yuiICLLU4jpMe08dXfpebuQppFA2zw==}
engines: {node: '>=16'}
+ resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==}
@@ -6827,6 +6880,10 @@ packages:
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
+ resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
@@ -6856,6 +6913,10 @@ packages:
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==}
engines: {node: '>= 0.4'}
@@ -7216,9 +7277,9 @@ packages:
resolution: {integrity: sha512-Dxc5SCG4kB+wF+Rh55ism3SuecOKeOtCtGHFGKd6pj2QKVojtjkxGTQPMt7//2z5rMSue4R+hmRM0pCEZflupA==}
- resolution: {integrity: sha512-aJJIElCLWnHMcYZPtsM07QoSfHwpxCy4VUzBYGXFYEmh/h2QS5uZNbCCfL0CqnkOE30b7Tp9DVfjXag+3qzZjQ==}
- engines: {node: '>=14'}
+ resolution: {integrity: sha512-DeXj9X5xDCjgKLU/7RR+/HQEVzuuEUiwldwOGsHK/sfAfELGWEyTcf0x+uOvCvK3O2zPmZePXWL85vtia6GyZw==}
+ engines: {node: '>=16'}
hasBin: true
@@ -7309,6 +7370,10 @@ packages:
resolution: {integrity: sha512-bGJ6Zb+OhzXe+ptP5d80OLVx7AkqfRbtGEh30vNSfjNwllu+hHI+tcbMIT/fbkx/FKN1PmKuDb65+Oofg+XUxw==}
+ resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
+ engines: {node: '>= 0.4'}
+
resolution: {integrity: sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==}
@@ -7351,8 +7416,8 @@ packages:
resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==}
- resolution: {integrity: sha512-786vq1+4079JSeu2XdcDjrhi/Ry7BWtjDl9WtGPWLiIHb2T66GvIVflZTBoSNZ5JqTtJGYEVMuFA/lbQlMOyDQ==}
+ resolution: {integrity: sha512-uy9AS1yt+wW5eUEefgE3lOpqPghanUttycV0GXKbiXyBjwvbeE8XPj4u1C+voRfz7dEjwU4NDHTMfZ/s/JtZrQ==}
resolution: {integrity: sha512-1N4qp+jE0pL5Xv4uEcwVUhIkwdUO3S/9gML90nqKA7v7FcOS5vUtatfzok9S9U1EJU8dHWlcv95WLnKmmxZI9w==}
@@ -7744,6 +7809,9 @@ packages:
resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==}
+ resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==}
+
resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==}
engines: {node: '>= 6.13.0'}
@@ -7792,8 +7860,8 @@ packages:
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
- resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==}
+ resolution: {integrity: sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==}
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
@@ -8129,8 +8197,8 @@ packages:
resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
engines: {node: '>= 0.10'}
- resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==}
+ resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==}
resolution: {integrity: sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==}
@@ -8145,6 +8213,10 @@ packages:
resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==}
engines: {node: '>=6'}
+ resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
+ engines: {node: '>=6'}
+
resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==}
engines: {node: '>=0.6'}
@@ -8904,6 +8976,9 @@ packages:
resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==}
+ resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==}
+
resolution: {integrity: sha512-XyWQowvP9CKZycKc/Zg9SYWrAWX/gJCE799AUTFqk8yC3tp44K1xWr3LoFF0MNEjClKOo1suCr5ASnoy+KltdA==}
engines: {node: '>=12'}
@@ -9444,6 +9519,18 @@ packages:
utf-8-validate:
optional: true
+ resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==}
+ engines: {node: '>=10.0.0'}
+ peerDependencies:
+ bufferutil: ^4.0.1
+ utf-8-validate: '>=5.0.2'
+ peerDependenciesMeta:
+ bufferutil:
+ optional: true
+ utf-8-validate:
+ optional: true
+
resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==}
engines: {node: '>=12'}
@@ -13012,8 +13099,8 @@ snapshots:
dependencies:
- acorn: 8.14.1
- acorn-walk: 8.3.4
+ acorn: 8.16.0
+ acorn-walk: 8.3.5
optional: true
@@ -13026,13 +13113,21 @@ snapshots:
dependencies:
acorn: 8.14.1
+ dependencies:
+ acorn: 8.16.0
+ optional: true
+
+ optional: true
+
dependencies:
- debug: 4.4.0
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
optional: true
@@ -13253,6 +13348,12 @@ snapshots:
tar: 6.1.13
unique-filename: 3.0.0
+ dependencies:
+ es-errors: 1.3.0
+ function-bind: 1.1.2
+ optional: true
+
dependencies:
function-bind: 1.1.1
@@ -13535,7 +13636,12 @@ snapshots:
dependencies:
ms: 2.1.3
+ dependencies:
+ ms: 2.1.3
+ optional: true
+
optional: true
@@ -13564,6 +13670,8 @@ snapshots:
+
@@ -13630,6 +13738,13 @@ snapshots:
react-is: 17.0.2
tslib: 2.6.0
+ dependencies:
+ call-bind-apply-helpers: 1.0.2
+ es-errors: 1.3.0
+ gopd: 1.2.0
+ optional: true
+
dependencies:
end-of-stream: 1.4.4
@@ -13673,10 +13788,26 @@ snapshots:
dependencies:
get-intrinsic: 1.2.4
+ optional: true
+
+ dependencies:
+ es-errors: 1.3.0
+ optional: true
+
+ dependencies:
+ es-errors: 1.3.0
+ get-intrinsic: 1.3.0
+ has-tostringtag: 1.0.2
+ hasown: 2.0.2
+ optional: true
+
dependencies:
'@jspm/core': 2.0.1
@@ -14079,6 +14210,15 @@ snapshots:
combined-stream: 1.0.8
mime-types: 2.1.35
+ dependencies:
+ asynckit: 0.4.0
+ combined-stream: 1.0.8
+ es-set-tostringtag: 2.1.0
+ hasown: 2.0.2
+ mime-types: 2.1.35
+ optional: true
+
@@ -14141,6 +14281,20 @@ snapshots:
has-symbols: 1.0.3
hasown: 2.0.2
+ dependencies:
+ call-bind-apply-helpers: 1.0.2
+ es-define-property: 1.0.1
+ es-errors: 1.3.0
+ es-object-atoms: 1.1.1
+ function-bind: 1.1.2
+ get-proto: 1.0.1
+ gopd: 1.2.0
+ has-symbols: 1.1.0
+ hasown: 2.0.2
+ math-intrinsics: 1.1.0
+ optional: true
+
@@ -14149,6 +14303,12 @@ snapshots:
+ dependencies:
+ dunder-proto: 1.0.1
+ es-object-atoms: 1.1.1
+ optional: true
+
dependencies:
data-uri-to-buffer: 2.0.2
@@ -14212,6 +14372,9 @@ snapshots:
dependencies:
get-intrinsic: 1.2.1
+ optional: true
+
@@ -14247,6 +14410,9 @@ snapshots:
+ optional: true
+
dependencies:
has-symbols: 1.0.3
@@ -14319,7 +14485,7 @@ snapshots:
dependencies:
'@tootallnate/once': 2.0.0
agent-base: 6.0.2
- debug: 4.4.0
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
optional: true
@@ -14329,7 +14495,7 @@ snapshots:
dependencies:
agent-base: 6.0.2
- debug: 4.4.0
+ debug: 4.4.3
transitivePeerDependencies:
- supports-color
optional: true
@@ -14576,20 +14742,20 @@ snapshots:
dependencies:
abab: 2.0.6
- acorn: 8.14.1
+ acorn: 8.16.0
acorn-globals: 7.0.1
cssom: 0.5.0
cssstyle: 2.3.0
data-urls: 3.0.2
- decimal.js: 10.4.3
+ decimal.js: 10.6.0
domexception: 4.0.0
escodegen: 2.1.0
- form-data: 4.0.0
+ form-data: 4.0.5
html-encoding-sniffer: 3.0.0
http-proxy-agent: 5.0.0
https-proxy-agent: 5.0.1
is-potential-custom-element-name: 1.0.1
- nwsapi: 2.2.7
+ nwsapi: 2.2.23
parse5: 7.3.0
saxes: 6.0.0
symbol-tree: 3.2.4
@@ -14599,7 +14765,7 @@ snapshots:
whatwg-encoding: 2.0.0
whatwg-mimetype: 3.0.0
whatwg-url: 11.0.0
- ws: 8.18.1
+ ws: 8.20.0
xml-name-validator: 4.0.0
transitivePeerDependencies:
- bufferutil
@@ -14632,7 +14798,7 @@ snapshots:
dependencies:
isomorphic.js: 0.2.5
@@ -14732,6 +14898,9 @@ snapshots:
'@babel/runtime': 7.25.0
remove-accents: 0.5.0
+ optional: true
+
dependencies:
'@types/mdast': 3.0.15
@@ -14845,7 +15014,7 @@ snapshots:
dependencies:
@@ -15452,6 +15621,8 @@ snapshots:
+
@@ -15506,7 +15677,7 @@ snapshots:
dependencies:
boolbase: 1.0.0
optional: true
@@ -15828,7 +15999,9 @@ snapshots:
forwarded: 0.2.0
ipaddr.js: 1.9.1
+ dependencies:
+ punycode: 2.3.1
optional: true
@@ -15849,6 +16022,9 @@ snapshots:
+ optional: true
+
dependencies:
side-channel: 1.0.6
@@ -16569,8 +16745,8 @@ snapshots:
dependencies:
- psl: 1.9.0
- punycode: 2.3.0
+ psl: 1.15.0
+ punycode: 2.3.1
universalify: 0.2.0
url-parse: 1.5.10
optional: true
@@ -16583,7 +16759,7 @@ snapshots:
dependencies:
- punycode: 2.3.0
+ punycode: 2.3.1
optional: true
@@ -16643,6 +16819,8 @@ snapshots:
+
dependencies:
'@rushstack/ts-command-line': 4.12.2
@@ -16671,11 +16849,11 @@ snapshots:
dependencies:
consola: 3.4.2
- defu: 6.1.4
+ defu: 6.1.7
mime: 3.0.0
- node-fetch-native: 1.6.6
+ node-fetch-native: 1.6.7
pathe: 1.1.2
- ufo: 1.5.4
+ ufo: 1.6.3
dependencies:
@@ -17189,6 +17367,9 @@ snapshots:
+ optional: true
+
optional: true
@@ -17226,7 +17407,7 @@ snapshots:
dependencies:
- lib0: 0.2.73
+ lib0: 0.2.117