CSS-like viewport relative units.

What

CSS-like viewport relative units that would work side-by-side with the the current units; percentage, px, points

  • vw - relative to the viewport’s width

  • vh - relative to the viewport’s height

Why

In many cases there’s going to be the need to size something relative to the screen estate. Although the current percentages (%) does a part of this, it does not replace the functionality of viewport relative units. It also allows for the width to be the same as the height - but still responsive.

Example

Square grid cells

<Grid ColumnCount="2">
    <Rectangle Width="50vw" Height="50vw"/>    <Rectangle Width="50vw" Height="50vw"/></Grid>

I second this, this would be super awesome. Only thing that I love about CSS (that I would love in Fuse)

+1

+1

Hey Aditya, you should be able to do this using width() and height() UX expressions at this point.