Skip to content

[css-fonts-5] Consider making font-weight: bolder (and lighter) font-specific #6847

@litherum

Description

@litherum

Consider a font family with a weight=300 member and a weight = 600 member. Consider the following content:

<div id="outer" style="font: 300 16px MyFontFamily;">
    <div id="inner" style="font-weight: bolder;">...</div>
</div>

The definition of bolder says that the computed weight for inner would be 400. According to the font matching rules, if the requested weight is 400, a candidate font of weight 300 would be chosen rather than another candidate of weight 600.

This means that, for the inner element, the author has requested a bolder weight, but they didn't get one, even though a bolder weight exists.

Maybe bolder should take into account which members of the family are present, so this situation would match the weight=600 font rather than the weight=300 font.

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