Open Enyium opened 2 weeks ago
Indeed, the Type::Rem is not handled in https://github.com/slint-ui/slint/blob/2d944b242c895c4f666fb21fce02298bd64afc25/internal/compiler/builtin_macros.rs#L84
I think actually min/max should ideally work with any number type (there is no easy way to check for that, one way is ty.as_unit_product().is_some()
min()
/max()
already support some type heterogeneity: You can usepx
withphx
. However, to specify one of the values as arem
value, you have to multiply withroot.default-font-size
:Is there a chance that
rem
values can be mixed withpx
/phx
inmin()
/max()
(and maybe others likeclamp()
andmod()
)? It would look like this: