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.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle