Stylesheet_link_tag

The API documentation found at
http://rubyonrails.org/api/classes/ActionView/Helpers/AssetTagHelper.html

does not explain the media option. Can someone please explain this
option? TIA.

It’s usually used for targetting stylesheets to various situations. You
can have stylesheets that are used when printing, stylesheets that are
used for mobile devices, etc.

Lots more here: http://www.google.com/search?q=css+media

Bala P. wrote:

The API documentation found at
http://rubyonrails.org/api/classes/ActionView/Helpers/AssetTagHelper.html

does not explain the media option. Can someone please explain this option? TIA.


Lance I.
Web Applications Developer
RBS Interactive
[email protected]

I believe it does (excerpt):

stylesheet_link_tag “style”, :media => “all” # =>

So if I wanted a print stylesheet i would use

stylesheet_link_tag “style”, :media => “print”

Sorry, I was thinking that it didn’t say how to use it. I apologize.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs