package rules
import "kaiju/engine/ui/markup/css/rules"
Constants
ReadingTag
iota
ReadingId
ReadingClass
ReadingChild
ReadingSibling
ReadingAdjacent
ReadingPseudo
ReadingPseudoFunction
ReadingProperty
ReadingPropertyValue
ReadingPropertyFunction
Types
PropertyValue
struct
type PropertyValue struct {
Str string
Args []string
}
PropertyValue.Clone
func (p *PropertyValue) Clone() PropertyValue
PropertyValue.IsFunction
func (p PropertyValue) IsFunction() bool
Rule
struct
type Rule struct {
Property string
Values []PropertyValue
Invocation RuleInvoke
}
Rule.Clone
func (r *Rule) Clone() Rule
RuleInvoke
int
const (
RuleInvokeImmediate RuleInvoke = iota
RuleInvokeHover
)
RuleState
int
Selector
struct
type Selector struct {
Parts []SelectorPart
}
SelectorGroup
struct
type SelectorGroup struct {
Selectors []Selector
Rules []Rule
}
SelectorGroup.AddRule
func (s *SelectorGroup) AddRule(r Rule)
SelectorPart
struct
type SelectorPart struct {
Name string
Args []string
SelectType RuleState
}
StyleSheet
struct
type StyleSheet struct {
Groups []SelectorGroup
CustomVars map[string][]string
// Has unexported fields.
}
NewStyleSheet
func NewStyleSheet() StyleSheet
StyleSheet.Parse
func (s *StyleSheet) Parse(cssStr string)
StyleSheet.ParseInline
func (s *StyleSheet) ParseInline(cssStr string) *SelectorGroup