Bug 747754 (@viewport)

Implement @viewport at-rule




7 years ago
18 days ago


(Reporter: fb+mozdev, Unassigned)


(Blocks: 2 bugs, 4 keywords)

Firefox Tracking Flags

(Not tracked)





7 years ago
iOS Safari introduced <meta> viewport for influencing how Websites are rendered on mobile devices. However, the design of <meta> viewport is flawed (not solely by handling this via a HTML tag instead of CSS) and implementations across different platforms differ (see e. g. device-width and landscape mode). 

The Opera Dev Team designed a CSS replacement for the <meta> viewport tag including how to handle the <meta> viewport tag when CSS Device Adaption is implemented by an engine. See W3C editor's draft: http://dev.w3.org/csswg/css-device-adapt/

Opera Mobile and IE10 already implemented the proposal (with vendor prefixes). 

Especially for Fennec, but also possibly Fx, this proposal is very helpful, as it also defines how to handle a <meta> viewport tag and clarifies features resp. provides more flexibility than iOS's solution. 

Please implement it (with vendor prefix, as the proposal hasn't matured yet).


7 years ago


7 years ago
Severity: normal → enhancement
Duplicate of this bug: 242646
WebKit is also working on an implementation: https://bugs.webkit.org/show_bug.cgi?id=95959
Depends on: 804584
Blocks: 804584
No longer depends on: 804584

Comment 4

6 years ago
Already implemented in WebKit now: https://bugs.webkit.org/show_bug.cgi?id=95961

Comment 5

6 years ago
Sorry, meant that the @viewport rule is implemented, not the whole module.


6 years ago
Keywords: dev-doc-needed
Blocks: 677989

Comment 6

5 years ago
The Chromium Bug is crbug.com/155477 – Moz could be the last one to implement this.
Ever confirmed: true
Whiteboard: [parity-IE], [parity-Opera] → [parity-IE] [parity-Opera] [parity-webkit]


5 years ago
Blocks: 793462


5 years ago
See Also: → bug 845690

Comment 7

5 years ago
This has since been implemented behind a runtime flag in Chrome. IE10 has a prefixed implementation. Don't know if Opera has this enabled after switching to Blink, or they regressed. Either way, Gecko is indeed the last big engine that has no implementation of @viewport.
Whiteboard: [parity-IE] [parity-Opera] [parity-webkit] → [parity-IE] [parity-Opera] [parity-webkit] [parity-blink]
Comment hidden (off-topic)
Comment hidden (off-topic)
As of today

* IE11 and Edge with -ms- prefix
* Opera Mini with -o- prefix
* Still behind a flag for Chrome.

Comment 11

4 years ago
Removing parity-webkit since the implementation seems to have been abandoned after Google forked to Blink.
Whiteboard: [parity-IE] [parity-Opera] [parity-webkit] [parity-blink] → [parity-IE] [parity-Opera] [parity-blink]

Comment 12

3 years ago
I'd love to see this too. I recently ran into the issue where my web-page just looked horrible on a 4k(UHD actuall) resolution, without any good solution.
If I had been able to reliably use @viewport{max-width:1980px} I could've just zoomed the page and retained the same view as on an HD screen. There just wasn't enough content to fill a 4K screen.
Maybe there's another solution, but the viewport CSS rule seemed like the proper way to do this.
I've adjusted the summary to reflect what this is actually asking for and in regard of the newly created tracking bug 1354483.

Alias: @viewport
Summary: [CSS-WD] implement CSS Device Adaptation → Implement @viewport at-rule
Whiteboard: [parity-IE] [parity-Opera] [parity-blink] → [parity-blink][parity-IE][parity-presto opera]
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-chrome, parity-ie, parity-opera-mini
Whiteboard: [parity-blink][parity-IE][parity-presto opera]
You need to log in before you can comment on or make changes to this bug.