ZitatKomischerweise funktioniert das mit diesem Code problemlos. Ich verstehe aber nicht warum.
Das habe ich auch zunächst nicht verstanden, denn das Display deines Samsung-Handys hat eine Breite von über 1000px und dürfte mit dieser Mediaquery eigentlich nicht auf column-Layout umschalten. Ich habe jedoch weiter recherchiert und mit meinem Samsung S4 getestet und dies gefunden:
https://webplatform.github.io/docs/tutorials…ding-css-units/
Sie schreiben dort:
ZitatThe CSS pixel is a ‘reference’ pixel, not a device pixel. This is misleading and, personally, I prefer the notion of ‘user unit’ that SVG uses because I think it is easier to then explain the mapping to physical units and device pixels. But once one understands that a ‘px’ is actually a reference, not a device pixel, things make more sense. The thing to remember is that a CSS px is an abstract unit and there is a ratio controlling how it a) maps to actual device pixels and b) maps to physical units (in a fixed way, the ratio is always 96 CSS px to an inch).
D. h. die Pixel von CSS haben nichts mit den Pixeln des Displays zu tun. Offenbar ergibt sich die Breite in CSS-Pixeln durch die Breite des Displays in physikalischen Pixeln dividiert durch devicePixelRatio. Und das heißt weiter, dass die Berechnung, die ich in #22 erwähnt habe, automatisch durch den Browser stattfindet, man braucht sich darum nicht zu kümmern.
Bei meinem S4 wird eine devicePixelRatio von 3 angezeigt und eine CSS-Breite des window von 360px (im Hochformat).