1

{% includeCssFile %} can be used to add "regular" css files in the head tag. Is it possible to use this tag for print media?

3

You can use the {% includeCssFile %}, you just need to make sure and wrap all of the styles in the print stylesheet with @media only print { } or @media print { }

@media only print {
   nav {
       display:none;
   }
   p {
       color:#000000;
   }
   .etc {
   }
}
0
1

I don't think so with {% includeCssFile %}, but you can use {% includeCss %} and have it inline. Something like:

{% includeCss('
    @media print {
        p {
            font-size: 20px;
            color: red;
        }
    }
') %}
2
  • You can't just link to the print style sheet using {% includeCssFile %} and wrap the styles in @media only print { myprintstyle1{...} }? Sep 27 '14 at 15:53
  • Yeah, there's that too.
    – Brad Bell
    Sep 27 '14 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.