Open Bug 1606089 Opened 6 years ago Updated 2 years ago

responsive design mode viewport has wrong dpi

Categories

(Core :: Layout, defect, P3)

71 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: sailormax, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36

Steps to reproduce:

Trying to use max-width in cm for mobile phones:
@media only all and (max-width: 16cm)

Actual results:

@media only all and (max-width: 16cm)
did not work for Xiaomi Redmi 4x

Expected results:

@media only all and (max-width: 16cm)
has to work for Xiaomi Redmi 4x, because this phone has 70mm width ( https://www.gsmarena.com/xiaomi_redmi_4_(4x)-8608.php )

The problem exists on mobile phones and in responsive design mode

Attached file portable.html

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Responsive Design Mode
Product: Firefox → DevTools

The problem exists on mobile phones and in responsive design mode

This tells me that this isn't a devtools bug but a layout bug instead. Moving over to the Layout component for now.

Component: Responsive Design Mode → Layout
Product: DevTools → Core

This is because the text overflows the viewport and there's no <meta name="viewport"> on the page. So I think the width ends up being 980px or such... Hiro?

Flags: needinfo?(hikezoe.birchill)
Priority: -- → P3

Emilio is totally right. And I think Chrome's behavior is the same. Adding <meta name="viewport" content="width=device-width"> makes the media query work as expected, I think.

I am going to close this bug.

sailormax, if you have further concerns, please feel free to reopen this.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(hikezoe.birchill)
Resolution: --- → INVALID

With viewport on mobile phones works better, but in responsive design mode still not working :/
Tested with emulation of Xiaomi Redmi 4x (this phone has 70mm width ( https://www.gsmarena.com/xiaomi_redmi_4_(4x)-8608.php ))

Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---

It has been added as:
720x1280, Device pixel ratio = 3
User agent string = mobile

Did I wrongly setup pixel ratio?
Or we missed DPI setting?

CCing Brad (it may be a problem only on RDM, I haven't dug into detail though)

I'll look at the behavior in RDM.

Assignee: nobody → bwerth

I'm not working in this area anymore. Taking myself off the bug to make it clear that somebody else can pick it up.

Assignee: bwerth → nobody
Severity: normal → S3

Experiencing DPI issues in responsive design mode? Double-check viewport settings for Best WP accurate display. Adjusting viewport meta tag might resolve the problem. Stay precise for a seamless responsive design experience!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: