- From: webstrand via GitHub <sysbot+gh@w3.org>
- Date: Fri, 03 Jan 2025 18:20:46 +0000
- To: public-css-archive@w3.org
I've been fighting with some displays that have non-integer device-pixel-ratios, you can simulate this on most browsers by pressing `ctrl +` to zoom in. I do not need to address individual device pixels but I do need to ensure that my boxes are actually aligned to the pixel grid. The only solution I've found is to inject `--dpr` and use `round(whatever, var(--dpr) * 1px)`. Here's an example that suffers badly from non-integer DPR: <https://codepen.io/webstrand/pen/OPLjrLy> notice that the gaps around the "check" of the checkbox are uneven. I do not mind if it's more than a 1px gap, it just needs to be even and consistent. Not this: ![image](https://github.com/user-attachments/assets/9ed720ec-ab9f-4297-b710-9a3ce32f35e0) ![image](https://github.com/user-attachments/assets/f21bc090-cf8e-497a-a049-e0af0416f245) -- GitHub Notification of comment by webstrand Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3720#issuecomment-2569639200 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 3 January 2025 18:20:47 UTC