GitXplorerGitXplorer
h

font_awesome_rails

public
4 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
a794d537e25031d426875f72df3b473008a87637

Version bump

hhaines committed 12 years ago
Unverified
e39404677a0712322e7881598095b34d3f4f59ea

Point homepage to gh-pages

hhaines committed 12 years ago
Unverified
0288be65f2ee447945c96b8d5935e1b753f884df

Format dropdown menus with icons the same as tabs

hhaines committed 12 years ago
Unverified
f9f79a0bcd9e77bc543f81e86b139754006c0900

Version bump

hhaines committed 12 years ago
Unverified
19dfa185b5cb09bf09ca78a0e74a6223019b4cb7

Better styling

hhaines committed 12 years ago
Unverified
cec92a81c15949ba43f306c4e7f291c203eed5a7

Remove leftover @extend

hhaines committed 12 years ago

README

The README file for this repository.

Font Awesome for Rails

Code Climate

font_awesome_rails brings the fantastic Font Awesome iconic font to the Rails asset pipeline, with a bunch of new Sass styles for semantic markup.

Semantic markup

Wouldn't be great if instead of

<a class="btn" href="..."><i class="icon-pencil"></i> Edit</a>

you could just write

<a class="edit btn" href="...">Edit</a>

so that down the line you can restyle your edit links with impunity (and save yourself some keystrokes while you're at it)?

Thanks to the mixins provided by font_awesome_rails, you can!

.edit.btn {
  @include icon(pencil);
}

Installation

Add this line to your application's Gemfile:

gem 'font_awesome_rails'

And then execute:

$ bundle

Finally, add this line to your application.css.scss:

@import 'font-awesome';

Note that you need to @import it with Sass and not *= require it with Sprockets.

Usage

For usage examples, see the project page.

Compatibility

If you've already integrated your app with Bootstrap and/or Font Awesome, you can get the classic .icon-* styles back by adding

@import 'font-awesome/classic';

to your application.css.scss.

If you're unlucky enough to need IE 7 compatibility, it's under font-awesome/ie7. Classic styles only (no mixins) so you can @import or *= require it as you see fit.