Documentation ¶
Index ¶
- func EmbedDeclaration(fsys fs.FS, decl *css.Declaration) error
- func EmbedFont(fsys fs.FS, decl *css.Declaration) error
- func ParseFontSrc(tokens []Token) (map[string]string, error)
- func ParseWriteSheet(fsys fs.FS, f string, o io.Writer) error
- func StringRule(fsys fs.FS, out io.Writer, rule *css.Rule) error
- type Token
- type TokenType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmbedDeclaration ¶
func EmbedDeclaration(fsys fs.FS, decl *css.Declaration) error
func EmbedFont ¶
func EmbedFont(fsys fs.FS, decl *css.Declaration) error
EmbedFont parses a @font-face src and embeds the woff font variant, preserving links to the other variants. It will always make the woff embed the first item in the list of fonts so that browsers that pick the first match will use that one.
func ParseFontSrc ¶
ParseFontSrc takes a list of Token tokens and parses them into a map indexed by the font format.
Types ¶
Click to show internal directories.
Click to hide internal directories.