Nested @media break css support
tpetry opened this issue · 3 comments
tpetry commented
The CSS3 spec allows nested media queries, but juice has problems handling them. The closing bracket is lost after transformation.
Input:
<style type="text/css">
@media (min-width: 640px) {
.sm\:container {
width: 100%
}
@media (min-width: 640px) {
.sm\:container {
max-width: 640px
}
}
}
p {
background-color: red;
}
</style>
<p>Test123</p>
Result:
Error: Unexpected } (line 12, char 1)
<style type="text/css">
@media (min-width: 640px) {
.sm\:container {
width: 100%
}
@media (min-width: 640px) {
.sm\:container {
max-width: 640px
}
}
p {
background-color: red;
}
</style>
<p style="background-color: red;">Test123</p>
jrit commented
thanks for the suggestion, would love a PR to make this work.
filoscoder commented
I think this will solve it
#442