I'm trying to show a print-preview div (#preview
in examples). Is there a way to use print.css
only for a particular div and its children overriding all local definitions?
Essentially, I would like to be able to do something similar to:
#preview element {
definition equal to definition of an element in print.css
}
in main.css, but for a long list of definitions. It's not too DRY and following option is more coherent.
Second approach would be to include print.css
into the main document and change each definition from
element {
definition
}
to:
element, #preview element {
definition
}
But that seems to me a bit cumbersome.
What would be the best way to solve this problem?
Update just to give an example:
in the main document I have red underlined links, they should be blue undecorated in print version. So when content of preview is dynamically formed, I pop up div where all links should be blue undecorated. But only in that particular div (#preview
), in the rest of the document they still would be red and underlined.