Documentation ¶
Overview ¶
Package styledtree is a straightforward default implementation of a styled document tree.
Overview ¶
This is an implementation of style.TreeNode and of cssom.StyledNode. Using a builder type, cssom.Style() will create a styled tree from an HTML parse tree and a CSSOM.
___________________________________________________________________________
License ¶
Governed by a 3-Clause BSD license. License file may be found in the root folder of this module.
Copyright © 2017–2022 Norbert Pillmayer <norbert@pillmayer.com>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StyNode ¶
type StyNode struct { tree.Node[*StyNode] // we build on top of general purpose tree // contains filtered or unexported fields }
StyNode is a style node, the building block of the styled tree.
func (*StyNode) GetPropertyValue ¶
GetPropertyValue returns the property value for a given key. If the property is inherited, it may cascade. func (pmap *style.PropertyMap) GetPropertyValue(key string, node *tree.Node[*styledtree.StyNode]) style.Property {
func (*StyNode) SetStyles ¶
func (sn *StyNode) SetStyles(styles *style.PropertyMap)
SetStyles sets the styling properties of a styled node.
func (*StyNode) Styles ¶
func (sn *StyNode) Styles() *style.PropertyMap
Styles is part of interface style.Styler.