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

<pre><code>@media only print {
   nav {
       display:none;
   }
   p {
       color:#000000;
   }
   .etc {
   }
}
</code></pre>

CC BY-SA 3.0
2014-09-27T16:18:41.640Z
2014-09-27T16:18:41.640Z
Douglas McDonald
<p>I don't think so with <code>{% includeCssFile %}</code>, but you can use <code>{% includeCss %}</code> and have it inline.  Something like:</p>

<pre><code>{% includeCss('
    @media print {
        p {
            font-size: 20px;
            color: red;
        }
    }
') %}
</code></pre>

CC BY-SA 3.0
2014-09-27T15:53:22.697Z
You can't just link to the print style sheet using `{% includeCssFile %}` and wrap the styles in `@media only print { myprintstyle1{...} }`?
Douglas McDonald
CC BY-SA 3.0
2014-09-27T18:27:28.657Z
Yeah, there's that too.
Brad Bell
CC BY-SA 3.0
2014-09-27T04:26:56.327Z
2014-09-27T04:26:56.327Z
Brad Bell
<p><code>{% includeCssFile %}</code> can be used to add "regular" css files in the head tag. Is it possible to use this tag for print media?</p>

<css>
Is there a way to use the includeCssFile tag to include a css file for print media?
# Is there a way to use the includeCssFile tag to include a css file for print media?

(Asked by: username_0 on 2014-09-27)

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

**Tags:** css


---

## 2 answers

### Answer by username_1 on 2014-09-27. Score: 3 | Accepted answer

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 {
   }
}


---

### Answer by username_2 on 2014-09-27. Score: 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;
        }
    }
') %}

> **Comments:**
> **username_1**: You can't just link to the print style sheet using `{% includeCssFile %}` and wrap the styles in `@media only print { myprintstyle1{...} }`?  
> **username_2**: Yeah, there's that too.  

---

