Writer
NAME
CSS::Minifier::Writer ā Document-tree CSS serializer
DESCRIPTION
Serializes a Document tree back into minified CSS. Handles:
Quote normalization (double ā single, with escaped-quote protection)
Color masking (named ā hex, hex shortening, rgb ā hex)
Color naming (hex ā named, when
:color-namesis set)Font-weight normalization (bold ā 700, normal ā 400)
Zero-unit removal (0px ā 0)
URL quote wrapping
Space insertion before
{for at-rules with a prelude
Attributes
$.sepā separator between top-level statements (default '')$.color-masksā enable hex color shortening (default True)$.color-namesā convert hex to named colors (default False)
When both :color-names and :color-masks are enabled, :color-names
takes precedence (colors are named rather than hex-shortened).
Methods
write-document(Document $doc --Str)> ā renders the document tree to a minified CSS string
AUTHOR
Sasha Abbott <[email protected]>
COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under CC0.