-
Notifications
You must be signed in to change notification settings - Fork 32
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
Conditional style is overwritten in loop when using cssNamespace #70
Comments
Done a bit digging and found out, that with such cases, styled-components generate <div class="sc-iJuUWI jYeWx"></div> when condition isn't met, styled-components generate: <div class="sc-iJuUWI hFQvAs"></div> while plugin generates the following css: #my-widget .sc-iJuUWI {
// something when condition met
}
#my-widget .sc-iJuUWI {
// something when condition not met
} whilst it should've generated smth like #my-widget .sc-iJuUWI.jYeWx {
// something when condition met
}
#my-widget .sc-iJuUWI.hFQvAs {
// something when condition not met
} |
this is caused by an issue in styled-components styled-components/styled-components#3265 |
From the
|
I have same issue |
Try to downgrade |
Hi,
I have a namespace
#my-widget
.Components looks schematically like this
When
entries: [{value: '1', isNegative: false}, {value: '-2', isNegative: true}]
all values arered
When
entries: [{value: '-1', isNegative: true}, {value: '2', isNegative: false}]
all values aregreen
The text was updated successfully, but these errors were encountered: