From a125464839927fd04f761c530e90888e340758ef Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 18 Dec 2021 13:49:52 +0100 Subject: Rework cascading algorithm --- src/html/dom.nim | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/html/dom.nim') diff --git a/src/html/dom.nim b/src/html/dom.nim index 3de1847c..02258296 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -65,9 +65,8 @@ type id*: string classList*: seq[string] attributes*: Table[string, string] - cssvalues*: CSSComputedValues - cssvalues_before*: CSSComputedValues - cssvalues_after*: CSSComputedValues + css*: CSSSpecifiedValues + pseudo*: array[low(PseudoElem)..high(PseudoElem), CSSSpecifiedValues] hover*: bool cssapplied*: bool rendered*: bool @@ -281,7 +280,7 @@ func newHtmlElement*(tagType: TagType): HTMLElement = result.nodeType = ELEMENT_NODE result.tagType = tagType - result.cssvalues.rootProperties() + result.css = rootProperties() func newDocument*(): Document = new(result) -- cgit 1.4.1-2-gfad0