bokmann / font-awesome-rails

the font-awesome font bundled as an asset for the rails asset pipeline
http://fortawesome.github.com/Font-Awesome/
MIT License
1.86k stars 244 forks source link

Consider supporting fixed-width as a passed option #187

Closed SaladFork closed 7 years ago

SaladFork commented 7 years ago

FontAwesome supports fixed-width icons which are useful when using icons in a list.

This can currently be done with the helper as per:

fa_icon 'user', class: 'fa-fw'
# => <i class="fa fa-user fa-fw"></i>

It would be nicer if this was something that could be passed as per text and right:

# some ideas...
fa_icon 'user', fixed: true
fa_icon 'user', width: :fixed

# => <i class="fa fa-user fa-fw"></i>
rmm5t commented 7 years ago

Try:

fa_icon 'user fw'

or

fa_icon ['user', 'fw']
rmm5t commented 7 years ago

Note: This also works for any FontAwesome modifiers. Examples:

fa_icon "quote-left 4x"
fa_icon "li check-square"
SaladFork commented 7 years ago

Oh awesome, thank you!