Closed Bug 798277 Opened 12 years ago Closed 12 years ago

CSS Media Queries Max & Min width ignore scrollbars

Categories

(Firefox :: Untriaged, defect)

15 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 569266

People

(Reporter: james_lelyveld, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20100101 Firefox/15.0.1
Build ID: 20120905151427

Steps to reproduce:


Set up media queries on a page that requires scroll bars


Actual results:

For max width it broke 15 px later than expected as the page shrunk - i.e. for media query set to break at 960px break point occurs at 945px.

Note if no scroll bars it breaks at 960px.


Expected results:

I understand this is a duplicate of this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=569266
Due to the spec regarding width here:
http://www.w3.org/TR/2009/CR-css3-mediaqueries-20090915/#width

However in this instance it feels like the spec is wrong (for all practical purposes). If you want a web page to respond in a predictable manor the current implementation makes it impossible - potentially depending on the size of the window the user has opened the site will behave differently due to the presence of scroll bars.

To make it worse the implementation varies between browsers, IE & Webkit both ignore the scroll bar / Opera & Firefox don't which makes implementation even more difficult.

Whilst I understand currently the solution is implement to the letter of the spec, it's impossible to develop against as the web page has no way of knowing if the scroll bars are present or not and so sometimes the media queries are applied when it has one width (say the 960 of the media query) and other times at a smaller width (the 945 with the scroll bar). This inconsistency isn't good for user experience or for web development.

If you want more information / justification please don't hesitate to contact me - I hope you'll consider changing the current implementation.

PS: there are various posts on the web about this eg:
http://iamkeir.com/post/26647025450/firefox-media-query-breakpoints-wtf
Ask that the SPEC gets changed if you think that it's wrong or unclear.
Bugzilla is the place to report bugs for Mozilla.org products and it's no bug if we follow the specification.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.