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
Support CSS specificity #7
Comments
here is a working code for computing specificity. It supports everything but the negation pseudo-class:
|
sabberworm
added a commit
that referenced
this issue
Aug 26, 2011
I’m closing this as I dont’t think there will ever be a merge method. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The support for specificity would allow CSSParser to merge RuleSets according to CSS cascading rules (http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order).
But I think it would need a bit of redesign.
The statement
#myid .someclass, foo.bar { mydeclaration: myvalue}
should be parsed as two CSSSelector objects having the same rules but a different specificity.
I invite you to have a look to http://github.com/alexdunae/css_parser, and in particular to https://github.com/alexdunae/css_parser/blob/master/lib/css_parser.rb for the css specificity thing.
The text was updated successfully, but these errors were encountered: