Open kylpo opened 4 years ago
Since the values are extracted at compile time, truly dynamic values can’t be used. These are thankfully not very common and since they are unique, don’t suffer from being defined inline. What’s more common is conditionally applying styles, which of course is supported. So are local constants and mathematical expressions, thanks to babel’s path.evaluate.
Some may complain about this, that the generated class names are not semantic, that they are opaque and are ignoring the cascade. This is true. We are treating CSS as a compilation target.
johanholmerin/style9: CSS-in-JS compiler inspired by Facebook's stylex
style9: build-time CSS-in-JS | CSS-Tricks