jotform / css.js

A lightweight, battle tested, fast, CSS parser in JavaScript
https://medium.com/jotform-form-builder/writing-a-css-parser-in-javascript-3ecaa1719a43
MIT License
426 stars 63 forks source link

Does css.js care about specificity? #13

Closed corysimmons closed 8 years ago

corysimmons commented 8 years ago

https://github.com/closingtag/calc-polyfill#specificity

If not, what are the chances of getting it integrated? Is there a technical limitation?

kemaldaggen commented 8 years ago

Hi corrysimmons, no css.js do not have any means to identify specificity of parsed css rules. All css.js does that it takes a CSS string as input and returns a data structure, representing the CSS string. So that you can easily traverse it, modify it and compile back to CSS string.

Can I ask what do you have in your mind as use case for having CSS specificity in a CSS parser?

Thanks.

corysimmons commented 8 years ago

That link I posted is exactly what I have in mind.

It's not a big deal though. Thank you. =)