# font-awesome-sass

> Font-Awesome Sass

Latest version **4.7.0** (published 2017-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install font-awesome-sass
pnpm add font-awesome-sass
yarn add font-awesome-sass
bun add font-awesome-sass
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.7.0 |
| Published | 2017-02-21 |
| First published | 2017-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 925 |
| Author | FortAwesome |
| Maintainers | hinet |

## Links

- npm: https://www.npmjs.com/package/font-awesome-sass
- Repository: https://github.com/FortAwesome/font-awesome-sass
- Homepage: https://github.com/FortAwesome/font-awesome-sass#readme
- Issues: https://github.com/FortAwesome/font-awesome-sass/issues
- npm.io page: https://npm.io/package/font-awesome-sass

## Recent versions

- 4.7.0 (latest) — 2017-02-21

## README

# FontAwesome::Sass

[![Gem Version](https://badge.fury.io/rb/font-awesome-sass.svg)](https://badge.fury.io/rb/font-awesome-sass)

'font-awesome-sass' is a Sass-powered version of [FontAwesome](http://fortawesome.github.io/Font-Awesome/) for your Ruby projects and plays nicely with 
 Ruby on Rails, Compass, Sprockets, etc.
 
 Refactored to support more Ruby environments with code and documentation humbly used from the excellent
 [bootstrap-sass](https://github.com/twbs/bootstrap-sass) project by the Bootstrap team 

## Installation

Please see the appropriate guide for your environment of choice:

* [Ruby on Rails](#a-ruby-on-rails).
* [Compass](#b-compass-without-rails) not on Rails.

### a. Ruby on Rails

In your Gemfile include:

```ruby
gem 'font-awesome-sass', '~> 4.7.0'
```

And then execute:

```sh
bundle install
```

Import the FontAwesome styles in your `app/assets/stylesheets/application.css.scss`. The `font-awesome-sprockets` file
includes the sprockets assets helper Sass functions used for finding the proper path to the font file.

```scss
@import "font-awesome-sprockets";
@import "font-awesome";
```

#### Rails Helper usage

In your view:

```ruby
icon('flag')
# => <i class="fa fa-flag"></i>
```

```ruby
icon('flag', class: 'strong')
# => <i class="fa fa-flag strong"></i>
```

```ruby
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

### b. Compass without Rails

Install the gem

```sh
gem install font-awesome-sass
```

If you have an existing Compass project:

```ruby
# config.rb:
require 'font-awesome-sass'
```

Import the FontAwesome styles

```scss
@import "font-awesome-compass";
@import "font-awesome";
```

## Upgrading from FontAwesome::Sass 3.x

Prepend the `fa` class to existing icons:

3.x Syntax

```html
<i class="icon-github"></i>
```

4.x Syntax

```html
<i class="fa fa-github"></i>
```

---
_Source: https://npm.io/package/font-awesome-sass · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
