Replies: 3 comments
-
|
Template literal share common problem of not having syntax highlighting, autocomplete suggestions or more serious: applying on different states. Something like |
Beta Was this translation helpful? Give feedback.
-
|
The idea is great, everything is in place i get the pros. But the cons are way bigger in my opinion. At the end why bloating a framework from the beginning with have style opinionated stuff, if you could just you class="" thats all what we want. It makes the framework more agnostic to everyone, no need to learn a new syntax, no need to maintain anything. |
Beta Was this translation helpful? Give feedback.
-
|
I updated the example to clear up the confusion. Pay no attention to the tagged template literal (previously I would say it's as unopinionated as it gets, because it's just pure css but moved up and spliced from a single |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Popularity of tailwind shows, that it's desirable to define styles in-place with component declarations. Personally I am a proponent of css styling solutions like Open Props. What do you think about a proposal like this:
observations:
css={...}is proper CSS. Just a plain, embedded language, from the POV of parser.css={ font-weight: 800; }orcss={ &{ font-weight: 800;} }. Useful if wanting to, for example, define hover styles/psudo elements like<style>tag.<style></style>tag right now you could CTRL+C, CTRL+V piece by piece into the appropriate components'css={}blocks and vice-versa: merge those again into single css file (module class names, which in first case are redundant and in second are auto-generated by compiler).Beta Was this translation helpful? Give feedback.
All reactions