# attr_border.ludic - border widths, all sides or one # every side's border the same width function el_sides_border(n: UiNode, w: float) -> void { n.border = w n.bt = w n.br = w n.bb = w n.bl = w } # border-bottom: 3px solid var(--accent) - one side's width, and the colour for the border function el_border_side(ui_st: mut UiState, n: UiNode, key: string, s: string) -> void { let keep_t = n.bt let keep_r = n.br let keep_b = n.bb let keep_l = n.bl el_border(ui_st, n, s) let w = n.bt n.bt = keep_t n.br = keep_r n.bb = keep_b n.bl = keep_l if key == "border-top" { n.bt = w } if key == "border-right" { n.br = w } if key == "border-bottom" { n.bb = w } if key == "border-left" { n.bl = w } }