def keyword.blank

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

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

1033# A property from an element's attributes: absent means the inherited value
1034# (or the initial one for non-inherited properties) with no string work at
1035# all; present, the CSS-wide keywords are honoured.
1036# The CSS-wide keywords of a value: 1 inherit, 2 initial, 3 unset, 0 none.
1037# Decided from the first letter on, case-insensitively, with blanks around
1038# allowed, without lowercasing or trimming a copy of every value.
1039def keyword.blank(s: String) -> Bool:
1040  match s:
1041    case SNil{}: True{}
1042    case SCon{Chr{c}, t}: U.space(c) && keyword.blank(t)

Uses (5)

Used by (1)