Skip to content

[css-border][css-viewport] Consider moving border-width pixel snapping from computed value to used value #13350

@weinig

Description

@weinig

Currently, the computed value for border-width properties is defined to "absolute length, snapped as a border width".

This has an unfortunate interaction with the zoom property, where pixel snapping will not be preserved for most values of zoom (as zoom is applied after computed value).

If instead, we move the application of "snapped as a border width" to the used value, I believe this would be resolved.

I say I think, because I am not exactly sure when zoom gets applied, the spec says:

"the used value of a CSS property (including values inside of path() strings) is pre-multiplied (before any other steps in the used value stage) by the used value of zoom for the element".

The goal here would be for the order to be

  1. Apply zoom
  2. Apply "snapped as a border width".

The only other user visible change here would be when explicitly inheriting border-widths by a child with a different zoom value, as the non-pixel snapped value will now be inherited, which I think would be preferable anyway.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions