@media (max-width) do not work properly

UNCONFIRMED
Unassigned

Status

()

Core
Layout
UNCONFIRMED
3 days ago
3 days ago

People

(Reporter: 924792245, Unassigned)

Tracking

58 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

130.30 KB, application/x-zip-compressed
Details
(Reporter)

Description

3 days ago
Created attachment 8950895 [details]
Firefox bug.zip

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20180206200532
Firefox for Android

Steps to reproduce:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Test</title>
    <style>
		*{margin:0;padding:0}
		div{height:318px;}

		@media (max-width:1280px){
			body{background:black}}
	

    </style>
    
</head>
<body>
	<div></div>
</body>
</html>


Actual results:

When I shrink the width of the browser to 1280px,it didn't turn black.It turned until I shrink it to 1263px.
However,when I set the height of the div less than 318px(such as 317.9px).It can turn black in 1280px


Expected results:

the background of the body should turn black when I shrink it to 1280px .
There is no need to set the div of it less than 318px to make it work well.

Comment 1

3 days ago
Not a security bug...
Group: firefox-core-security

Updated

3 days ago
Component: Untriaged → Layout
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.