input_css icon indicating copy to clipboard operation
input_css copied to clipboard

Rails plugin: provides a default CSS class on all INPUT fields based on the type attribute - perfect for designers.

h1. Input CSS

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

h2. Reasoning...

One of the biggest pains when designing forms is dealing with the input field. It's both a button and a text box. And you NEVER want them to look the same (and if you do, your issues are far past what this plugin has to offer).

And of course, this plugin exists mainly because of IE6's lack of CSS2 support. Blah.

h2. 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.

h2. Example(s)

Here's how it works.

h3. Example 1: without existing CSS

Gives us:

h3. Example 2: with existing CSS

 'button' -%>

Gives us:

h2. 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 :-)

h2. License

Copyright (c) 2008 Ryan Heath (http://rpheath.com), released under the MIT license