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

Wrap :text option text in own tag #135

Closed akaspick closed 9 years ago

akaspick commented 9 years ago

Is there any interest in wrapping the text provided with the :text option in its own tag like a span? This would allow for easier styling via css like adding margins, etc.

Something like:

fa_icon('edit', text: 'Edit') # => <i class="fa fa-edit"></i><span>Edit</span>

Now I can add a margin if there's a label and no margin if there is no label via...

.fa {
  margin-right: 0.2rem;
}
.fa:only-child {
  margin-right: 0;
}
rmm5t commented 9 years ago

Closing for the same reasons as #114. More specifically: https://github.com/bokmann/font-awesome-rails/pull/114#issuecomment-67995869

Have you considered using fa-fw (fixed width icons) instead of the margin-right styling?

fa_icon "edit fw", text: "Edit"
akaspick commented 9 years ago

Thanks. I checked the open issues, but not the closed ones. Thanks for the comment. I'll look into the fa-fw option or just not use the :text option then.