Skip to content

[css-values] Font-relative length definitions don't account for media query usage #153

Closed
@cvrebert

Description

@cvrebert

(All emphases added)

[...] the font-relative lengths refer to the font metrics of the element on which they are used.
[...]

em unit
Equal to the computed value of the 'font-size' property of the element on which it is used.

When using such font-relative lengths in a media query expression:

  • The author isn't "using" the length "on" something, per se.
  • In the most common case, the author is using the length in relation to the viewport, which isn't an element.
rem unit
Equal to the computed value of font-size on the root element. When specified on the 'font-size' property [...]

Media queries interpret rem differently; see https://drafts.csswg.org/mediaqueries/#units

The other font-relative unit definitions likewise don't seem to account for usage in media query expressions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions