heyvito/minicss: Ruby CSS parsing library
18-Oct-2025 600
MiniCSS is a Ruby implementation of the CSS Syntax Level 3 tokenizer, parser, serializer, and selector toolkit. It provides fast, dependency-free primitives for building linters, minifiers, and other CSS-aware tooling.
Features
C tokenizer and parser for Ruby 3.4+.
Battle-tested against the JSON-based css-parsing-tests suite for standards-compliant parsing.
High-level AST wrappers (MiniCSS::AST::Rule, Decl, AtRule, Function, Number, and more) ready for programmatic inspection.
Bidirectional selector helpers (MiniCSS::Sel) for tokenizing, walking, computing specificity, and turning selector ASTs back into strings.
Serializer that converts AST nodes back into normalized CSS, enabling round-tripping and rewrites.
Accepts either strings or IO objects, with optional Unicode range tokenization via allow_unicode_ranges.
heyvito/minicss: Ruby CSS parsing library #ruby #rubydeveloper #rubyonrails #heyvito/minicss: #parsing #library #css #library https://rubyonrails.ba/link/heyvito-minicss-ruby-css-parsing-library