Skip to content
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

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

Closed
shagkur opened this issue Jan 19, 2022 · 7 comments

Comments

@shagkur
Copy link
Contributor

shagkur commented Jan 19, 2022

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)

@shagkur shagkur changed the title *IDENT (<=IE6 hack) in style declaration block, drops all declaration after this one (in browser compliant mode) *IDENT (<=IE6 hack) in style declaration block, drops all declarations after this one (in browser compliant mode) Jan 19, 2022
shagkur added a commit to unblu/ph-css that referenced this issue Jan 25, 2022
@shagkur
Copy link
Contributor Author

shagkur commented Jan 25, 2022

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

@phax
Copy link
Owner

phax commented Jan 27, 2022

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

@phax
Copy link
Owner

phax commented Jan 27, 2022

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;
}

@shagkur
Copy link
Contributor Author

shagkur commented Jan 27, 2022

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 added a commit that referenced this issue Jan 27, 2022
@phax
Copy link
Owner

phax commented Jan 27, 2022

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

@shagkur
Copy link
Contributor Author

shagkur commented Jan 28, 2022

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
Copy link
Owner

phax commented Jan 28, 2022

Part of 6.5.0 release that I will be creating now

@phax phax closed this as completed Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants