⚠️ Pro trial — 2 days remainingAuto-sync, custom domain, no branding, all episodes.Keep my site live
711: The Surprisingly Exciting World of Print + PDF CSS — Syntax - Tasty Web Development Treats
Syntax - Tasty Web Development Treats

711: The Surprisingly Exciting World of Print + PDF CSS

32 min
0:00–:––
Listen on

Show Notes

In this episode of Syntax, Wes and Scott talk about things to consider when printing something from your website or app including loading CSS only for printing, using units in CSS, CSS counters, creating a PDF, naming pages when printing, and more.

Show Notes body { counter-reset: chapter; /* create a chapter counter scope */ } h1:before { content: "Section " counter(chapter) " "; counter-increment: chapter; /* add 1 to chapter */ } h1 { counter-reset: subchapter; /* set section to 0 */ } h2:before { content: counter(chapter) "." counter(subchapter) " "; counter-increment: subchapter; } h2 { counter-reset: section; font-size: 23px; } @page title { @top { /* no header for title pages */ content: “”; } } @page chapter { @top { content: “This is a chapter page”; } } Hit us up on Socials!

Syntax: X Instagram Tiktok LinkedIn Threads

Wes: X Instagram Tiktok LinkedIn Threads

Scott: X Instagram Tiktok LinkedIn Threads

Syntax - Tasty Web Development Treats
1029 episodes
All episodes
🎙️

Have a podcast?

Create its website in 30 seconds with Castly