Implement @viewport at-rule
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Webcompat Priority | ? |
People
(Reporter: fb+mozdev, Unassigned)
References
(Blocks 2 open bugs, )
Details
(4 keywords)
Reporter | ||
Updated•13 years ago
|
Reporter | ||
Updated•13 years ago
|
Reporter | ||
Updated•13 years ago
|
Reporter | ||
Comment 1•13 years ago
|
||
Reporter | ||
Updated•13 years ago
|
Comment 3•13 years ago
|
||
Updated•13 years ago
|
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Updated•12 years ago
|
Reporter | ||
Comment 6•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Reporter | ||
Comment 7•11 years ago
|
||
Comment hidden (off-topic) |
Comment hidden (off-topic) |
![]() |
||
Comment 10•10 years ago
|
||
Reporter | ||
Comment 11•10 years ago
|
||
Comment 12•9 years ago
|
||
Updated•8 years ago
|
Comment 13•8 years ago
|
||
![]() |
||
Updated•7 years ago
|
![]() |
||
Comment 14•7 years ago
|
||
Comment 15•6 years ago
|
||
An edge test with @viewport {width: 50vw;}
http://w3c-test.org/css/css-values/vh-support-atviewport.html
Expected result:
http://w3c-test.org/css/css-values/reference/vh-support-atviewport-ref.htm
![]() |
||
Updated•6 years ago
|
Comment 16•6 years ago
|
||
I did a brief chat with Karl on IRC, he told me that he has not seen any webcompat issues caused by @viewport rule (probably that's because Chrome has implemented it but pref-ed off by default). Also he suggested that we can implement @viewport rule with a pref offed by default and ship it when Chrome ships. That sounds a reasonable plan to me. :) With this plan, we can fix bug 1552713 with the same manner what Chrome does (see bug 1552713 comment 2).
Comment 17•6 years ago
|
||
Wait, it's not clear to me why @viewport
is needed to fix that bug. That seems just to override the min-ratio, why can't it be done directly in C++?
Comment 18•6 years ago
|
||
We can of course do it in C++, but it requires a ifdef block or a platform check.
Comment 19•6 years ago
|
||
Or a pref, y'know ;)
We'd need the same to inject the viewport stylesheets (or to enable / disable @viewport
), right? (That's what Blink does with the document->GetSettings()
bits here).
I didn't want to imply that @viewport
is not worth implementing, just that it's probably not worth it to block fixing that bug on implementing @viewport
.
Comment 20•6 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #19)
Or a pref, y'know ;)
We'd need the same to inject the viewport stylesheets (or to enable / disable
@viewport
), right? (That's what Blink does with thedocument->GetSettings()
bits here).
I didn't notice it, that's good to know. (there is another style sheet for television)
I didn't want to imply that
@viewport
is not worth implementing, just that it's probably not worth it to block fixing that bug on implementing@viewport
.
Yeah, anyways, I am now open about how to fix bug1552713 (I didn't block the bug on it) so I'd wait for the webcompat triage on that bug, as of now there is only one issue so we don't need to rush to fix it probably.
Comment 21•5 years ago
|
||
FYI CSS WG just resolved to drop "@viewport" (see https://github.com/w3c/csswg-drafts/issues/4766), no shipping engine implements it, and Blink apparently objects (thinks it's a bad idea) per https://github.com/w3c/csswg-drafts/issues/258.
Unless we care strongly (and think @viewport is a good design, which I highly doubt given the preloader-hostile conclusion in 258), we should WONTFIX this.
If you want to help better solve the problem that @viewport was supposed to solve (but never did), please contribute to:
https://github.com/w3c/csswg-drafts/issues/326
https://github.com/w3c/csswg-drafts/issues/331
Thanks.
Comment 22•5 years ago
|
||
I don't object to drop it.
I actually prefer @viewport in some ways, it has cascading rules. Whereas in the case of meta viewport it's super unclear if there are multiple meta viewport tags.
I am going to mark this as INVALID.
Description
•