-
Notifications
You must be signed in to change notification settings - Fork 11
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
use API className={css
}
#6
Comments
Could you explain why you prefer |
Well, I see, Then how about: // wrong because it's global... or we can just use it as global
<Style css={`.abc { color: red; }`}>
<div className="abc">123</div>
</Style>
<Style css={`background:blue; & .abc { color: red; }`}>
{css => <div className={css.default}><div className={css.abc}>123</div></div>}
</Style>
// or
<Style css={`background:blue; & .abc { color: red; }`}>
{className => <div className={className}><div className="abc">123</div></div>}
</Style> I don't like I don't like |
I don't think the API you're proposing would be very good and I think that they would cause problems because both of your examples force you to name a class which is something that we're trying to avoid. Also, the first example would cause problems if you use the same class name down further down the tree. The second example would be difficult to implement well because of the way emotion works and supporting that would make it less performant. It would also create many edge cases, for example what if the selector is Could explain why you think |
In
README.md
at 2018.05.08,to use
emotion/next
, we can only use eitherjsx
orstyled.xxx
.I don't like any of them.
Can we have an api
className={css``}
?The text was updated successfully, but these errors were encountered: