-
Notifications
You must be signed in to change notification settings - Fork 262
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
Using @support inside @media discards a closing curly brace #370
Comments
I noticed something. This bug only occurs when Example: <style jsx global>{`
@media (max-width: 64em) {
.halves-3uXAK.clearBottom-1bMlY ul {
margin-bottom: -4.34783%;
}
@supports (-moz-appearance: none) and (display: contents) {
.halves-3uXAK.clearBottom-1bMlY ul {
margin-bottom: -2rem;
}
}
.oneMoreRule {
width: 0;
}
}
`}</style> Turns into this @media (max-width:64em) {
.halves-3uXAK.clearBottom-1bMlY ul {
margin-bottom: -4.34783%;
}
@supports (-moz-appearance:none) and (display:contents) {
.halves-3uXAK.clearBottom-1bMlY ul {
margin-bottom: -2rem;
}
}
.oneMoreRule {
width: 0;
}
}
/* Everything looks good! */ |
@thysultan can this be a bug in Stylis? |
@giuseppeg I get the following(minus whitespace) with stylis(inc the different configs) @media (max-width:64em){
.halves-3uXAK.clearBottom-1bMlY ul{
margin-bottom:-4.34783%
}
@supports (-moz-appearance:none) and (display:contents){
.halves-3uXAK.clearBottom-1bMlY ul{
margin-bottom:-2rem
}
}
} So it doesn't look it is from stylis. |
@thysultan thanks for checking! |
@giuseppeg Getting this in both production and development. |
@matt-hernandez can you put together a sample repo (maybe a Next.js app) to reproduce? Or even better submit a pull request with a failing test? |
@thysultan I can reproduce the bug. It happens when using |
@giuseppeg Can you open a issue at stylis with the repro. |
I have this chunk of code in one of my components
The resulting CSS in the
<head>
comes out like this:The text was updated successfully, but these errors were encountered: