Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 477 Bytes

README.md

File metadata and controls

19 lines (16 loc) · 477 Bytes

css_parser

CSS Lexer & Parser implementation for Deno

Usage

Parse CSS to AST -

import { parse } from "https://deno.land/x/[email protected]/mod.ts";

let ast = parse("/* comment */ p { color: black; }", {/* OPTIONS */})
// {
//   type: "stylesheet",
//   stylesheet: {
//     rules: [
//       { type: "comment", text: " comment ", position: [Object] },
//       { type: "rule", selectors: [Array], declarations: [Array], position: [Object] }
//     ]
// }