Credit Card icons

Credit Card icons for Rails 3.

This gem is a Rails 3 engine and includes a host of asset files including standalone image sets (icons), CSS sprites and stylesheets for the CSS sprites.

Usage

In Gemfile.

gem 'credit_card_icons'

Install via bundler:

bundle

Include the stylesheet(s) of choice in your Rails 3 stylesheets application manifest file, fx application.css or similar:

/*
 *= require credit_cards_default
*/

Using Compass, include stylesheet(s) via @import 'credit_cards_default'; instead.

Use the cards via CSS classes like this:

Stylesheets available

Default

%ul.cc
        %li.card.mastercard

Also sizes 32 and 64 and 128px wide, use: cc_24 and cc_32

Straight

Sizes 32, 64 and 128px wide, use: cc_32, cc_64 or cc_128.

%ul.cc_64
  %li.straight_card.mastercard

Curved

Sizes 32, 64 and 128px wide.

%ul.cc_64
  %li.curved_card.mastercard

Not that here the HTML structure is defined using HAML syntax.

Please see the asset directory css files for how to use your stylesheet of choice. Feel free to improve this gem by modifying the css rules and/or include view helpers etc.

Contributing to credit_card_icons

Copyright © 2012 Kristian Mandrup. See LICENSE.txt for further details.