font-awesome-sass-rails icon indicating copy to clipboard operation
font-awesome-sass-rails copied to clipboard

@extend support?

Open msisto opened this issue 12 years ago • 3 comments

I posted this in the Font Awesome GH project as well...

Maybe I am missing something, but it appears that you can't extend an icon into an element?

For example:

a.edit-thingie {
  @extend .icon-edit;
  color: blue;
}

But <a href="" class="icon-edit"></a> on its own, works as expected.

msisto avatar Jun 20 '12 16:06 msisto

Honestly, not a single response from anyone?

iredmedia avatar Oct 05 '12 18:10 iredmedia

I use the following mixin, which works quite well unless you're using media queries.:

=icon($name)
  &:before
    font-family: FontAwesome
    font-weight: normal
    font-style: normal
    display: inline-block
    text-decoration: inherit
    margin-right: 0.4em
  @extend .icon-#{$name}

So then you could do:

a.edit-thingie {
  @include icon('edit');
}

ejholmes avatar Oct 08 '12 20:10 ejholmes

I think font-awesome-sass-rails should just remain as a light wrapper around Font-Awesome core. If you'd like an icon mixin, I think that should only be addressed in the FortAwesome/Font-Awesome repo.

I vote for closing this issue.

rmm5t avatar Jan 13 '13 04:01 rmm5t