Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatFontFamilyValue ¶
FormatFontFamilyValue formats a font family value for CSS. Returns the formatted value or an error if formatting fails.
func FormatTokenValueForCSS ¶
FormatTokenValueForCSS formats a token value for safe insertion into CSS. Returns the formatted value and an error if formatting/validation fails. Returns ("", error) for unsupported token types, invalid values or parse failures (caller should warn). Returns (value, nil) for successfully formatted values.
func IsCSSValueSemanticallyEquivalent ¶
IsCSSValueSemanticallyEquivalent checks if two CSS values are semantically equivalent. It normalizes values by removing all whitespace and converting to lowercase before comparison.
This is useful for comparing CSS values that may have different formatting but represent the same value, such as:
- "rgb(255, 0, 0)" vs "rgb(255,0,0)"
- "#FF0000" vs "#ff0000"
- "1.5rem" vs "1.5REM"
Returns true if the values are equivalent after normalization.
Types ¶
This section is empty.