7 Commits
Author SHA1 Message Date
Oleg Isonen 8de2fd47f6 fix: CSS shorthand properties not saved when value contains var() (#5688)
Shorthand properties like background: var(--color) were silently dropped
when pasting into the CSS editor because the shorthand expander can't
handle unresolved var() references.

Fix: CSS vars from the current element's computed styles are now
resolved before expanding shorthands. Inline and nested fallbacks
(var(--a, var(--b))) are supported. If a var still can't be resolved, a
toast error is shown instead of silently dropping the property.
2026-04-12 17:14:01 +02:00
Bogdan Chadkin 0889342c33 refactor: switch to hyphenated preset styles (#4930)
Replaced camel case with kebab in all presets
2025-03-04 17:26:32 +07:00
Bogdan Chadkin 78a0fa98c1 refactor: output hyphenated properties from css parser (#4900)
We are going to switch to hyphenated properties in styles. Here
refactored css parser to output hyphenated property instead of camel
case and added camelCaseProperty utility which does the opposite of
hyphenateProperty.
2025-02-22 18:11:57 +07:00
Bogdan Chadkin adadbe3aa2 refactor: enable isolated declatations in css data (#4476)
Moved transition related stuff into builder, simplified mdn-data and
added missing types to exports, removed popularity index.
2024-11-30 16:47:26 +07:00
Bogdan Chadkin 3dd8c2f482 refactor: upgrade html-tags (#3946)
The new version exports types with normal casing,
the package is completely esm and reexports json with new syntax.

https://github.com/sindresorhus/html-tags/blob/main/index.js#L1

Also reused voidHtmlTags in collapsed instance logic.
2024-08-16 11:24:57 +02:00
Bogdan Chadkin c7e88531d7 refactor: optimize html styles access (#3939)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Styles are accessed for specific fields and never iterated. Here output
html styles as single map with composite key tag:property.
2024-08-15 18:26:26 +02:00
Bogdan Chadkin 3a35b6cbc3 refactor: rewrite html styles with css (#3938)
Ref https://github.com/webstudio-is/webstudio/issues/1536

We have a proper parser which can convert raw css into webstudio styles.
Rewrite should simplify maintaining and allow to change final format
without big rewrites.
2024-08-15 15:15:43 +02:00