Videos
Check out our tutorial video series.
Configure Tailwind to prefix classes with custom media queries for print stylesheets - learn how with this tutorial! #TailwindCSS #printstyles
If you need to a (print stylesheet) for your website and you use Tailwind you can customize the
to include custom media queries.
The appearance of a website often differs when printed or saved as a PDF. For that reason it is useful to define CSS styles that only apply to printers or PDFs (or devices that satisfy the media query).
Extend the standard tailwind config in a file itesting-email-with-cypressn your project root.
This means we can use classes such as to apply a margin to an element only for print styles.
Here is an example using React. Notice the class names that have a prefix.
This is an example of how flexible Tailwind CSS can be. It lets you configure print styles using custom media queries so that you can use all the standard tailwind classes with a prefix to apply the rule's styles only when a print media query is satisfied.
In the screenshot below we can see a website with a print dialog above it showing the print and screen styles together. Notice the difference that was achieved using the tailwind css print media queries:
Check out our tutorial video series.
Email and SMS guides for automation and testing.
View github project code for multiple languages.
Latest posts from the MailSlurp team.
Test, build, and automate messaging with a free MailSlurp account.