feat(ui): min(), max() and clamp(); insets as percentages of the containing block
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
355201f094
commit
12f4ba8431
13 changed files with 150 additions and 21 deletions
|
|
@ -43,7 +43,9 @@ function ca_factor() -> CaVal {
|
|||
ca_i += 1
|
||||
return ca_scale(ca_factor(), -1.0)
|
||||
}
|
||||
if c == 40 or (ca_i + 5 <= len(ca_s) and ca_s[ca_i..ca_i + 5] == "calc(") {
|
||||
let f = ca_fn_at(ca_s, ca_i)
|
||||
if f == "min" or f == "max" or f == "clamp" { return ca_fn(f) }
|
||||
if c == 40 or f == "calc" {
|
||||
while ca_s[ca_i] != 40 { ca_i += 1 }
|
||||
ca_i += 1
|
||||
let v = ca_sum()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue