css - Any Alternative fix for printing a webpage when designed with vmin/vmax/vw/vh-font-sized texts -
so working on fluid responsive design , text size on website works based on %. realized if try print(cmd+p) website design breaks on chrome. looks pretty old , known issue , not able find hack online make work? can please suggest on this?
issue mentioned here: https://code.google.com/p/chromium/issues/detail?id=382313 here html can try putting on local html page , try printing on chrome:
<!doctype html> <html> <head> <title></title> <style> .vmin { font-size: 10vmin; } .px { font-size: 20px; } .vw { font-size: 10vw; } .vh { font-size: 10vh; } .box { width: 10vw; height: 10vh; border: 1px solid #000; } </style> </head> <body> <div class="vmin"> using vmin - font-size: 10vmin; </div> <div class="px"> using px - font-size: 20px; </div> <div class="vw"> using vw - font-size: 10vw; </div> <div class="vh"> using vh - font-size: 10vh; </div> <div class="box"> inside box - box size: 10vw x 10vh; </div> </body> </html>
also thing if there way can pass view size hardcoded when print called?
<style media="screen"> .vmin { font-size: 10vmin; } .px { font-size: 20px; } .vw { font-size: 10vw; } .vh { font-size: 10vh; } .box { width: 10vw; height: 10vh; border: 1px solid #000; } </style> <style media="print"> /* here css applied exclusively when page printed */ </style>
Comments
Post a Comment