Skip to content

[css-fonts-4] font-weight and calc. #2590

@emilio

Description

@emilio

This is just a request for clarification.

https://drafts.csswg.org/css-fonts-4/#font-weight-numeric-values says:

Only values greater than or equal to 1, and less than or equal to 1000, are valid, and all other values are treated as parse errors.

This doesn't say how to handle calc(), but per my reading of previous discussions the expected behavior is that font-weight: calc(-1) is not a parse error, and it gets clamped at computed value time.

However no UA does this AFAICT. Am I right that that's the expected behavior? Or should we give up on not making calc() for numeric values out of range be a parse error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions