Comments (2)
would live to have some guidance here, too!
from printd.
The reason is that you are using a script (that is injected) but it includes styles dynamically and for some reason, those are not injected when the iframe loads.
For example, If I have a script file my_script.js
and use it as a script URL then it works.
// my_script.js
window.onload = () => {
const cssText = `
/* some tailwind styles */
`
const doc = window.document
const style = doc.createElement("style")
style.appendChild(doc.createTextNode(cssText))
doc.head.appendChild(style)
}
// main.js
const d = new Printd()
d.print(element, [], ['https://website.com/my_script.js']
Maybe the tailwind script is injecting its styles but not on window.onload
. No idea.
But the script has a warning: cdn.tailwindcss.com should not be used in production. To use Tailwind CSS in production, install it as a PostCSS plugin or use the Tailwind CLI: https://tailwindcss.com/docs/installation
What you can do is prefer to include style text or .css
files rather than script files that inject other styles dynamically.
from printd.
Related Issues (20)
- Print chartjs HOT 1
- Error on several pages HOT 1
- Printd event `beforeprint` and `afterprint` not work HOT 2
- Cannot create Printd instance passing options object. HOT 1
- Wrong behaviour when passing list of styles HOT 4
- Headers and Footer HOT 2
- Pass Authentication Headers via printURL. HOT 1
- Change title HOT 2
- Broken in IE11 HOT 5
- Insert page # in footer HOT 4
- Print selected value in select tag html HOT 2
- Using css file HOT 4
- Background colors do not show up HOT 1
- Print a vue route with params HOT 4
- Not showing the browser's print window when printing an URL HOT 18
- Fix demo printing currently selected options HOT 1
- Printd event `afterprint` not work on Chrome HOT 3
- printURL does not work? HOT 4
- Second print Empty HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from printd.