3 ms·
It's actually in 2.1 as well, the fact that 96 CSS pixels equal 1 CSS inch. But that's not what's relevant here, as we're talking about media queries where we h
by gsnedders 10y ago
It's actually in 2.1 as well, the fact that 96 CSS pixels equal 1 CSS inch. But that's not what's relevant here, as we're talking about media queries where we have resolution units, and resolution units give the device pixels per some CSS unit.
> you can use device-pixel-ratio and the likes to have an hint on the pixel density, which doesn't protect you from the extremes (small, very high density devices and large low density screens)
> like the galaxy tab 7.7" has a 1280 width, which would trigger desktop line of queries if you break at 1024 like many do.
Oh, right, so the issue here is the fact we have relatively high density screen (197 PPI) but where 1 CSS pixel still equals 1 device pixel? That seems pretty bad generally, given I presume the same is true for the rest of the OS (AFAIK in general Android browsers just follow the OS here)? It seems like to fix this we'd need to add resolution units giving number of CSS pixels per physical length unit, right?
- LoSboccacc 10y agoexactly, instead they went on the road of giving physical pixel per css pixel, which means we need to create all combination of kinda valid queries to support future devices (problem isn't THAT bad now, but it's getting worse) and then you have iframes, and browser zoom
- gsnedders 10y ago> exactly, instead they went on the road of giving physical pixel per css pixel, which means we need to create all combination of kinda valid queries to support future devices (problem isn't THAT bad now, but it's getting worse) Do you have examples of other device and browser combinations of this being a problem? Let's make this situation better! (FWIW, these browsers are likely not conforming CSS implementations, because you either must have 1 CSS inch equal 1 physical inch (and 1 CSS pixel is still 1/96 of a CSS inch, with whatever ratio to device pixel that ends up being), or by relating the CSS pixel to "the visual angle of one pixel on a device with a pixel density of 96dpi and a distance from the reader of an arm's length", but hey, they exist so we may as well add media queries to deal with the resultant fallout.) [Edit: In the Galaxy Tab 7.7 case, the reference pixel, assuming 15.75" viewing distance (which is totally non-scientifically the viewing distance my partner uses her tablet at) works out to be 1/170th of an inch: almost exactly a device pixel. I guess a lot of the problem with tablets is the viewing distance varies so much...]