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
I think we should be able to access calc in SizeUnit. It is as much legit than any other thing, and avoid costly computation in JS when wanting to compute a layout for example. And it allows to mix and match different values.
Because all the CSS is computed directly by the browser with a C++ engine, we would gain in performance instead of subscribing to the size of the window to do the same computation in Elm.
The text was updated successfully, but these errors were encountered:
Le 31 janv. 2020 à 15:32, Guillaume Hivert ***@***.***> a écrit :
I think we should be able to access calc in SizeUnit. It is as much legit than any other thing, and avoid costly computation in JS when wanting to compute a layout for example. And it allows to mix and match different values.
An idea:
myStyle =
[ width
(Sizes.calc
(Sizes.div
(Sizes.sub (px 50) (px 104))
(vw 100)
)
)
]
This would results in:
.myStyle {
width: calc((50px - 104px) / 100vw);
}
Because all the CSS is computed directly by the browser with a C++ engine, we would gain in performance instead of subscribing to the size of the window to do the same computation in Elm.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
I think we should be able to access
calc
inSizeUnit
. It is as much legit than any other thing, and avoid costly computation in JS when wanting to compute a layout for example. And it allows to mix and match different values.An idea:
This would results in:
Because all the CSS is computed directly by the browser with a C++ engine, we would gain in performance instead of subscribing to the size of the window to do the same computation in Elm.
The text was updated successfully, but these errors were encountered: