W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2017

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

From: Myles C. Maxfield via GitHub <sysbot+gh@w3.org>
Date: Thu, 30 Mar 2017 08:59:24 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-290347401-1490864362-sysbot+gh@w3.org>
> Responsive layouts, where e.g. changes in window size can immediately be reflected in font variation (weight / width) changes - calc() may be sufficient for this.

Yep - `calc()` and media queries.

> Responsive layout with border conditions (where e.g. a variation is to be applied only within a range of width values) - media query combined with calc() may be enough to solve this, but I am not sure if the conditions can be nested - e.g. when media query is used to change the layout, such as # of columns, column width, etc., and then we need to determine font variations settings, e.g. based on the applied column width.

Border conditions can be achieved in `calc()` with `min()` and `max()`, and with media queries with `min-width` and `max-width`.

Reacting to parent element width is a problem outside the scope of the Fonts spec. It is difficult because of shrink-wrapping (e.g. the width of a floating element is dependent on its children, so the width of the children can't be dependent on the parent). The current approach is to sidestep this problem and react to viewport sizes rather than element sizes.

> Ability to enable interactive font variations where controls for certain variation features may be desirable to expose to a user (see Buffalo Gal example, where a number of variation features could be considered as a style choice).

Once you enter the world of interactivity, script is required. Once script is involved, you can build up any variation values and apply it to the `font-variation-settings` property.

GitHub Notification of comment by litherum
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1054#issuecomment-290347401 using your GitHub account
Received on Thursday, 30 March 2017 08:59:30 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:09 UTC