Replies: 1 comment 1 reply
-
It's an interesting one, because there are a lot of fracturing of opinions here. Some people dislike CSS in JS like solutions on principle. Or they like different forms. While I agree Solid does have some strong opinions on state management since basically the whole framework is a direct extension of it, CSS is a lot harder to be opinionated on. Mostly is that I'm yet to see a solution that I could confidently say just does everything I like. styled-jsx is close but it's also not quite right. I think this is a good topic for discussion. I'd love to collect people's thoughts here. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First I wanted to congratulate you for the good job you have been doing putting together this great library. For me this is a all-in-one solution for many packages that I have been using all the time to created web apps.
Solid.js is turning state management in Components much more flexible.
I wonder if we could have something change too in the style prop of JSX Elements. The reason I see most have to use a CSS-in-JS solutions is because the style prop is limited and don’t allow: (1) adding modifiers (like “&:hover”...), (2) scss complex styles (cascading).
So I think it would simplify if the style prop natively accepted these items just as the css in solid-styled-components package accept.
This is similar to what Emotion has done with their css prop, but not instead of creating a css prop, just use native style prop.
Right now we can do:
But we could actually just do:
This way maybe solid-styled-components would not be a separate package anymore, it would become part of the solid-js package.
This is just my two cents that I feel that would make sense with the spirit behind Solid.js.
Beta Was this translation helpful? Give feedback.
All reactions