Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Specificity question #28

morten opened this Issue Apr 23, 2012 · 1 comment


None yet
2 participants

morten commented Apr 23, 2012


h1 { font-size: 5px; }
h2 { font-size: 5px; }

Is equivalent to

h1,h2 { font-size: 5px; }

Shouldn't the specificity be calculated per selector for the rule set rather than just set to 0 when given a compound selector?

I've implemented the change here, but one of the existing tests fail and I'd like your thoughts on this https://github.com/morten/css_parser/commit/cf8d82db6f94a873a7ec141071480bc875d43b4f

@alexdunae alexdunae closed this in a0c9c96 Apr 24, 2012


alexdunae commented Apr 24, 2012

Defaulting to zero made sense to me at the time, but seeing your patch made me reconsider. I think what you've put together is a much more sane behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment