Files
Oleg Isonen 95dc7f0a75 fix: Validate malformed CSS variable values (#5787)
**Summary**

Validates CSS custom property values as raw CSS token streams before
saving/parsing them.

This prevents malformed values like `#sd'` from being normalized into
`sd` or serialized into broken canvas CSS that invalidates the whole
generated rule.

**Changes**

- Added tokenizer-based validation for custom property values.
- Rejects malformed strings, URLs, comments, unmatched blocks, and
trailing backslashes.
- Preserves raw custom property declaration values before `css-tree` can
repair/normalize them.
- Prevents custom property value editing from coercing invalid input
through fallback parsing like `kebabCase()` or color recovery.
- Added regression tests for advanced panel input and CSS data parsing.

**Verification**

- `pnpm --filter @webstudio-is/css-data test -- parse-css-value.test.ts
parse-css.test.ts`
- `pnpm --filter @webstudio-is/builder test --
parse-intermediate-or-invalid-value.test.ts parse-style-input.test.ts`
2026-06-01 17:03:54 +02:00
..
2022-11-17 21:12:39 +01:00

CSS Data

Generated configs and collections from mdn-data into consumable form.