Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Declaration ¶
Declaration represents a parsed style property
func NewDeclaration ¶
func NewDeclaration() *Declaration
NewDeclaration instanciates a new Declaration
func (*Declaration) Equal ¶
func (decl *Declaration) Equal(other *Declaration) bool
Equal returns true if both Declarations are equals
func (*Declaration) String ¶
func (decl *Declaration) String() string
Returns string representation of the Declaration
func (*Declaration) StringWithImportant ¶
func (decl *Declaration) StringWithImportant(option bool) string
StringWithImportant returns string representation with optional !important part
type DeclarationsByProperty ¶
type DeclarationsByProperty []*Declaration
DeclarationsByProperty represents sortable style declarations
func (DeclarationsByProperty) Len ¶
func (declarations DeclarationsByProperty) Len() int
Implements sort.Interface
func (DeclarationsByProperty) Less ¶
func (declarations DeclarationsByProperty) Less(i, j int) bool
Implements sort.Interface
func (DeclarationsByProperty) Swap ¶
func (declarations DeclarationsByProperty) Swap(i, j int)
Implements sort.Interface
type Rule ¶
type Rule struct { Kind RuleKind // At Rule name (eg: "@media") Name string // Raw prelude Prelude string // Qualified Rule selectors parsed from prelude Selectors []string // Style properties Declarations []*Declaration // At Rule embedded rules Rules []*Rule // Current rule embedding level EmbedLevel int }
Rule represents a parsed CSS rule
func (*Rule) EmbedsRules ¶
EmbedsRules returns true if this rule embeds another rules
type Stylesheet ¶
type Stylesheet struct {
Rules []*Rule
}
Stylesheet represents a parsed stylesheet
func (*Stylesheet) String ¶
func (sheet *Stylesheet) String() string
Returns string representation of the Stylesheet
Click to show internal directories.
Click to hide internal directories.