Css.css.cascade: def of gralha-css-style@0.1.0.1 Import: import gralha-css-style@0.1.0.1/css.bend as Css Lines 415-422 of gralha-css-style@0.1.0.1/css.bend: https://jend.leeeet.dev/read.txt?path=gralha-css-style@0.1.0.1/css.bend&start_line=415&end_line=422 import Base import gralha-text-scan@0.1.0.1/scan.bend as U import gralha-xml-doc@0.1.0.1/xml.bend as XML def css.cascade(ds: List<&2, XML.Attr>, +score: U32, +choices: List<&2, CSSChoice>) -> List<&2, CSSChoice>: match ds: case Nil{}: choices case Con{XML.Attr{k, v}, rest}: +value = v +key = k css.cascade(rest, score, U.branch(List<&2, CSSChoice>, U.string.equal(key, "") || U.string.equal(value, ""), _ => choices, _ => css.insert(css.choice.scan(key, css.scan(value, 33), score), choices))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=CSSChoice https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.choice.scan https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.insert https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.scan https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=string.equal https://jend.leeeet.dev/definition.txt?path=gralha-xml-doc@0.1.0.1/xml.bend&name=Attr