crabbly / Print.js

A tiny javascript library to help printing from the web.
MIT License
4.28k stars 672 forks source link

style is not working #612

Closed k-kawaa closed 1 year ago

k-kawaa commented 2 years ago

printJS config style is not working. For example, this link program settings font-color "red" , but it is not working.

https://codesandbox.io/s/printjs-fontsize-forked-g5dtl?file=/src/index.js

jq5 commented 2 years ago

try this:

body {margin: 0;font-size: 36px;} .card-number {font-size: 52px!important;color: red!important;}",

or

body {margin:0;font-size:36px;} .card-number {font-size:52px!important;color:red!important;}",

instead of:

body { margin: 0; font-size: 36px; } .card-number { font-size: 52px!important; color: red!important; }",

removing spaces makes it work for me :)

hope this helps,,

J

hariacharya80 commented 1 year ago

seems fine!

k-kawaa commented 1 year ago

Thank you so much! I apologize for late replay.