Giter VIP home page Giter VIP logo

font-awesome-sass-rails's Introduction

Font Awesome 3.0.2 + SASS + Rails

With SASS and fonts from Font Awesome, font-awesome-sass-rails is a gem to integrate Font Awesome to your Rails application.

It supports Rails 3.1.1 and older.

Installation

Add font-awesome-sass-rails gem to your Gemfile:

gem 'font-awesome-sass-rails'

Then add the stylesheet to your Rails assets. The simplest way to apply Font Awesome site-wide is to add a require statement in app/assets/stylesheets/application.css:

*= require _font-awesome

That's it!

If you want to manage where the stylesheet will be used or just prefer SCSS, you can use @import in a SCSS file (e.g. a new file named libs.css.scss) to import the stylesheet:

@import 'font-awesome';

(By default Rails will import all SCSS files in app/assets/stylesheets, you can change this behavior by modifying application.css.)

You can also use it with the SASS-converted Bootstrap gem, like bootstrap-sass or anjlab-bootstrap-rails. Just require/import font-awesome right after bootstrap.

IE7 Support

This gem also includes font-awesome-ie7, the stylesheet for IE7 support bundled with Font Awesome 3.0.

Use this stylesheet with conditional comment may be the best way to support IE7. But it can be difficult when it comes to assets pipeline. See this article on StackOverflow for a workaround: Using Rails 3.1 assets pipeline to conditionally use certain css

When you try this workaround, in your application-ie.css, append:

*= require _font-awesome-ie7.min

License

The font from Font Awesome is under SIL Open Font License. The SASS & CSS from Font Awesome is under the MIT License.

Others are under MIT license.

font-awesome-sass-rails's People

Contributors

caarlos0 avatar littlebtc avatar narkoz avatar nicoles avatar rmm5t avatar stevenharman avatar tarellel avatar tcarlock avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.