css

package
v0.0.0-...-81a139b Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParentSelector = SelectorString("&")

Functions

func Nest

func Nest(xs ...interface{}) (r *nest)

func Rules

func Rules() *rules

func Super

func Super(sel ...Selecter) Selecter

Types

type CssStringer

type CssStringer interface {
	Css() string
}

type Import

type Import string

func (Import) String

func (xyyy Import) String() string

type RuleStruct

type RuleStruct struct {
	Comment  string
	Selector Selecter
	Styles   []Styler

	Parent *RuleStruct
	// contains filtered or unexported fields
}

func Css

func Css(xs ...interface{}) *RuleStruct

func Rule

func Rule(xs ...interface{}) (r *RuleStruct, err error)

func (*RuleStruct) Child

func (xyyy *RuleStruct) Child(sel Selecter, xs ...interface{}) (i *RuleStruct, err error)

func (*RuleStruct) Compose

func (xyyy *RuleStruct) Compose(parents ...*RuleStruct) (newrule *RuleStruct)

returns a copy that is a composition of this rule with the styles of other rules

func (*RuleStruct) Copy

func (xyyy *RuleStruct) Copy() (newrule *RuleStruct)

returns a copy

func (*RuleStruct) Descendant

func (xyyy *RuleStruct) Descendant(sel Selecter, xs ...interface{}) (i *RuleStruct, err error)

func (*RuleStruct) DirectFollows

func (xyyy *RuleStruct) DirectFollows(sel Selecter, xs ...interface{}) (i *RuleStruct, err error)

func (*RuleStruct) Each

func (xyyy *RuleStruct) Each(sel Selecter, xs ...interface{}) (i *RuleStruct, err error)

func (*RuleStruct) Embed

func (xyyy *RuleStruct) Embed(selector Selecter) (newrule *RuleStruct)

returns a copy that is embedded in the selector

func (*RuleStruct) Follows

func (xyyy *RuleStruct) Follows(sel Selecter, xs ...interface{}) (i *RuleStruct, err error)

func (*RuleStruct) ForEach

func (xyyy *RuleStruct) ForEach(c SelecterAdder, sel ...Selecter) (*RuleStruct, error)

for each selector, my selectors is prefixed and my rules are applied

func (*RuleStruct) Nest

func (xyyy *RuleStruct) Nest(xs ...interface{}) (i *RuleStruct, err error)

func (*RuleStruct) String

func (xyyy *RuleStruct) String() string

func (*RuleStruct) Style

func (xyyy *RuleStruct) Style(styles ...Style) *RuleStruct

adds given styles

type Styler

type Styler interface {
	Style() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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