diff options
Diffstat (limited to 'src/css/stylednode.nim')
-rw-r--r-- | src/css/stylednode.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/css/stylednode.nim b/src/css/stylednode.nim new file mode 100644 index 00000000..d6293187 --- /dev/null +++ b/src/css/stylednode.nim @@ -0,0 +1,18 @@ +import css/values +import html/dom + +# Container to hold a style and a node. +# Pseudo elements are implemented using StyledNode objects without nodes. +type + StyledType* = enum + STYLED_ELEMENT, STYLED_TEXT + + StyledNode* = ref object + case t*: StyledType + of STYLED_ELEMENT: + pseudo*: PseudoElem + computed*: CSSComputedValues + of STYLED_TEXT: + text*: string + node*: Node + children*: seq[StyledNode] |