CSSOM is a CSS parser and partial implementation of the CSS Object Model. It provides an interface for representing stylesheet content as objects, allowing applications to inspect CSS rules and declarations programmatically.
The CSS Object Model defines interfaces through which software can access and manipulate stylesheet structures. CSSOM implements a subset of this functionality outside a browser environment.
Applications can supply stylesheet text and obtain a structured representation that can be examined or modified through the available object interfaces. This enables developers to work with stylesheet rules as objects rather than treating the entire document as unstructured text.
CSSOM can also generate CSS strings from its internal representation, allowing manipulated stylesheet structures to be converted back into text. Its object-oriented approach makes it suitable for applications that need to examine or modify CSS rules without implementing a complete browser engine.
The library has some important behavioural differences from more general-purpose CSS parsers. In particular, its treatment of repeated property declarations can discard earlier values, making it unsuitable for some CSS rewriting and minification workflows that must preserve fallbacks.
This is free and open source software.
Key Features
- Parses stylesheet text into CSS Object Model structures.
- Provides programmatic access to CSS rules and declarations.
- Implements a subset of CSS Object Model interfaces.
- Supports inspecting stylesheet rules through object properties.
- Allows selected stylesheet structures to be modified.
- Provides CSS declaration manipulation functionality.
- Supports generating stylesheet text from object representations.
- Can be embedded in applications requiring DOM-style CSS access.
Website: github.com/NV/CSSOM
Support:
Developer: Nikita Vasilyev
License: MIT License
CSSOM is written in JavaScript. Learn JavaScript with our recommended free books and free tutorials.
Related Software
| CSS Parsers | |
|---|---|
| PostCSS | Transform styles with JavaScript plugins |
| Lightning CSS | Parser, transformer, bundler, and minifier |
| Rework | Plugin framework for CSS preprocessing |
| PHP CSS Parser | PHP library for reading CSS |
| Mensch | Non-validating CSS parser |
| CSSTree | Tool set for CSS |
| Stylis | Lightweight CSS preprocessor |
| tinycss2 | CSS parser and generator |
| Parse | Go library offering lexers, parsers, and parsing utilities |
| LibCSS | CSS parser and selection engine |
| Ruby CSS Parser | Load, parse and cascade CSS rule sets |
| ParserLib | CSS3 SAX-inspired parser |
| css-parser | Fork of the cssutils project |
| ph-css | Parse, represent, modify, and write CSS stylesheets |
| Stylecow | Modern CSS to all browsers |
| Gonzales PE | CSS parser which plays nicely with preprocessors |
| CSSOM | CSS parser written in pure JavaScript |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.