Input CSS plugin

Plugin details

This plugin taps into Rails tag helpers and adds a CSS class equal to the type attribute for all ‘input’ fields.

Websitehttp://rpheath.com/ Repositorygit://github.com/rpheath/input_css.git Author Ryan Heath Tags input, CSS LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install git://github.com/rpheath/input_css.git

Installation
=============
You can install this as a plugin. Navigate to your project root and type:

git clone git://github.com/rpheath/input_css.git vendor/plugins/input_css



After the installation, you’re good to go.

Example(s)
============
Here’s how it works.

Example 1: without existing CSS

<%= f.text_field :name -%>
<pre>
Gives us:
<pre>
< input type="text" class="text" name="user[name]" value="" />

Example 2: with existing CSS

<%= submit_tag 'Fix Me', :class => 'button' -%>

Gives us:

< input name="commit" type="submit" class="button submit" value="Fix Me" />

The CSS. So now, you can do this in your CSS:

input.text     { ... }
input.submit   { ... }
input.file     { ... }
input.checkbox { ... }
input.radio    { ... }

And things are much easier to style :-)

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (4 older versions) | Last edited by: hardway, 7 months ago