Are VW/VH units or flexboxes meant to work in print?

170 views
Skip to first unread message

Sergio Zambrano

unread,
Oct 17, 2015, 2:34:58 AM10/17/15
to Chromium-discuss
I've got to replace all vw and vh units for the calculated sizes in pts (based in a letter size) because my layout was completely broken. Googling the issue shows I'm the first with this problem. 

All those values are calculated to ZERO (collapsed divs, stacked up lines of text when used as line-height, etc).

Are those viewport-relative units supposed to work in @print media?

What about FLEXBOXES? Same happens with those. They evaluate to zero width.

By the way, the Developer tools simulates the "print" CSS as it should. It's the actual print preview (PDF) what fails.

Thanks.

PhistucK

unread,
Oct 17, 2015, 3:00:10 AM10/17/15
to Sergio Zambrano, Chromium-discuss
Did you follow my instructions from my reply on your other post?


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Message has been deleted

PhistucK

unread,
Oct 19, 2015, 10:46:50 AM10/19/15
to Sergio Zambrano, Chromium-discuss


PhistucK

On Mon, Oct 19, 2015 at 5:38 PM, Sergio Zambrano <applxp...@gmail.com> wrote:


On Saturday, October 17, 2015 at 3:00:10 AM UTC-4, PhistucK wrote:
Did you follow my instructions from my reply on your other post?


PhistucK



I'm looking at the other post. https://productforums.google.com/forum/#!topic/chrome/xN0xbYfD9g8

There's no answer from you. 

PhistucK

unread,
Oct 20, 2015, 2:13:54 AM10/20/15
to Sergio Zambrano, Chromium-discuss
​Please, continue the thread here, as google-chrome-developer-tools is about the Developer Tools specifically, like I mentioned in the other thread and asked you not to continue it there.

There are a few options.
- Consult with the relevant CSS specification that defines those units. If it does not say anything about the vh unit and fellows being ​screen only - it is either a bug or simply not implemented (which can be filed at crbug.com as well).
- See if other browsers support it. If they do, then, again, either a bug or simply not implemented and best filed at crbug.com.


PhistucK

Sergio Zambrano

unread,
Oct 20, 2015, 4:05:33 AM10/20/15
to Chromium-discuss
Ok, while building a demo, I realized the VW and VH units resolve properly when inside an iFrame, (see the print preview gray box with red border)


But the same iFrame src URL FAILS if opened in a stand-alone window.


Am I missing something? (I added a @page rule with size properly recognized by the print dialog and that didn't fix it)

The CSS3 specs say VW and VH should work.

PhistucK

unread,
Oct 20, 2015, 4:09:11 AM10/20/15
to Sergio Zambrano, Chromium-discuss
I would file an issue (if you cannot find an existing similar issue already) at crbug.com, if I were you.


PhistucK

--
Reply all
Reply to author
Forward
0 new messages