Are VW and VH units supposed to work in @print media?

1,065 views
Skip to first unread message

Sergio Zambrano

unread,
Oct 9, 2015, 3:22:44 AM10/9/15
to Google Chrome Developer Tools

I've had 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?


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

PhistucK

unread,
Oct 9, 2015, 3:28:14 AM10/9/15
to Google Chrome Developer Tools
This is the wrong group. Please, use stackoverflow.com for web development issues. If you are pretty sure this is a Chrome issue, use crbug.com to report it as an issue (or star an existing issue, if you can find a similar one).

Note - please, continue the discussion elsewhere. You can reply with a link to the found or created issue.
Also, try to give a URL to a complete page instead of making the ones who help you combine the pieces themselves. This makes sure any server issues are still apparent, which may affect the rendering.



PhistucK

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/05725c6a-1d46-41cb-bd51-92ad37114c7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Sergio Zambrano

unread,
Oct 20, 2015, 3:20:12 AM10/20/15
to Google Chrome Developer Tools
Ok, while building the demo, I realized the VW and VH units resolve properly when inside an iFrame, (see the print preview gray box with red border)

https://jsfiddle.net/q94vmduo/6/embedded/result/  (box appears in page 2)

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

https://fiddle.jshell.net/q94vmduo/6/show/light/

I guess I'm submitting a bug report :(

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

Sergio Zambrano

unread,
Oct 20, 2015, 3:27:51 AM10/20/15
to Google Chrome Developer Tools


On Friday, October 9, 2015 at 3:28:14 AM UTC-4, PhistucK wrote:
Note - please, continue the discussion elsewhere. You can reply with a link to the found or created issue.

The Chrome users group said I should post on this one. Please note I can't be taken back and forth because one person decides it.
I'd appreciate if you leave this post open just in case another of the million people around have an answer.
Thanks. 

PhistucK

unread,
Oct 20, 2015, 3:30:24 AM10/20/15
to Google Chrome Developer Tools
I do not know how to "close" it anyway.
You should have continued the discussion in the thread you started at chromium-discuss - where I replied to you a few hours ago precisely for that reason.


PhistucK

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.

Sergio Zambrano

unread,
Oct 20, 2015, 3:41:29 AM10/20/15
to Google Chrome Developer Tools
oh, I just realized I replied the developer tools. I'll post a link to here in the other forum then.
Reply all
Reply to author
Forward
0 new messages