css

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(root Block, w io.Writer) error

func RenderCSS

func RenderCSS(c Block, w io.Writer, ctx *renderCtx) error

func RenderMinified

func RenderMinified(root Block, w io.Writer) error

func RenderMinifiedString

func RenderMinifiedString(root Block) (string, error)

func RenderString

func RenderString(root Block) (string, error)

Types

type Block

type Block interface {
	RenderCSS() Block
}

type Blocks

type Blocks []Block

func (*Blocks) Add

func (b *Blocks) Add(block Block)

func (*Blocks) AddBlocks

func (b *Blocks) AddBlocks(blocks Blocks)

func (Blocks) RenderCSS

func (Blocks) RenderCSS() Block

type Line

type Line struct {
	Key   string
	Value string
}

func L

func L(key, val string) Line

type Rule

type Rule struct {
	Sel   string
	Decls []Line
}

func New

func New(sel string, lines ...Line) Rule

func (Rule) RenderCSS

func (Rule) RenderCSS() Block

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL