Skip to content

[css-values-5][css-inline-3] Rounding to device pixels #13600

Description

@fantasai

Following up on #3720... Several situations that were brought up as motivating use cases for env(hairline) were actually about forcing device-pixel rounding. This isn't something we really want authors to be thinking about normally--stylesheets peppered with device-pixel rounding functions would be a nightmare to understand and maintain.

Ideally the browser engine should handle rounding things wherever rounding is the right thing to do, so one question is: are there places where we should be doing device-pixel rounding that we aren't right now?

One place that comes to mind is line-height. If you have a fractional line height, your lines will not have consistent rhythm. Should line-height (and thus the lh unit) round to the nearest device pixel?

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