Re: [csswg-drafts] [css-fonts] Make larger/smaller simple ratios

The spec says:

> <relative-size>
> A <relative-size> keyword is interpreted relative to the table of font sizes and the computed ‘font-size’ of the parent element. Possible values are:
> [ larger | smaller ]
> 
> For example, if the parent element has a font size of ‘medium’, a value of ‘larger’ will make the font size of the current element be ‘large’.

And, about absolute-size:
> <absolute-size>
> An <absolute-size> keyword refers to an entry in a table of font sizes computed and kept by the user agent. Possible values are:
> [ xx-small | x-small | small | medium | large | x-large | xx-large ]

According to the current spec text, it seems to me:
- The relative sizes are only well-defined when an absolute size is inherited
- In-between absolute sizes, relative-sizes are fuzzy (and therefore can be implemented using a simple ratio)
- The UA has total control over the absolute sizes

Therefore, it seems to me that, if UAs choose absolute sizes which are a simple ratio from each other, then using a simple ratio would be spec compliant. However, no browser that I tested does this. Because of web compatibility, I can't imagine that any browser could change their absolute sizes. Therefore, we should change the spec.

Because of the existing fuzziness in the current spec, I don't think there is any value is specifying exactly which mechanism is used to increase/decrease the font size (for example, a UA could use a ratio, or a lookup table, or asking an oracle, etc.). The spec should simply say that "smaller" means smaller and "larger" means larger.

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

Received on Thursday, 10 August 2017 16:41:36 UTC