phax/ph-css

*IDENT (<=IE6 hack) in style declaration block, drops all declarations after this one (in browser compliant mode)

shagkur opened this issue · 7 comments

There're still CSS out there using/supporting this "hack". Dropping this specific declaration is perfectly fine, but unfortunately the rest after this declaration is also dropped (in browers compliant mode)

This would be my approach/proposal to fix this issue:
#85

phax commented

In the PR you are throwin a ParseException in case of error. What is your goal? Just drop that particular property?

phax commented

For the input CSS

div {
max-width: 100px;
*zoom: 1;
position: relative;
}

in browser compliant mode I would expect this as an output:

div {
max-width: 100px;
position: relative;
}

in non-browser compliant mode I would expect this as an output:

div {
max-width: 100px;
}

In the PR you are throwin a ParseException in case of error. What is your goal? Just drop that particular property?

Yeees. It should drop that particular property in browser compliant mode (which should be achieved by the catch clause in the styleDeclaration() rule then) otherwise it should throw thru the exception (and will/should then be catched in styleDeclarationBlock() rule). If i understood everything right.

And then it should, depending on the mode, result on what you described in the next post.

phax commented

Stupid one - please confirm. If so, I will release

Sorry for answering late....
Works great. This is a way better solution, especially regarding the error reporting.
Thanks alot for putting your time into this :)

phax commented

Part of 6.5.0 release that I will be creating now