Re: [csswg-drafts] [css-shadow-parts] PanResp (Panel Responsive) support: sizing expression mapping (#3874)

The clarify a bit more how I use this:
Every browser viewport is 100vw wide by definition.  A browser window viewport that is 1200 pixels wide, is also vw/1200 * 1200 units wide, or each pixel is .0833vw wide.  So rather than use pixel width breakpoints with alternative CSS for font-size, widths, etc., an app may want to treat 1200 pixels as 100% and, at some lower width start scaling down smoothly rather than breaking (clipping to the right, wrapping in ugly ways).  In some cases, parts of a layout should stay exactly proportional while in others a layout should stay completely fixed, even with browser zoom changing.

Using vw as a basis for CSS sizing expressions has been done, although it is a bit of a toy on its own for a couple reasons.  The worst of these is that there is no per-element vw / vh, but even if there were, it wouldn't be too helpful.  A designated parent for vw / vh gets closer to being useful.

It turns out that controlling scale for several reasons can all be done by a CSS variable along with vw.  Potentially vh also, but experience has shown that vw plus factoring in height to algorithms is best overall.

-- 
GitHub Notification of comment by sdwlig
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3874#issuecomment-487183393 using your GitHub account

Received on Friday, 26 April 2019 20:02:05 UTC