Svg.style.number.present: def of gralha-svg-render@0.1.0.1 Import: import gralha-svg-render@0.1.0.1/svg.bend as Svg Lines 1077-1086 of gralha-svg-render@0.1.0.1/svg.bend: https://jend.leeeet.dev/read.txt?path=gralha-svg-render@0.1.0.1/svg.bend&start_line=1077&end_line=1086 import Base import gralha-text-scan@0.1.0.1/scan.bend as U # A numeric inherited property: the parent's number stays a number when the # attribute is absent instead of being printed and parsed again. def style.number.present(found: Maybe<&2, String>, +parent: F32, +initial: F32, parse: String -> F32) -> F32: match found: case None{}: parent case Some{v}: +vv = v +k = style.keyword(vv) U.choose(F32, U32.is_eq(k, 1) || U32.is_eq(k, 3), parent, U.choose(F32, U32.is_eq(k, 2), initial, parse(vv))) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=style.keyword https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose