css
This package provides a CSS parser and scanner in pure Go. It is an
implementation as specified in the W3C's CSS Syntax Module Level 3.
For documentation on how to use this package, please see the godoc.
Project Status
The scanner and parser are fully compliant with the CSS3 specification.
The printer will print nodes generated from the scanner and parser, however,
it is not fully compliant with the CSS3 serialization spec.
Additionally, the printer does not provide an option to collapse whitespace
although that will be added in the future.
This project has 100% test coverage, however, it is still a new project.
Please report any bugs you experience or let me know where the documentation
can be clearer.
Caveats
The CSS scanner in this package only supports UTF-8 encoding. The @charset
directive will be ignored. If you need to scan a different encoding then
please convert it to UTF-8 first using a tool such as iconv.