Skip to content

Support CSS specificity #7

Closed
Closed
@ju1ius

Description

@ju1ius

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions