Open andreinitescu opened 8 years ago
Hey @andreinitescu, thanks for the input. We thought about it too. But finally decided with a custom CSS parser. Besides the obvious server side css parsing benefits, here are our reasons for not to use CSSOM:
But you are right, if we have programmatic direct access to browser's internal css parser, that would be way better.
Thank you Kemal. I'm mostly worried about first one, compatibility across browsers. Do you have any more info regarding that, any quick example which comes to your mind?
In order to parse CSS by CSSOM using a <style>
element , I see the CSSOM objects and properties required are LinkStyle.sheet, CSSStyleSheet.cssRules, CSSStyleRule.style, CSSStyleDeclaration, which all seem from DOM Level 2 specification.
But maybe I'm missing something.
For client side, any specific reason not to just use CSSOM? http://jsfiddle.net/v2JsZ/