-
Notifications
You must be signed in to change notification settings - Fork 256
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
How to set strict mode? #858
Comments
It has been removed, yes. You can still have a strict-er way to use tokens via the theme object though |
Is there any chance of this returning? What about returning another function similar to |
There's a chance, yes. This API is what I had drafted too :D |
@peduarte any updates on this? This is the only thing that is really lacking in stitches at the moment IMO! |
Not sure if related, but it seems like no typing at all is working: const dialogStyle = css({
displays: "flex ",
flexDirection: "diagonal",
background: 1,
// any other nonsensical key/value i can think of also does not throw any error
}); Basically no type errors (for valid CSS properties and values) seem to get caught. I'm trying to switch from emotion, which catches these errors.
Not sure if you can consider this "getting typing". Checking for CSS property/value errors is one of the main points (imo) for doing CSS-in-JS. |
I've been using something like: import { css as css_ } from '@stitches/core'
import { SimplePseudos, StandardProperties } from '@stitches/core/types/css'
type CSS = Partial<StandardProperties> & Partial<Record<SimplePseudos, Partial<StandardProperties>>>
const css: (x: CSS) => ReturnType<typeof css_> = css_
const tagStyle = css({
borderRadius: 5,
foobar : 'error!'
}) |
I saw that you guys merged this PR #206 which does exactly what I was looking for.
Despite the PR I can not find it in the docs, was it removed? What is the right way to set it up?
The text was updated successfully, but these errors were encountered: