Skip to content

Files

Latest commit

 

History

History
11 lines (11 loc) · 665 Bytes

91.md

File metadata and controls

11 lines (11 loc) · 665 Bytes
title date submitter number tags discussion
I want support for fractional pixel values
2019-11-26 22:05:09 UTC
Dzmitry Shymkin
91
css

In native applications UI it is common to use lines that have thickness of 1 physical pixel. With web technologies it is non-trivial to render such lines on screens with a pixel ratio of greater than 1. Safari does allow for fractional values (e.g., border-width: 0.5px for devicePixelRatio=2 and border-width: 0.3333px for devicePixelRatio=3). No other browsers support this though. Instead, we have to rely on hacks like transform: scale(0.5).