Versions in this module Expand all Collapse all v0 v0.2.0 Jun 11, 2026 v0.1.0 Jun 10, 2026 Changes in this version + func ApplyTextTransform(text, transform string) string + func ExpandShorthands(decls map[string]string) map[string]string + func ParseCSSURL(value string) (string, bool) + func ParseLength(value string, parentFontSize float64) float64 + func ParseLengthCtx(value string, parentFontSize, contextWidthMM float64) float64 + func ParsePercentage(val string) (float64, bool) + func ResolveVars(value string, scope map[string]string) string + func Specificity(a, b, c, d int) int + type ComputedStyle struct + AlignItems string + AlignSelf string + BackgroundColor *RGBColor + BackgroundGradient *Gradient + BackgroundImageURL string + BackgroundPosition string + BackgroundRepeat string + BackgroundSize string + BorderBottomColor *RGBColor + BorderBottomStyle string + BorderBottomWidth float64 + BorderLeftColor *RGBColor + BorderLeftStyle string + BorderLeftWidth float64 + BorderRadius float64 + BorderRadiusBottomLeft float64 + BorderRadiusBottomRight float64 + BorderRadiusTopLeft float64 + BorderRadiusTopRight float64 + BorderRightColor *RGBColor + BorderRightStyle string + BorderRightWidth float64 + BorderTopColor *RGBColor + BorderTopStyle string + BorderTopWidth float64 + BoxShadow []Shadow + BreakInside string + Color *RGBColor + ColumnGap float64 + Content string + CounterIncrement string + CounterReset string + Display string + FlexBasis float64 + FlexBasisAuto bool + FlexBasisPct float64 + FlexDirection string + FlexGrow float64 + FlexShrink float64 + FlexWrap string + FontFamily string + FontSize float64 + FontStyle string + FontWeight string + Height float64 + JustifyContent string + LetterSpacing float64 + LineHeight float64 + ListStyleType string + MarginBottom float64 + MarginLeft float64 + MarginRight float64 + MarginTop float64 + MaxHeight float64 + MaxWidth float64 + MinHeight float64 + MinWidth float64 + ObjectFit string + ObjectPosition string + Opacity float64 + Order int + OutlineColor *RGBColor + OutlineOffset float64 + OutlineStyle string + OutlineWidth float64 + PaddingBottom float64 + PaddingLeft float64 + PaddingRight float64 + PaddingTop float64 + PageBreakAfter string + PageBreakBefore string + Quotes string + RowGap float64 + TextAlign string + TextDecoration string + TextIndent float64 + TextShadow *Shadow + TextShadows []Shadow + TextTransform string + Vars map[string]string + VerticalAlign string + Visibility string + WhiteSpace string + Width float64 + func NewComputedStyle() *ComputedStyle + func (s *ComputedStyle) Apply(prop, val string, parent *ComputedStyle) + func (s *ComputedStyle) ApplyCtx(prop, val string, parent *ComputedStyle, ctxWidth float64) + func (s *ComputedStyle) SetUnsupportedHandler(fn func(prop, val string)) + type ConicGradient struct + CX float64 + CY float64 + FromDeg float64 + Stops []GradientStop + func ParseConicGradient(s string) (*ConicGradient, error) + type Gradient struct + Conic *ConicGradient + Kind GradientKind + Linear *LinearGradient + Radial *RadialGradient + type GradientKind int + const GradientConic + const GradientLinear + const GradientRadial + type GradientStop struct + Color RGBColor + Position float64 + type LinearGradient struct + AngleDeg float64 + Stops []GradientStop + func ParseLinearGradient(s string) (*LinearGradient, error) + type RGBColor struct + A float64 + B int + G int + R int + func NewRGBColor(r, g, b int) RGBColor + func ParseColor(val string) *RGBColor + type RadialGradient struct + CX float64 + CY float64 + Circle bool + Stops []GradientStop + func ParseRadialGradient(s string) (*RadialGradient, error) + type Shadow struct + BlurRadius float64 + Color *RGBColor + Inset bool + OffsetX float64 + OffsetY float64 + Spread float64 + func ParseFilterDropShadow(val string) ([]Shadow, error) + func ParseShadow(val string) ([]Shadow, error)