package css
import "github.com/gohugoio/hugo/tpl/css"
Index ¶
- type Namespace
- func (ns *Namespace) Build(args ...any) (resource.Resource, error)
- func (ns *Namespace) ChromaStyles(opts any) (resource.Resource, error)
- func (ns *Namespace) PostCSS(args ...any) (resource.Resource, error)
- func (ns *Namespace) Quoted(v any) css.QuotedString
- func (ns *Namespace) Sass(args ...any) (resource.Resource, error)
- func (ns *Namespace) TailwindCSS(args ...any) (resource.Resource, error)
- func (ns *Namespace) Unquoted(v any) css.UnquotedString
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace provides template functions for the "css" namespace.
func (*Namespace) Build ¶
Build processes the given CSS Resource with ESBuild. Note that this method is identical to the one in the js Namespace.
func (*Namespace) ChromaStyles ¶
ChromaStyles generates a CSS stylesheet for the Chroma code highlighter and returns it as a Resource. This stylesheet is needed if markup.highlight.noClasses is disabled in config. The style defaults to the markup.highlight.style config setting.
func (*Namespace) PostCSS ¶
PostCSS processes the given Resource with PostCSS.
func (*Namespace) Quoted ¶
Quoted returns a string that needs to be quoted in CSS.
func (*Namespace) Sass ¶
Sass processes the given Resource with SASS.
func (*Namespace) TailwindCSS ¶
TailwindCSS processes the given Resource with tailwindcss.
func (*Namespace) Unquoted ¶
Unquoted returns a string that does not need to be quoted in CSS.
Source Files ¶
- Version
- v0.165.0 (latest)
- Published
- Aug 12, 2026
- Platform
- linux/amd64
- Imports
- 26 packages
- Last checked
- 3 hours ago –
Tools for package owners.