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

Also had the same problem: I set the scaling factor on my phone, which resulted in a DPR of 2.625, so the border width was 0.762px instead of 1px.

This works for me:
```
--dpr: 1; /* Device Pixel Ratio - Will be overridden by JS */
--hairline: round(to-zero, 1px, calc(1px / var(--dpr)));
```

Then use it on any other CSS property:
`padding-bottom: var(--hairline);`

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 8 December 2025 09:37:55 UTC