Documentation
¶
Overview ¶
Package themeaccess is what the module's own commands may do with the theme package that a host may not: write a theme's stylesheet and print text from a theme file safely. The theme package is public, so it exports neither; it registers the stylesheet generators here when it is loaded, and the pages' servers and the approve page's build call them through this package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CSS ¶
CSS is the stylesheet of the checked themes (see theme.css in the theme package). T is *theme.Theme; any other type panics.
func CSSDefault ¶
CSSDefault is CSS with def, the theme a reader starts in, as the :root block. A def that names no theme in themes panics.
func CSSLocked ¶
CSSLocked is CSS for a page locked to the theme named lock: it has that theme only, no switch, and the system's contrast and forced-colors requests still win. A lock that names no theme in themes panics.
func Escape ¶
Escape returns s with every rune that is not printable (a control character, an escape, a newline, a byte that is not UTF-8) written as a Go escape, so text from a hostile file is safe to print and cannot start a line of its own.
Types ¶
This section is empty.