Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule struct {
// contains filtered or unexported fields
}
Rule defines the a single css rule which will be transformed and converted into a usable stylesheet during rendering.
func New ¶
New returns a new instance of a Rule which provides capability to parse and extrapolate the giving content using the provided binding. - Arguments:
- rules : text containing css values.
- extension: A instance of a Rule, that may contain certain styles which can be extended into current rule styles using the `extend` template function.
- rules: A slice of rules which should be built with this, they will also inherit this rules parents, a nice way to extend a rule sets property.
func Plain ¶
Plain returns a new instance of a Rule which uses the raw rule string instead of parsing with a template has the source of the stylesheet to be parsed. No processing will be done on it.
func (*Rule) Stylesheet ¶
func (r *Rule) Stylesheet(bind interface{}, parentNode string) (*bcss.Stylesheet, error)
Stylesheet returns the provided styles using the binding as the argument for the provided css template.
func (*Rule) UseExtension ¶
UseExtension sets the css.Rule to be used for extensions and returns the rule.