You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-borders] [css-ui] Consider rounding (negative?) outline-offsets like border-widths #12906
Breaks with fractional scaling, because the negative offset doesn't get rounded like the width.
With env(hairline) as proposed in #3720 it becomes possible to do (assuming hairline == 1 devpx which isn't quite guaranteed but should hold in today's screens), but slightly annoying:
This makes sense to me. Even for positive offsets, having the offset be consistent on all sides of the box and at least 1 device pixel when it is not zero is probably desirable.
The CSS Working Group just discussed [css-borders] [css-ui] Consider rounding (negative?) outline-offsets like border-widths, and agreed to the following:
RESOLVED: Round outline-offset same as outline-width and border-width
The full IRC log of that discussion
<fantasai> emilio: Fairly common use case to have a negative outline-offset to go over the border.
<fantasai> emilio: given the way things work by default, border gets rounded differently, and outline doesn't cleanly fit
<fantasai> emilio: Feel it should be uncontroversial to round outline-offset the same way as borders
<fantasai> emilio: Firefox has been doing this for awhile to fix high-DPI issues
<fantasai> emilio: I think we should just do it everywhere
<fantasai> +1 from us
<fantasai> florian: I think for awhile we didn't specify outline at all because UI, but not doing this anymore.
<fantasai> astearns: Just outline-offset?
<fantasai> emilio: outline-width is already rounded like border-width
<lwarlow> +1
<fantasai> PROPOSED: Round outline-offset same as outline-width and border-width
<kbabbitt> sgtm
<florian> s/we didn't specify outline at all /we deliberately didn't specify outline much
<fantasai> RESOLVED: Round outline-offset same as outline-width and border-width
<lea> +1
<fantasai> weinig: I will note that there are some open issues wrt rounding, especially regarding zoom
<fantasai> weinig: So if we do this, would be good to get to some of those zoom-related outline and border questions sooner than later
<fantasai> astearns: issues?
<fantasai> weinig: Yeah, I'll post in IRC.
<fantasai> astearns: ok, let's leave space to add those to the logs. But we're done for today.
<fantasai> Meeting closed.
<weinig> its written in terms of border-width, but applies to outline-width and column-rule-width as well, https://github.com//issues/13350
Activity
Bug 1985190 - Snap outline offsets like border-widths. r=firefox-styl…
Bug 1985190 - Snap outline offsets like border-widths. r=firefox-styl…
Snap outline offsets like border-widths.
Snap outline offsets like border-widths.
Bug 1985190 - Snap outline offsets like border-widths. r=firefox-styl…
Bug 1985190 - Snap outline offsets like border-widths. r=firefox-styl…
Bug 1985190 - Snap outline offsets like border-widths. r=firefox-styl…
Snap outline offsets like border-widths.
fantasai commentedon Dec 10, 2025
This makes sense to me. Even for positive offsets, having the offset be consistent on all sides of the box and at least 1 device pixel when it is not zero is probably desirable.
css-meeting-bot commentedon Feb 25, 2026
The CSS Working Group just discussed
[css-borders] [css-ui] Consider rounding (negative?) outline-offsets like border-widths, and agreed to the following:RESOLVED: Round outline-offset same as outline-width and border-widthThe full IRC log of that discussion
<fantasai> emilio: Fairly common use case to have a negative outline-offset to go over the border.<fantasai> emilio: given the way things work by default, border gets rounded differently, and outline doesn't cleanly fit
<fantasai> emilio: Feel it should be uncontroversial to round outline-offset the same way as borders
<fantasai> emilio: Firefox has been doing this for awhile to fix high-DPI issues
<fantasai> emilio: I think we should just do it everywhere
<fantasai> +1 from us
<fantasai> florian: I think for awhile we didn't specify outline at all because UI, but not doing this anymore.
<fantasai> astearns: Just outline-offset?
<fantasai> emilio: outline-width is already rounded like border-width
<lwarlow> +1
<fantasai> PROPOSED: Round outline-offset same as outline-width and border-width
<kbabbitt> sgtm
<florian> s/we didn't specify outline at all /we deliberately didn't specify outline much
<fantasai> RESOLVED: Round outline-offset same as outline-width and border-width
<lea> +1
<fantasai> weinig: I will note that there are some open issues wrt rounding, especially regarding zoom
<fantasai> weinig: So if we do this, would be good to get to some of those zoom-related outline and border questions sooner than later
<fantasai> astearns: issues?
<fantasai> weinig: Yeah, I'll post in IRC.
<fantasai> astearns: ok, let's leave space to add those to the logs. But we're done for today.
<fantasai> Meeting closed.
<weinig> its written in terms of border-width, but applies to outline-width and column-rule-width as well, https://github.com//issues/13350
Round outline-offset like border-width
sb3nder commentedon Apr 16, 2026
[css-ui] outline-offset computed value should be snapped as a line width