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

Minimization of pseudo-classes #235

Closed
eGavr opened this issue Feb 10, 2014 · 3 comments
Closed

Minimization of pseudo-classes #235

eGavr opened this issue Feb 10, 2014 · 3 comments

Comments

@eGavr
Copy link

eGavr commented Feb 10, 2014

Look at this test, please!


a {
    color: red
}

a, x:after {
    color: red
}

It is minimized to


a,x:after{color:red}

Sometimes this minimized code is not correct in some browses. For example IE, which version is less than 8, does not know anything about pseudo-elements, so according to CSS-specification, this browser will ignore this block, because its selector has unknown syntax for him.

I mean, that those browsers which do not support the :after will not see the entire minimized block!

@GoalSmashers
Copy link
Contributor

@eGavr Indeed that's a problem when caring about IE7 compatibility. We've had similar code for IE8 before so adding one for IE7 wasn't a problem.

It seems we need to update the list slightly to make sure all selectors are matched, see: http://kimblim.dk/css-tests/selectors/

@eGavr
Copy link
Author

eGavr commented Feb 10, 2014

As I've understood, clean-css checks whether all browsers support this or that selector, and if 'Yes', the selector is going to be minimized?

@GoalSmashers
Copy link
Contributor

That's how it works indeed!

Selectors updated in cefbc2a

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