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
This is an intentional part of the design to ensure consistency and to enable some important features in the future. There's also a potential performance improvement we can make with the current design.
Consistency - It is a very complicated edge-case to explain, and TBH, I've forgotten some of the details, but TLDR; inline styles having the highest specificity can cause some problems.
Future features - We're planning on polyfilling future/experimental CSS features using a CSS post-processor. Some of these features are reliant on knowing all possible values a variable can take. Inline styles are not part of the CSS file and would cause issues. With the current design, the post-processing step can detect when a variable has a dynamic value and handle/error on that as appropriate.
Performance - Variable values are normally inherited, and this increases the performance cost of using variables. With the new @property feature, it possible to mark certain variables as non-inheriting. Using this enables us to speed up the usage of variables that are created for dynamic values.
Describe the feature request
Creating a style with a function already creates custom properties
There are two unnecessary actions
It is recommended that you skip these two unnecessary tasks if they are preceded by two dashes
example
These features make custom properties within more accessible
The text was updated successfully, but these errors were encountered: