ludic.ui, runtime, compiler: an expression's Value comes from the screen's pool while it is built (never a state's start or an action's), true and false shared, calc() terms pooled and read in place, a model's list fields filled in place (value_set_ints/strs/floats/bools); reseeded
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
25f4d49e43
commit
fa119d234b
18 changed files with 44838 additions and 44532 deletions
|
|
@ -1,6 +1,12 @@
|
|||
# units.ludic - lengths in px (the renderer's scale), em (the font size here), rem (the root's),
|
||||
# vw and vh (the screen's), and custom properties: --name set on an element, read by var(--name)
|
||||
# in it and everything inside it
|
||||
# the px of one em for the element being styled (a font size's em is its parent's)
|
||||
function el_em(ui_st: UiState) -> float {
|
||||
if ui_st.el_cur == null { return el_px(ui_st, 16.0) }
|
||||
if ui_st.el_key == "size" and ui_st.el_cur.parent != null { return cs_fs(ui_st, ui_st.el_cur.parent) }
|
||||
return cs_fs(ui_st, ui_st.el_cur)
|
||||
}
|
||||
function el_unit(ui_st: UiState, s: string) -> float {
|
||||
let f = el_num(s)
|
||||
let n = len(s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue