Commit Graph
7 Commits
Author SHA1 Message Date
Bogdan Chadkin 101fb0d8f8 experimental: optionally support parsing custom properties (#3722)
Ref https://github.com/webstudio-is/webstudio/issues/3399
https://github.com/webstudio-is/webstudio/issues/1536

Here added optional support for custom properties in css parser. Also
refactored basic style object model tests with css/jsx fixtures.
2024-07-15 10:57:46 +02:00
Bogdan Chadkin dc1ccd8e2e experimental: support browser and preset styles in style object model (#3067)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added new "layer" option to specificity
which isolate browser and preset styles into own layeys similar to
cascade layers feature from css.
2024-03-29 20:36:20 +07:00
Bogdan Chadkin 9296cd6c1a experimental: support breakpoints and states in style object model (#3055)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here improved sorting declared values and computing cascade value. Added
support for breakpoints and states. Introduced specificity rules to sort
by State-Breakpoint-StyleSource without complicated logic.
2024-03-28 13:03:56 +07:00
Bogdan Chadkin beb3438224 experimental: support custom properties (#3047)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added support for css custom properties in style object model.
Added guaranteed-invalid value to schema to represent initial value of
custom properties.
2024-03-25 19:44:32 +07:00
Bogdan Chadkin dc68851a5b experimental: improve color: currentcolor behavior (#3045)
Here slightly changed how color: currentcolor is treated. Before on
color property inherited value was used. Though this didn't handle the
case when inherited value is also currentcolor. Here found note in
another spec which says color: currentcolor should be interpreted same
as inherit keyword.
2024-03-23 17:00:34 +07:00
Bogdan Chadkin 16f165a681 experimental: support currentcolor in style object model (#3043)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added currentcolor keyword support. It is case insensitive and
resolved as a new "used value", while "computed value" still contains
currentcolor.
2024-03-22 15:52:07 +07:00
Bogdan Chadkin 0fab9af9a5 experimental: setup style object model (#3042)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added style object model basic functionality with inheritance and a
few keywords like "initial", "inherit" and "unset".

The algorithm is following css spec and will get more features in next
PRs.
2024-03-22 13:23:53 +07:00