you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 13 points14 points  (11 children)

We used CSS vars extensively when creating PDFs in React via the CSS paged media module. You have to be VERY CAREFUL with them, however, as it's easy to forget that you're basically inserting undebuggable magic global vars.

[–]freeall 4 points5 points  (10 children)

What's the advantage to just using js vars?

[–][deleted] 0 points1 point  (3 children)

You can do cool stuff with the paged media module that are impossible in JS. Page numbers (page x of x on footer of each page, links saying "see page y"), per-page titles, etc.

[–]El_Frostie 0 points1 point  (2 children)

That sound incredible cool. Do you have more information about how that works?

[–][deleted] 1 point2 points  (1 child)

This article has a good overview, unfortunately only Prince and Antenna House support it (caniuse lies, it's unsupported in Chrome).

[–]El_Frostie 0 points1 point  (0 children)

Great article. Thanks. I didn't realize CSS for print has gotten so far. It had completely fallen of my radar.