This project is archived and is in readonly mode.
stylesheet_link_tag media default
-
Marjan Krekoten'
Did you try :media option?
stylesheet_link_tag "style", :media => "print" -
Lake
I agree with Marjan. You can pass the "media" option to set it to print.
-
Lake
- Tag set to invalid
-
Rohit Arondekar
- State changed from new to invalid
- Importance changed from to Low
-
tgrayson
I wholly understand what you guys are saying, and I entirely agree with you. If I want to add a print only style sheet to MY website, I can use the :media => "print". I do, that's good. What I'm claiming is an issue, is that other people don't know this, or expect this. Since :media isn't set to ALL by default, the entire community is afflicted with bad experiences in non desktop media by default. For example. Look on http://rubyonrails.org/ in the "Who is already on rails?" section. The poster children of rails. Print any of those sites, aside from Yellowpages. Shopify, Groupon, github, twitter, basecamp all fall apart if you try to print them.
Now, I know I can't prove what their code is without looking at it, but I've noticed this across many other rails sites. I'd wager to say that all 5 of these websites didn't intentionally set their media to screen intentionally, ensuring that printing their webpages would be unstyled procedural HTML. They are probably just doing a standard include, which specifies screen, instead of all, so: printing, projection, and the rest of the lot are not considered.
Does this make more sense?
I think by default, people would like to have their prints look like their webpage, rather than be unstyled.