css

package
v0.13.49 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: BSD-3-Clause, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParentSelector = SelectorString("&")

Functions

func Nest

func Nest(xs ...any) (r *nest)

func Rules

func Rules(r ...*RuleStruct) *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 (me Import) String() string

type RuleStruct

type RuleStruct struct {
	Comment  string
	Selector Selecter
	Styling  Styling

	Parent *RuleStruct
	// contains filtered or unexported fields
}

func Css

func Css(xs ...any) *RuleStruct

func Rule

func Rule(xs ...any) (r *RuleStruct)

func (*RuleStruct) Child

func (me *RuleStruct) Child(sel Selecter, xs ...any) (i *RuleStruct)

func (*RuleStruct) Compose

func (me *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 (me *RuleStruct) Copy() (newrule *RuleStruct)

returns a copy

func (*RuleStruct) Descendant

func (me *RuleStruct) Descendant(sel Selecter, xs ...any) (i *RuleStruct)

func (*RuleStruct) DirectFollows

func (me *RuleStruct) DirectFollows(sel Selecter, xs ...any) (i *RuleStruct)

func (*RuleStruct) Each

func (me *RuleStruct) Each(sel Selecter, xs ...any) (i *RuleStruct)

func (*RuleStruct) Embed

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

returns a copy that is embedded in the selector

func (*RuleStruct) Follows

func (me *RuleStruct) Follows(sel Selecter, xs ...any) (i *RuleStruct)

func (*RuleStruct) ForEach

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

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

func (*RuleStruct) Nest

func (me *RuleStruct) Nest(xs ...any) (i *RuleStruct)

func (*RuleStruct) String

func (me *RuleStruct) String() string

func (*RuleStruct) Style

func (me *RuleStruct) Style(kvpairs ...string) *RuleStruct

adds given styles

func (*RuleStruct) WithComment added in v0.13.44

func (me *RuleStruct) WithComment(comment string) *RuleStruct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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