Open zyxkad opened 2 years ago
Reading
calc
definition, it seems a bit more complex, since it supports:
- Math expression;
Add
,Sub
,Mul
andDiv
operations;- Nested
calc
calls;- Parenthesis resolution;
Also I think this should be upstreammed to
Taffy
, since all layout calculation/resolution is done there.
Math expression only include Add
, Sub
, Mul
and Div
operations for calc
.
Parenthesis resolution is only for parsing text.
And I will open a issue on taffy, thanks.
Could you provide a use case that you would need this for?
Could you provide a use case that you would need this for?
If I want to give border to some Bundle, I need to use calc
What problem does this solve or what need does it fill?
In css, we have
calc()
expression that can auto calculate and update when value is changed (e.g. window resize event)What solution would you like?
The define of
bevy::ui::Val
:Define of
CalcVal
:What alternative(s) have you considered?
Other solutions to solve and/or work around the problem presented.
Additional context
Any other information you would like to add such as related previous work, screenshots, benchmarks, etc.