- From: Stephen Williams via GitHub <sysbot+gh@w3.org>
- Date: Fri, 26 Apr 2019 19:14:44 +0000
- To: public-css-archive@w3.org
Other than replacing what px, em, rem, pt, etc. mean, nothing else changes or needs special handling. I'm already doing this manually with existing browser engines, so I know it doesn't require any other special handling. When a change is needed, CSS variables change (one for each type of scaling: linear, optimally readable font related non-linear, and linear below break point fixed above) and everything maps accordingly. Internally, the CSS engine is mapping all of those to some current pixel unit at some point anyway. This is just a direct, static during layout computation replacement of the current type->pixel value retrieval. Different type expressions could use different CSS variables, which allows em/rem/pt to use font scaling while px would be linear or linear/fixed depending on choice in a parent. The vw & vh types might need special handling. Offhand, the obvious solution is to be able to indicate the basis for vw & vh rather than the browser window viewport. So: 'get vw() { return --vw-element.width / 100; }' rather than 'get vw() { return viewport.width / 100; }'. And that should not be applied to the other sizing type expressions. -- GitHub Notification of comment by sdwlig Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3874#issuecomment-487169503 using your GitHub account
Received on Friday, 26 April 2019 19:14:46 UTC