def document.styled

gralha-svg-render@0.1.0.1 · svg.bend:3935

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-xml-doc@0.1.0.1/xml.bend as XML
import gralha-css-style@0.1.0.1/css.bend as CSS

3935# Without a stylesheet the CSS pass would only merge style attributes, which
3936# CSS.properties does on demand, so the tree is used as parsed.
3937def document.styled(has: Bool, +kids: List<&2, XML.Element>, +w: F32, +h: F32) -> List<&2, XML.Element>:
3938  match has:
3939    case True{}: CSS.css.tree(kids, CSS.css.rules(CSS.css.sheets(kids, w, h), w, h), Nil{}, Nil{}, 1, CSS.css.element.count(kids))
3940    case False{}: kids

Uses (8)

Used by (2)