Skip to content

Stacked Icon Helper #59

@jtrost

Description

@jtrost

There should be a helper for stacked icons. Using the example from: http://fortawesome.github.io/Font-Awesome/examples/#stacked

<span class="fa-stack fa-lg">
  <i class="fa fa-camera fa-stack-1x"></i>
  <i class="fa fa-ban fa-stack-2x text-danger"></i>
</span>

Right now this could be implemented using the icon helper like this:

<span class="fa-stack fa-lg">
  <%= icon("camera", "", class: "fa-stack-1x") %>
  <%= icon("ban", "", class: "fa-stack-2x text-danger") %>
</span>

I think there should be a helper specifically for stacked icons. It could be written like this:

<%= stacked_icon(
  icon("camera", "", class: "fa-stack-1x"), # The first icon to stack
  icon("ban", "", class: "fa-stack-2x text-danger"), # The second icon to stack
  class: "fa-lg" # Additional classes for fa-stack
) %>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions