Documentation
¶
Index ¶
Constants ¶
View Source
const (
IDENT_SPACES = 2
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Declaration ¶
A parsed style property
func (*Declaration) Equal ¶
func (decl *Declaration) Equal(other *Declaration) bool
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
Returns string representation with optional !important part
type DeclarationsByProperty ¶
type DeclarationsByProperty []*Declaration
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
}
A parsed CSS rule
func (*Rule) EmbedsRules ¶
Returns true if this rule embeds another rules
type Stylesheet ¶
type Stylesheet struct {
Rules []*Rule
}
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.