Feature request/discussion: CSS in tagged template literals #703
Unanswered
elektronik2k5
asked this question in
Ideas
Replies: 2 comments
-
I would very much like to see this happening. Let's put back styles where they belong, in strings. Word of caution: if the feature will be considered please make it available also for React Native. Styled-components allow to write exactly the same styles for both ecosystem and it's a huge advantage. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Note: Converted from an issue to a discussion. Let's chat! :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello and thanks for working on Stitches!
Is your feature request related to a problem? Please describe.
Most/many CSS-in-JS packages support plain CSS syntax via ES2015 tagged template literals. I searched the docs and issues but found no record of a discussion on this topic. I apologise if I failed to find it.
Is it out of scope for this project by design? Is it not a priority?
Describe the solution you'd like
I find that being able to use plain CSS syntax is highly beneficial. It removes friction, allows copy/pasting and just makes interoperability easy. I love how CSS-in-JS allows me to use a general purpose language to express styling and use any abstraction I want using all the language features I wish - when I need that.
But a lot of the time, all I need is to write some CSS without having to convert it to JS POJOs. And I don't wanna rely on editor plugins for that.
Likewise, grepping styling from a browser in your source code is seamless when the styling is authored in CSS syntax, which can be copy/pasted. I find it is highly valuable for maintainability.
Describe alternatives you've considered
Editor/IDE plugins, which I don't want to depend on.
Additional context
Emotion, styled-components and Linaria, among others, all support this feature.
Beta Was this translation helpful? Give feedback.
All reactions