-
Notifications
You must be signed in to change notification settings - Fork 20
any plans css support? #19
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
Comments
What result are you experiencing? This is because it currently assumes the string to contain a complete declaration. Could any of the styled-components experts, perhaps @daedlock, since you reviewed my PR when we added initial support clarify: is css`` intended to be used for whole css declarations, including selectors? const styles2 = css`
div {
color: red
}
another {
margin:5px
}
` or sets of properties? const styles = css`
color: red IIRC correctly I've seen both kinds of usages? |
Yes, AFAIK, |
Not quite true. const styleFragment = css`
color: blue;
`
const Button = styled.div`
background: red;
${styleFragment}
` That is the most widely used usage. Note though that both can (but don't have to!) also contain full CSS declarations for nesting: const styleFragment = css`
color: blue;
// Any div within a component that has this style fragment will be red
div {
color: red;
}
`
const Button = styled.div`
background: red;
${styleFragment}
// Any span within this button will be blue
span {
background: blue;
}
` (excuse the nonsensical example) |
Ok, thanks, I assumed it was expected to contain a complete declaration and was wrong. |
css is not yet supported?
The text was updated successfully, but these errors were encountered: