css

package
v0.0.0-...-76d4100 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithCSSCache

func ContextWithCSSCache(ctx context.Context, c *CSSCache) context.Context

Types

type CSS

type CSS map[string]interface{}

func MergeCSS

func MergeCSS(props ...CSS) CSS

func (CSS) Attrs

func (s CSS) Attrs(ctx context.Context) gox.Attrs

func (CSS) Styles

func (s CSS) Styles() string

type CSSCache

type CSSCache struct {
	Key        string
	Registered map[string]*SerializedStyles
	// contains filtered or unexported fields
}

func CSSCacheFromContext

func CSSCacheFromContext(ctx context.Context) *CSSCache

func NewCSSCache

func NewCSSCache(key string, mount dom.Element) *CSSCache

func (*CSSCache) CSS

func (c *CSSCache) CSS(ctx context.Context, csses ...CSS) string

func (*CSSCache) Mount

func (c *CSSCache) Mount(ctx context.Context, ss *SerializedStyles)

func (*CSSCache) SerializeStyles

func (c *CSSCache) SerializeStyles(ctx context.Context, args ...interface{}) *SerializedStyles

type SerializedStyles

type SerializedStyles struct {
	Name   string
	Styles []byte
}

func (*SerializedStyles) ToCSS

func (s *SerializedStyles) ToCSS(key string) []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳