-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
please consider using css string props like emotion #1141
Comments
Hello, I believe this isn't supported to keep bundle size in check and runtime performance up, see https://stitches.dev/blog/migrating-from-styled-components-to-stitches#object-syntax-only |
You can create a function like this one from goober (or copy it): https://github.com/cristianbote/goober/blob/master/src/core/astish.js and then create a simple function for the template tags: export function css(strings, ...expressions) {
const evaluated = strings.reduce((result, currentString, i) => (
`${result}${currentString}${expressions[i] ? expressions[i] : ''}`
), '')
return astish(evaluated)
} and then use it like in your example. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Has the official considered using css string props like emotion?
Because users often write code according to the figma inspection when developing projects in the company:
If use the css object to write, users also need to convert the figma inspect into the css object.
But if users can directly use the css string, users can directly paste the figma css inspect, which will greatly improve the work efficiency.
The text was updated successfully, but these errors were encountered: