Skip to content

whroman/font-awesome-sass

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Font::Awesome::Sass

Font-Awesome SASS gem for use in Rails or Compass projects

* NOTE: Working on supporting other environments *

Installation

Add this line to your application's Gemfile:

gem 'font-awesome-sass'

And then execute:

$ bundle

Or install it yourself as:

$ gem install font-awesome-sass

If you use Rails add this to e.g. application.css.scss:

*= require font-awesome

Upgrading from 3.*

Prepend the fa class to existing icons:

3.* Syntax
<i class="icon-github"></i>

4.* Syntax
<i class="fa fa-github"></i>

Rails Helper usage

In your view:

icon('flag')
# => <i class="fa fa-flag"></i>
icon('flag', '', class: 'strong')
# => <i class="fa fa-flag strong"></i>
icon('flag', 'Font Awesome', id: 'my-icon', class: 'strong')
# => <i id="my-icon" class="fa fa-flag strong"></i> Font Awesome

Note: the icon helper can take a hash of options that will be passed to the content_tag helper

About

Font-Awesome SASS gem for use in Ruby/Rails projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published