logoalt Hacker News

kccqzy06/25/20251 replyview on HN

Why wouldn't it work? The border-size accepts the same kind of length units as height or width, no?


Replies

account4206/27/2025

The problem is the rounding from fractional sizes due to fractional scaling to whole pixel sizes needed to keep things looking crisp. Browsers try really hard to make sure that during this process all borders of an element remain the same size, but this also means that they end up introducing inconsistencies with other measurements.