Documentation
¶
Overview ¶
Package cssutil provides utilities for working with CSS classes in HTML documents, including support for generating Tailwind CSS safelist configurations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseHTMLClasses ¶
ParseHTMLClasses parses one or more HTML documents and returns a sorted, deduplicated slice of all CSS class names referenced in class attributes across all documents.
func ParseHTMLClassesFS ¶
ParseHTMLClassesFS opens each name from fsys and calls ParseHTMLClasses with all of the resulting readers.
func TailwindSourceInline ¶
TailwindSourceInline returns a Tailwind CSS v4 @source inline directive containing the provided class names. The directive instructs Tailwind to generate CSS for all listed classes regardless of whether they appear in scanned source files. Class names that contain '"' or ')' are silently dropped, as they could break out of the inline("...") directive and allow CSS injection.
Types ¶
This section is empty.