-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective Add viewport variants to `Val` that specify a percentage length based on the size of the window. ## Solution Add the variants `Vw`, `Vh`, `VMin` and `VMax` to `Val`. Add a physical window size parameter to the `from_style` function and use it to convert the viewport variants to Taffy Points values. One issue: It isn't responsive to window resizes. So `flex_node_system` has to do a full update every time the window size changes. Perhaps this can be fixed with support from Taffy. --- ## Changelog * Added `Val` viewport unit variants `Vw`, `Vh`, `VMin` and `VMax`. * Modified `convert` module to support the new `Val` variants. * Changed `flex_node_system` to support the new `Val` variants. * Perform full layout update on screen resizing, to propagate the new viewport size to all nodes.
- Loading branch information
Showing
3 changed files
with
171 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.