Versions in this module Expand all Collapse all v0 v0.1.1 Jul 27, 2026 v0.1.0 Jun 8, 2026 Changes in this version + const DefaultMaxBytes + const DiagUndefinedVar + func Sanitize(css string) (string, error) + type AtRule struct + func (a AtRule) CSSPretty() string + type Builder struct + func New() *Builder + func (b *Builder) Build() *Sheet + func (b *Builder) FontFace(ff FontFaceDecl) *Builder + func (b *Builder) Keyframes(name string, fn func(*KeyframesBuilder)) *Builder + func (b *Builder) Layer(name string, fn func(*Builder)) *Builder + func (b *Builder) Media(query string, fn func(*Builder)) *Builder + func (b *Builder) Rule(selector string) *RuleBuilder + func (b *Builder) Supports(condition string, fn func(*Builder)) *Builder + func (b *Builder) Var(name, value string) *Builder + type Declaration struct + Property string + Value Value + func Decl(property string, value Value) Declaration + func (d Declaration) CSS() string + func (d Declaration) Important() Declaration + type Diagnostic struct + Code string + Kind DiagnosticKind + Message string + Subject string + type DiagnosticKind int + const DiagnosticError + const DiagnosticHint + const DiagnosticWarning + func (k DiagnosticKind) String() string + type FontFace struct + func (f FontFace) CSSPretty() string + type FontFaceDecl struct + Display string + Family string + Src string + Style string + UnicodeRange string + Weight string + type KeyframesBuilder struct + func (k *KeyframesBuilder) At(offset string, decls ...Declaration) *KeyframesBuilder + type RenderOptions struct + MaxBytes int64 + Minify bool + Pretty bool + type Rule struct + Decls []Declaration + Selector Selector + func (r Rule) CSSPretty() string + type RuleBuilder struct + func (r *RuleBuilder) Decl(property string, value Value) *RuleBuilder + func (r *RuleBuilder) Done() *Builder + func (r *RuleBuilder) ImportantDecl(property string, value Value) *RuleBuilder + type Selector struct + func MustSelector(s string) Selector + func NewSelector(s string) (Selector, error) + func (s Selector) String() string + type Sheet struct + func NewSheet() *Sheet + func Parse(src string) (*Sheet, error) + func (s *Sheet) AddFontFace(ff FontFaceDecl) *Sheet + func (s *Sheet) AddRule(r Rule) + func (s *Sheet) Diagnostics() []Diagnostic + func (s *Sheet) Keyframes(name string, fn func(*KeyframesBuilder)) *Sheet + func (s *Sheet) Layer(name string, fn func(*Sheet)) *Sheet + func (s *Sheet) Media(query string, fn func(*Sheet)) *Sheet + func (s *Sheet) Merge(other *Sheet) *Sheet + func (s *Sheet) RegisteredVars() []string + func (s *Sheet) Render(opts RenderOptions) (string, error) + func (s *Sheet) RenderPretty() string + func (s *Sheet) Supports(condition string, fn func(*Sheet)) *Sheet + func (s *Sheet) UndefinedVars() []string + func (s *Sheet) Var(name, value string) *Sheet + type Value interface + CSS func() string + func Literal(s string) Value + func VarRef(name, fallback string) Value