Closed psema4 closed 13 years ago
... selectors separated by commas aren't treated as individual rules by cssom.
It has been done by design. Browsers do exact same thing.
You have to parse selectors on your own. I believe, simple split(',') would work in most cases.
Fair enough - split's they way I've gone. Thanks @NV
I'm looking to use cssom alongside jsdom to validate (and expunge unused) css rules.
Cssom has saved me quite a bit of time but It seems like selectors separated by commas aren't treated as individual rules by cssom.
In my app the logic looks like:
The following is a log excerpt showing selectors read from the css file:
The rules above (with the last two showing commas) are from the jQuery UI CSS Framework: