Documentation ¶
Index ¶
- Variables
- func BlockCount(tokens *list.List) int
- func Comments(b []byte) []string
- func Identifiers(tokens *list.List) []string
- func Licenses(b []byte) []string
- func Parse(l *list.List) (map[Rule]map[string]string, error)
- func Styles(css map[Rule]map[string]string) []string
- func Tokenize(b []byte) *list.List
- func Unmarshal(b []byte) (map[Rule]map[string]string, error)
- type Rule
- type Style
- type StyleHandler
- type TokenEntry
- type UnitType
- type UnitValue
Constants ¶
This section is empty.
Variables ¶
View Source
var StylesTable = map[string]StyleHandler{
"background": background,
"background-attachment": backgroundAttachment,
"background-color": backgroundColor,
"background-image": backgroundImage,
"background-position": backgroundPosition,
"background-repeat": backgroundRepeat,
"border": border,
"border-bottom": borderBottom,
"border-bottom-color": borderBottomColor,
"border-bottom-style": borderBottomStyle,
"border-bottom-width": borderBottomWidth,
"border-color": borderColor,
"border-left": borderLeft,
"border-left-color": borderLeftColor,
"border-left-style": borderLeftStyle,
"border-left-width": borderLeftWidth,
"border-right": borderRight,
"border-right-color": borderRightColor,
"border-right-style": borderRightStyle,
"border-right-width": borderRightWidth,
"border-style": borderStyle,
"border-top": borderTop,
"border-top-color": borderTopColor,
"border-top-style": borderTopStyle,
"border-top-width": borderTopWidth,
"border-width": borderWidth,
"clear": clear,
"clip": clip,
"color": color,
"cursor": cursor,
"display": display,
"filter": filter,
"font": font,
"font-family": fontFamily,
"font-size": fontSize,
"font-variant": fontVariant,
"font-weight": fontWeight,
"height": height,
"left": left,
"letter-spacing": letterSpacing,
"line-height": lineHeight,
"list-style": listStyle,
"list-style-image": listStyleImage,
"list-style-position": listStylePosition,
"list-style-type": listStyleType,
"margin": margin,
"margin-bottom": marginBottom,
"margin-left": marginLeft,
"margin-right": marginRight,
"margin-top": marginTop,
"overflow": overflow,
"padding": padding,
"padding-bottom": paddingBottom,
"padding-left": paddingLeft,
"padding-right": paddingRight,
"padding-top": paddingTop,
"page-break-after": pageBreakAfter,
"page-break-before": pageBreakBefore,
"position": position,
"float": float,
"text-align": textAlign,
"text-decoration": textDecoration,
"text-decoration: blink": textDecorationBlink,
"text-decoration: line-through": textDecorationLineThrough,
"text-decoration: none": textDecorationNone,
"text-decoration: overline": textDecorationOverline,
"text-decoration: underline": textDecorationUnderline,
"text-indent": textIndent,
"text-transform": textTransform,
"top": top,
"vertical-align": verticalAlign,
"visibility": visibility,
"width": width,
"z-index": zIndex,
}
Common CSS styles. You can overwrite the handlers with your own.
Functions ¶
func BlockCount ¶
BlockCount returns the number code blocks in the css
func Identifiers ¶
Identifiers returns all class, id and element identifiers including duplicants
Types ¶
type Rule ¶
type Rule string
Rule is a string type that represents a CSS rule.
type Style ¶
type Style struct { Value interface{} // contains filtered or unexported fields }
type StyleHandler ¶
StyleHandler is a function that checks the style value for errors and returns a Style
type TokenEntry ¶
type TokenEntry struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.