Stylesheets For All plugin

Plugin details

In a call to stylesheet_link_tag Rails will set media=screen which means that by default if you print a web page it will look nothing like what it looks like one the screen. This plugin changes it so the default is method=all.

Repositorysvn://svn.pjkh.com/rails/plugins/stylesheets_for_all Author Philip Hallstrom Tags CSS LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install svn://svn.pjkh.com/rails/plugins/stylesheets_for_all

Example
==========

stylesheet_link_tag("style") 
# < link href="/stylesheets/style.css" media="all" rel="stylesheet" type="text/css" />
stylesheet_link_tag("style.css") 
# < link href="/stylesheets/style.css" media="all" rel="stylesheet" type="text/css" />
stylesheet_link_tag("/dir/file") 
# < link href="/dir/file.css" media="all" rel="stylesheet" type="text/css" />
stylesheet_link_tag("dir/file") 
# < link href="/stylesheets/dir/file.css" media="all" rel="stylesheet" type="text/css" />
stylesheet_link_tag("style", :media => "screen") 
# < link href="/stylesheets/style.css" media="screen" rel="stylesheet" type="text/css" />
stylesheet_link_tag("random.styles", "/css/stylish") 
# < link href="/stylesheets/random.styles" media="all" rel="stylesheet" type="text/css" />
# < link href="/css/stylish.css" media="all" rel="stylesheet" type="text/css" />
stylesheet_link_tag("http://www.example.com/styles/style") 
# < link href="http://www.example.com/styles/style.css" media="all" rel="stylesheet" type="text/css" />

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: hardway, 3 months ago