Re: [csswg-drafts] [css-fonts-4] [varfont] Font variations do not support responsive layout

@litherum - I think what @vlevantovsky is looking to be able to do may be addressed in the changes to how `calc` works if we can get a unitless value as a result of a calculation. I know that was discussed here somewhere, but can't find the issue. This would address being able to use the techniques I used in this demo (https://codepen.io/jpamental/pen/MGEPEL) to be used for any axis of variation. Here are a few examples:

- Calculations for `font-size` and `line-height` work with current capabilities given the output of the `calc` is in `ems`
- Calculations for `font-stretch` can work, so long as the final output unit is a percentage value
- However if you wanted to supply values for use with custom axes and needed a straight numerical value (such as supplying a `font-variation-settings` value for `GRAD`), `calc` won't work as you can't end up with just a number.

The technique in my demo makes use of min- and max- boundaries tied to media queries. So you can set a lower value for, say, `font-size`, that would be `2em` for any screen size up to a minimum size viewport, and scale up to a maximum of `4em` at a larger viewport, but not scale any bigger than that. Same idea holds true for `line-height`, but has to rely on setting specific values for `opsz`, `GRAD`, etc when used in `font-variation-settings`.

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

Received on Wednesday, 8 August 2018 17:18:03 UTC