css-parser
v0.0.6
Published
CSS Object Model implementation and CSS parser
Downloads
653
Readme
Fork from cssom
新增功能点:
- 支持重复定义属性
- 修复CSS格式化的问题
CSSOM
CSSOM.js is a CSS parser written in pure JavaScript. It also a partial implementation of CSS Object Model.
CSSOM.parse("body {color: black}")
-> {
cssRules: [
{
selectorText: "body",
style: {
0: "color",
color: "black",
length: 1
}
}
]
}
Parser demo
To use it with Node.js or any other CommonJS loader:
➤ npm install css-parser