CSSOM
CSSOM copied to clipboard
Unmaintained! ⚠️ CSS Object Model implemented in pure JavaScript. Also, a CSS parser.
None of [CSSValue interfaces](http://dev.w3.org/csswg/cssom/#css-values) are implemented yet. #8 depends on it.
``` @namespace "http://www.w3.org/1999/xhtml"; @namespace svg "http://www.w3.org/2000/svg"; ``` http://www.w3.org/TR/css3-namespace/ http://dev.w3.org/csswg/cssom/#css-namespace-rule
``` @page { margin-left: 3cm; } @page :left { margin-left: 4cm; } ``` http://www.w3.org/TR/CSS2/page.html http://dev.w3.org/csswg/cssom/#css-page-rule WebKit implementation: [CSSPageRule.cpp](http://trac.webkit.org/browser/trunk/WebCore/css/CSSPageRule.cpp#preview).
https://github.com/NV/CSSOM/blob/a469aae2f92e454e669aec821781626924f98d17/lib/parse.js#L333-L358 This fails for import rules for fonts which have multiple font weights. Example :- @import url(https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400&display=swap); I get the error:- ")" not found. I am guessing it's due to...
Hello, Can you please add a [Security Policy](https://github.com/NV/CSSOM/security/policy) and describe what sort of vulnerabilities you consider valid for this library? I have found a few issues that could be pertinent...
`cssom` fails to parse the following CSS, with message `Unmatched ' (line 1, char 10)`: ```css .font-\[\'Open_Sans\'\] { font-family: "Open Sans"; } ``` Tested on `0.5.0` (and `0.4.4`).