cancel
Showing results for 
Search instead for 
Did you mean: 

css/print.css as media="print"

css/print.css as media="print"

Hi,

 

do I really need this additional css in Magento?

<action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>

What happens if I remove it?

 

I would like to get better score in GTMetrix, and it makes a problem saying: This page has 2 external stylesheets. Try combining them into one.

 

Please advise

 

4 REPLIES

Re: css/print.css as media="print"

Hi,

 

css/print.css uses for pre-printing UI (user interface) in Magento. For example, when customers log into their account:  MY ACCOUNT > MY ORDERS > choose an order > Print Order > you can see:

 

 

This page has 2 external stylesheets. Try combining them into one. => In temporary way, you can remove <params>media="print"</params>. This file will be loaded through your front site.

<action method="addCss"><stylesheet>css/print.css</stylesheet></action>  

 

Problem solved? Click Accept as Solution!

Re: css/print.css as media="print"

Hi,

 

I don't think it's a good solution by removing: <params>media="print"</params>

 

because it breaks the main website...

 

better solution would be remove this: <action method="addCss"><stylesheet>css/print.css</stylesheet></action>

 

Am I right?

Re: css/print.css as media="print"

Hello,

 

You can do this. However, you should test it-your order UI before removing.

Problem solved? Click Accept as Solution!

Re: css/print.css as media="print"

This CSS is meant to be used whenever you print page. This way you can remove background images, headers, sidebars and footers that doesn't make any sense one paper. If you remove media="print" then this CSS is used for display styles as well which can lead to all kind of weird things, none of them good.

Tanel Raja