phax / ph-css

Advanced Java CSS 3 parser and builder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected rule '@': Unknown rule in the middle of a rule-set is not allowed!

yinkwok-ys opened this issue · comments

Hi,
I use ph-css as my maven plugin to minify css now, but I facing the following error
Unexpected rule '@': Unknown rule in the middle of a rule-set is not allowed!

This happened when I use @-moz-document inside an media queries, e.g.:
@media (max-width: 959px) {
...
@-moz-document url-prefix() {
.test-class {
height: 1vh;
visibility: collapse;
}
}
}

Would you add support to this situation? thanks

Hi, honestly I don't want to support any vendor extension in a structured way.
The Mozilla page https://developer.mozilla.org/de/docs/Web/CSS/@document states, that this wasn't part of CSS Conditional Level 3, but moved to Level 4, and when looking at the latest draft Level 4 document at https://www.w3.org/TR/css-conditional-4/ it also doesn't show there. So I doubt that this selector will be supported any time soon outside of Firefox.

The problem in this particular case is, that the grammar allows this rule, but the CSSMediaRule doesn't support it

Will be part of the 6.3.3 release that is just building

Thanks for the additional support for this situation.

Thanks for bringing this to my attention :)