Even without a “printer-friendly” view to print directions, when I choose “File->Print” in my browser, the page is formatted differently than the original view. How does Google achieve this? Is it a special javascript facade?
Even without a printer-friendly view to print directions, when I choose File->Print in my
Share
There’ll be a print stylesheet defined in the code, something along the lines of:
if the stylesheet were contained in a separate file. Or:
if the styles are defined in the body of the code. The last definition shows that the same style can be applied to multiple media types.
I’ve no idea how Google organise their codebase, and it is irrelevant for the purposes of this answer.
Recognised media types are:
From here