Re: [csswg-drafts] [css-backgrounds] Add a 'hairline' border-width value (#3720)

@dbaron Did you miss this part (quoted below), or is your comment asserting that something about it would still be problematic?

> Right now, that'll be 1 device pixel, but if screens get significantly higher-res, it'll probably resolve to whatever number of device pixels gives you a value between 1/3 and 1/2 of a CSS px.

--------------

> Also... with Gecko's border rounding behavior [snip]

Hm, interesting. <http://software.hixie.ch/utilities/js/live-dom-viewer/saved/6749> tests this behavior. In Chrome, on my 1x desktop monitor, I get a 1px border for everything down to .05px; the .01px border disappears. That might be an internal rounding issue?

There's an additional weirdness in Chrome, tho - despite the border displaying the same size in all of them, the *internals* of the box itself lays out as different heights, despite the only thing giving it a height being a `padding: 2px` declaration! Looks like the 1px-border is 4px tall internally, the .5px and .33px are 3px tall, and the .1px is 2px tall. It looks like we're rendering the border-box's height "correctly" for the specified padding+borders (6px, ~5px, and ~4px, respectively), but then just *painting* the borders larger, so it overlaps the padding box internals?

It looks like Firefox correctly renders a 4px padding box on each of them, so I assume this is a Chrome bug in the timing of our border-width snapping vs other layout calculations.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3720#issuecomment-471784667 using your GitHub account

Received on Monday, 11 March 2019 23:40:59 UTC