You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementing CSS3 arithmetic functions would improve one's ability to do dynamic complex layouts using RmlUI (eg dynamically scaling elements based on viewport dimensions). For instance, one could use CSS such as the following:
div#my-cool-div {
width:calc(100%-32px); /* We need a constant width of 32px from the right */
}
We would have to start with defining a parser to parse the arithmetic grammar properly and likely also implement an expression cache (to avoid evaluating them every frame) whenever possible.
The definition of these arithmetic functions is defined here.
Is such a feature beyond the scope of this project or not, given it does not aim to implement the entirety of CSS3?
The text was updated successfully, but these errors were encountered:
I think there are some things you can express neatly with calc expressions. Although, at the same time, the equivalent things can be achieved through other means (at least usually), e.g. using nested boxes, or things like flexbox layout or relative positioning. And for that, it's not something I would put very high up on the priority list. But it would be a nice to have feature.
I would certainly consider it if I saw a draft implementation, but it depends on its complexity and performance I would say. We can't accept a solution that impacts performance for users that don't opt to use it.
Implementing CSS3 arithmetic functions would improve one's ability to do dynamic complex layouts using RmlUI (eg dynamically scaling elements based on viewport dimensions). For instance, one could use CSS such as the following:
We would have to start with defining a parser to parse the arithmetic grammar properly and likely also implement an expression cache (to avoid evaluating them every frame) whenever possible.
The definition of these arithmetic functions is defined here.
Is such a feature beyond the scope of this project or not, given it does not aim to implement the entirety of CSS3?
The text was updated successfully, but these errors were encountered: