You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out the best way to represent declared styles in my application that will then be using the declared styles to cascade, default, compute final styles.
I was trying to figure out how to represent a declared property that could include the CSS wide variablesinitial, inherit, unset, and revert, and looked at how lightningcss was doing so (When I get to CSS parsing, I'm hoping to use lightningcss to do so, so I wanted to make sure I was mostly going to be compatible. When I looked at DeclarationBlock, and Property and didn't see any way these could be represented.
I ran a quick test parse with lightning, and found that indeed a property like background-color: inherit; gets represented as
Which leaves me with two questions, one related to lightningcss and one general design question.
For lightningcss my question is: is there any plan to have css-wide variables parsed into a structure at some point? Is that a roadmap item, or is that out of scope for the project?
For my general design question, I was curious if the following seemed like a reasonable representation of a declared property. My hope is that I'm not designing things in such a way that integrating with lightningcss when I get to the parsing phase will be a big challenge.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to figure out the best way to represent declared styles in my application that will then be using the declared styles to cascade, default, compute final styles.
I was trying to figure out how to represent a declared property that could include the CSS wide variables
initial
,inherit
,unset
, andrevert
, and looked at how lightningcss was doing so (When I get to CSS parsing, I'm hoping to use lightningcss to do so, so I wanted to make sure I was mostly going to be compatible. When I looked atDeclarationBlock
, andProperty
and didn't see any way these could be represented.I ran a quick test parse with lightning, and found that indeed a property like
background-color: inherit;
gets represented asWhich leaves me with two questions, one related to lightningcss and one general design question.
For
lightningcss
my question is: is there any plan to have css-wide variables parsed into a structure at some point? Is that a roadmap item, or is that out of scope for the project?For my general design question, I was curious if the following seemed like a reasonable representation of a declared property. My hope is that I'm not designing things in such a way that integrating with lightningcss when I get to the parsing phase will be a big challenge.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions