-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Responsive state style not working when using _ #288
Comments
I have been unable to update to 3.1.x due to a similar issue. seems to be affected by the following modify. b69619e#diff-edd87da59beb6f474c429c0a205143f6d0446314ca8dfab56a814823e1a3520cR74 |
@strozw That's a typing change, it wouldn't change how responsive states work. The problem in this bug is the order of the emitted rules. This is from browser inspection of @ivanbanov's sandbox: .css-1exvybm {
background-color:red;
}
@media (min-width: 768px) {
.css-1exvybm {
background-color:blue;
}
.css-1exvybm:hover {
background-color:red;
}
}
@media (min-width: 1024px) {
.css-1exvybm {
background-color:green;
}
.css-1exvybm:hover {
background-color:blue;
}
}
.css-1exvybm:hover {
background-color:green;
} Media queries don't change specificity, so the final hover rule wins. It needs to be emitted prior to the media queries. |
I'm sorry to make a misleading comment. but I'm facing other issues with |
@agriffis I think it is a real bug, we have to address it. |
@gregberge Yes, my comment was describing the bug in xstyled. I agree we need to fix it. |
When using responsive states such as
only the
hover
declared in the_
will work, if we remove the_
everything works fineLink to reproduce it https://codesandbox.io/s/fervent-dewdney-dpqku?file=/src/App.js
The text was updated successfully, but these errors were encountered: