# Duotone Icons

Guide to using and styling Duotone Font Awesome icons in your projects.

> If you're looking to add multiple colors or tones or swap the layer opacity of your icons, you've come to the right place. Who doesn't love a winning flavor combination?

Our Duotone icons (in both the Duotone and Sharp Duotone styles) [work just like all of our other icons](/web/add-icons/how-to.md) but with two distinct shades of color. Duotone is a great effect when you're looking to add more of your brand or an illustrative quality to the icons in your project.

Make sure you're:

- [Set up with Font Awesome](/web.md#web-setup) in your project.
- Familiar with the basics of [adding Font Awesome icons](/web/add-icons/how-to.md).
- An [active Pro-level plan subscriber](https://fontawesome.com/plans) or have a Pro license with access to v7.

  <h4>
    Double the Fun with Less Hassle
  </h4>

All the styles in the Duotone and Sharp Duotone families work with the Duotone styling properties described on this
page. So once you get the hang of styling Duotone icons, take all the Duotone styles for a spin!

## Basic Use

Duotone and Sharp Duotone icons use the same syntax Font Awesome icons, and you can reference them like any other icon. They will inherit whatever color is around them, with the secondary layer being a transparent version of the primary color.

  <div class="fa-3x">
    <i class="icon-padding fa-duotone fa-solid fa-camera"></i>
    <i class="icon-padding fa-duotone fa-solid fa-fire-alt"></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-bus-alt"></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-fill-drip"></i>
  </div>

```html
<div class="fa-3x">
  <i class="fa-duotone fa-solid fa-camera"></i>
  <!-- a solid duotone camera icon -->
  <i class="fa-duotone fa-solid fa-fire-alt"></i>
  <!-- a solid duotone fire-alt icon -->
  <i class="fa-sharp-duotone fa-solid fa-bus-alt"></i>
  <!-- a solid sharp-duotone bus-alt icon -->
  <i class="fa-sharp-duotone fa-solid fa-fill-drip"></i>
  <!-- a solid sharp-duotone fill-drip icon -->
</div>
```

## Swapping Layer Opacity

You can swap the default opacity of each Duotone icon's layers. This will make an icon's primary layer have the default opacity of 40% rather than its secondary layer.

  <div class="fa-3x">
    <i class="icon-padding fa-duotone fa-solid fa-camera"></i>
    <i class="icon-padding fa-duotone fa-solid fa-camera fa-swap-opacity"></i>
    <i class="icon-padding fa-duotone fa-solid fa-fire-alt"></i>
    <i class="icon-padding fa-duotone fa-solid fa-fire-alt fa-swap-opacity"></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-bus-alt"></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-bus-alt fa-swap-opacity"></i>
  </div>

```html
<div class="fa-3x">
  <i class="fa-duotone fa-solid fa-camera"></i>
  <!-- a duotone solid camera icon -->
  <i class="fa-duotone fa-camera fa-swap-opacity"></i>
  <!-- a duotone solid camera icon with swapped opacity -->

  <i class="fa-duotone fa-solid fa-fire-alt"></i>
  <!-- a duotone solid fire-alt icon -->
  <i class="fa-duotone fa-solid fa-fire-alt fa-swap-opacity"></i>
  <!-- a duotone solid fire-alt icon with swapped opacity -->

  <i class="fa-sharp-duotone fa-solid fa-bus-alt"></i>
  <!-- a sharp duotone solid bus-alt icon -->
  <i class="fa-sharp-duotone fa-solid fa-bus-alt fa-swap-opacity"></i>
  <!-- a sharp duotone solid bus-alt icon with swapped opacity -->
</div>
```

  <h4>
    Your Turn!
  </h4>

Swap until you drop with these <a target="_blank" rel="noopener noreferrer"
href="https://codepen.io/fontawesome/pen/yLPEeyz">Codepen opacity-swapping examples</a>.

## Changing Opacity

By default, the secondary layer in a Duotone icon is set to 40% opacity (via an `opacity: 0.4;` rule in Font Awesome's support CSS). You can **explicitly set the opacity of a Duotone icon's layer** by using the [CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) below. New to custom properties? Here are some [recommendations on using them in a project](/web/style/custom.md#using-custom-properties-in-a-project).

| Properties                  | CSS Custom Property      | Accepted Values                                        |
| :-------------------------- | :----------------------- | :----------------------------------------------------- |
| Set Primary Layer Opacity   | `--fa-primary-opacity`   | `0` <i class="fa-regular fa-arrows-h fa-fw"></i> `1.0` |
| Set Secondary Layer Opacity | `--fa-secondary-opacity` | `0` <i class="fa-regular fa-arrows-h fa-fw"></i> `1.0` |

  <div class="fa-3x">
    <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 0.20"></i>
    <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 0.40"></i>
    <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 0.60"></i>
    <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 0.80"></i>
    <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 1.0"></i>
  </div>

```html
<div class="fa-3x">
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 0.20"></i>
  <!--  secondary layer's opacity set to 20% -->
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 0.40"></i>
  <!--  secondary layer's opacity set to 40% -->
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 0.60"></i>
  <!--  secondary layer's opacity set to 60% -->
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 0.80"></i>
  <!--  secondary layer's opacity set to 80% -->
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-secondary-opacity: 1.0"></i>
  <!--  secondary layer's opacity set to 100% -->
</div>
```

<div class="fa-3x">
  <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 0.20"></i>
  <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 0.40"></i>
  <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 0.60"></i>
  <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 0.80"></i>
  <i class="icon-padding fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 1.0"></i>
</div>

```html
<div class="fa-3x">
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 0.20"></i>
  <!--  primary layer's opacity set to 20% -->
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 0.40"></i>
  <!--  primary layer's opacity set to 40% -->
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 0.60"></i>
  <!--  primary layer's opacity set to 60% -->
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 0.80"></i>
  <!--  primary layer's opacity set to 80% -->
  <i class="fa-duotone fa-solid fa-bus-alt" style="--fa-primary-opacity: 1.0"></i>
  <!--  primary layer's opacity set to 100% -->
</div>
```

  <h4>
    Your Turn!
  </h4>

Let's make sure this concept is super &ldquo;transparent&rdquo;. Try <a target="_blank" rel="noopener noreferrer" href="https://codepen.io/fontawesome/pen/LYOrGVq">tinkering with these different opacity examples</a>.

## Coloring Duotone Icons

Like all other Font Awesome icons, Duotone icons automatically inherit CSS size and color. A Duotone icon consists of a **primary** and **secondary** layer. By default, the secondary layer is given an opacity of 40% so that it appears as a lighter shade of the icon's inherited or directly set color.

Using [CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/--*), we've also added some color hooks to a Duotone icon's primary and secondary layers. New to custom properties? Here are some [places to set them](#using-in-a-project).

| Properties                | CSS Custom Property    | Accepted Values                                                                             |
| :------------------------ | :--------------------- | :------------------------------------------------------------------------------------------ |
| Set Primary Layer Color   | `--fa-primary-color`   | Any valid CSS `color` [value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) |
| Set Secondary Layer Color | `--fa-secondary-color` | Any valid CSS `color` [value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) |

<br />

  <div class="fa-3x">
    <i class="icon-padding fa-sharp-duotone fa-solid fa-bus-alt" style="--fa-primary-color: gold;"></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-bus-alt" style="--fa-primary-color: orangered;"></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-fill-drip" style="--fa-secondary-color: limegreen;"></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-fill-drip" style="--fa-secondary-color: rebeccapurple;"></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-battery-full" style="--fa-primary-color: limegreen; --fa-secondary-color: dimgray;"></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-battery-quarter" style="--fa-primary-color: orange; --fa-secondary-color: dimgray;"></i>
  </div>

```html
<div class="fa-3x">
  <i class="fa-sharp-duotone fa-solid fa-bus-alt" style="--fa-primary-color: gold;"></i>
  <!-- primary layer color defined -->
  <i class="fa-sharp-duotone fa-solid fa-bus-alt" style="--fa-primary-color: orangered;"></i>
  <!-- primary layer color defined -->
  <i class="fa-sharp-duotone fa-solid fa-fill-drip" style="--fa-secondary-color: limegreen;"></i>
  <!-- secondary layer color defined -->
  <i class="fa-sharp-duotone fa-solid fa-fill-drip" style="--fa-secondary-color: rebeccapurple;"></i>
  <!-- secondary layer color defined -->
  <i
    class="fa-sharp-duotone fa-solid fa-battery-full"
    style="--fa-primary-color: limegreen; --fa-secondary-color: dimgray;"></i>
  <!-- secondary + primary layer color defined -->
  <i
    class="fa-sharp-duotone fa-solid fa-battery-quarter"
    style="--fa-primary-color: orange; --fa-secondary-color: dimgray;"></i>
  <!-- secondary + primary layer color defined -->
</div>
```

  <h4>
    Your Turn!
  </h4>

Here's <a target="_blank" rel="noopener noreferrer" href="https://codepen.io/fontawesome/pen/ZEaRQeo">a Codepen that
has some coloring examples</a> for you to go cray-cray(ola) with.

## Advanced Use

When you combine all of the coloring, opacity, and other options together, Font Awesome icons get even more awesome. Here are a few ideas on how Duotone icons can take your project to the next level.

### Use Color to Highlight a Part of an Icon or to Note Status

  <div class="fa-3x">
    <i class="icon-padding fa-duotone fa-solid fa-book" style="--fa-primary-color: lightseagreen; --fa-secondary-color: linen; --fa-secondary-opacity: 1.0;"></i>
    <i class="icon-padding fa-duotone fa-solid fa-book-spells" style="--fa-primary-color: mediumpurple; --fa-secondary-color: linen; --fa-secondary-opacity: 1.0;" ></i>
    <i class="icon-padding fa-duotone fa-solid fa-book-medical" style="--fa-primary-color: crimson; --fa-secondary-color: linen; --fa-secondary-opacity: 1.0;" ></i>
    <i class="icon-padding fa-duotone fa-solid fa-book-user" style="--fa-primary-color: peru; --fa-secondary-color: linen; --fa-secondary-opacity: 1.0;" ></i>
    <i class="icon-padding fa-duotone fa-solid fa-toggle-off" style="--fa-primary-color: silver; --fa-secondary-color: gray; --fa-secondary-opacity: 1.0;" ></i>
    <i class="icon-padding fa-duotone fa-solid fa-toggle-on" style="--fa-primary-color: dodgerblue; --fa-secondary-color: lightseagreen; --fa-secondary-opacity: .2;" ></i>
    <i class="icon-padding fa-duotone fa-solid fa-file-plus" style="--fa-primary-color: linen; --fa-secondary-color: limegreen; --fa-secondary-opacity: 1.0;" ></i>
    <i class="icon-padding fa-duotone fa-solid fa-file-exclamation" style="--fa-primary-color: linen; --fa-secondary-color: gold; --fa-secondary-opacity: 1.0;" ></i>
    <i class="icon-padding fa-duotone fa-solid fa-file-times" style="--fa-primary-color: linen; --fa-secondary-color: tomato; --fa-secondary-opacity: 1.0;" ></i>
  </div>

```html
<div class="fa-3x">
  <i
    class="fa-duotone fa-solid fa-book"
    style="--fa-primary-color: lightseagreen; --fa-secondary-color: linen; --fa-secondary-opacity: 1.0;"></i>
  <i
    class="fa-duotone fa-solid fa-book-spells"
    style="--fa-primary-color: mediumpurple; --fa-secondary-color: linen; --fa-secondary-opacity: 1.0;"></i>
  <i
    class="fa-duotone fa-solid fa-book-medical"
    style="--fa-primary-color: crimson; --fa-secondary-color: linen; --fa-secondary-opacity: 1.0;"></i>
  <i
    class="fa-duotone fa-solid fa-book-user"
    style="--fa-primary-color: peru; --fa-secondary-color: linen; --fa-secondary-opacity: 1.0;"></i>

  <i
    class="fa-duotone fa-solid fa-toggle-off"
    style="--fa-primary-color: silver; --fa-secondary-color: gray; --fa-secondary-opacity: 1.0;"></i>
  <i
    class="fa-duotone fa-solid fa-toggle-on"
    style="--fa-primary-color: dodgerblue; --fa-secondary-color: orange; --fa-secondary-opacity: 1.0;"></i>

  <i
    class="fa-duotone fa-solid fa-file-plus"
    style="--fa-primary-color: white; --fa-secondary-color: limegreen; --fa-secondary-opacity: 1.0;"></i>
  <i
    class="fa-duotone fa-solid fa-file-exclamation"
    style="--fa-primary-color: white; --fa-secondary-color: gold; --fa-secondary-opacity: 1.0;"></i>
  <i
    class="fa-duotone fa-solid fa-file-times"
    style="--fa-primary-color: white; --fa-secondary-color: tomato; --fa-secondary-opacity: 1.0;"></i>
</div>
```

### Create Full-Color Icons that Look Like Illustrations

  <div class="fa-3x">
    <i class="icon-padding fa-sharp-duotone fa-solid fa-crow" style="--fa-secondary-opacity: 1.0; --fa-primary-color: dodgerblue; --fa-secondary-color: gold;" ></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-campfire" style="--fa-secondary-opacity: 1.0; --fa-primary-color: sienna; --fa-secondary-color: red;" ></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-birthday-cake" style="--fa-secondary-opacity: 1.0; --fa-primary-color: pink; --fa-secondary-color: palevioletred;" ></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-ear" style="--fa-secondary-opacity: 1.0; --fa-primary-color: sandybrown; --fa-secondary-color: bisque;" ></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-corn" style="--fa-secondary-opacity: 1.0; --fa-primary-color: mediumseagreen; --fa-secondary-color: gold;" ></i>
    <i class="icon-padding fa-sharp-duotone fa-solid fa-cookie-bite" style="--fa-secondary-opacity: 1.0; --fa-primary-color: saddlebrown; --fa-secondary-color: burlywood;" ></i>
  </div>

```html
<div class="fa-3x">
  <i
    class="fa-sharp-duotone fa-solid fa-crow"
    style="--fa-secondary-opacity: 1.0; --fa-primary-color: dodgerblue; --fa-secondary-color: gold;"></i>
  <i
    class="fa-sharp-duotone fa-solid fa-campfire"
    style="--fa-secondary-opacity: 1.0; --fa-primary-color: sienna; --fa-secondary-color: red;"></i>
  <i
    class="fa-sharp-duotone fa-solid fa-birthday-cake"
    style="--fa-secondary-opacity: 1.0; --fa-primary-color: pink; --fa-secondary-color: palevioletred;"></i>
  <i
    class="fa-sharp-duotone fa-solid fa-ear"
    style="--fa-secondary-opacity: 1.0; --fa-primary-color: sandybrown; --fa-secondary-color: bisque;"></i>
  <i
    class="fa-sharp-duotone fa-solid fa-corn"
    style="--fa-secondary-opacity: 1.0; --fa-primary-color: mediumseagreen; --fa-secondary-color: gold;"></i>
  <i
    class="fa-sharp-duotone fa-solid fa-cookie-bite"
    style="--fa-secondary-opacity: 1.0; --fa-primary-color: saddlebrown; --fa-secondary-color: burlywood;"></i>
</div>
```

### Theme Icons with Brand Colors

<div class="fa-3x">
  <i class="icon-padding fa-duotone fa-solid fa-hat-wizard theme-ravenclaw"></i>
  <i class="icon-padding fa-duotone fa-solid fa-flask-potion theme-ravenclaw"></i>
  <i class="icon-padding fa-duotone fa-solid fa-wand-magic theme-ravenclaw"></i>
  <i class="icon-padding fa-duotone fa-solid fa-scarf theme-ravenclaw"></i>
  <i class="icon-padding fa-duotone fa-solid fa-book-spells theme-ravenclaw"></i>
</div>

```html
<style>
  .theme-ravenclaw {
    --fa-secondary-opacity: 1;
    --fa-primary-color: rgb(4, 56, 161);
    --fa-secondary-color: rgb(108, 108, 108);
  }
</style>
<div class="fa-3x">
  <i class="fa-duotone fa-solid fa-hat-wizard theme-ravenclaw"></i>
  <i class="fa-duotone fa-solid fa-flask-potion theme-ravenclaw"></i>
  <i class="fa-duotone fa-solid fa-wand-magic theme-ravenclaw"></i>
  <i class="fa-duotone fa-solid fa-scarf theme-ravenclaw"></i>
  <i class="fa-duotone fa-solid fa-book-spells theme-ravenclaw"></i>
</div>
```

  <h4>
    Your Turn!
  </h4>

Ready for "Advanced Defense Against the Dark Arts" and Duotone Icon Use? Here are some <a target="_blank" rel="noopener
  noreferrer" href="https://codepen.io/fontawesome/pen/GROGooJ">advanced examples you can start from</a> to cast some
real Duotone magic. Want to ace those upcoming O.W.L.s on theming? Check out <a target="_blank" rel="noopener
  noreferrer" href="https://codepen.io/fontawesome/pen/LYOrGGa">even more examples</a>.

## Using in a Project

[CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) are still a pretty new thing for most folks. We've documented [some of the ways you can define them](/web/style/custom.md#using-custom-properties-in-a-project) within your project.

## Accessibility Best Practices

Because Duotone icons are made up of two layers with different color values, they can be more like illustrations than other Font Awesome styles and need extra care for accessibility.

Since they are more complex visually, Duotone icons may be harder to read at smaller sizes. In addition to that, the colors and opacity you choose for each icon's layers can also affect their legibility. Some tips for improving legibility and accessibility:

- Render Duotone style icons at larger sizes (2x your base type size is a good starting point).
- [Test layer colors](https://contrast-ratio.com) together to make sure they have enough [color contrast](https://webaim.org/articles/contrast).
- Test layer colors together to make sure they handle [color-blindness](https://webaim.org/articles/visual/colorblind) scenarios well.

## Custom Icon Uploads Are Like Onions

They now have layers! You can add your very own Duotone creations to a Kit if you have a [Pro-level plan](https://fontawesome.com/plans). Get up to speed on [how best to make some](/web/add-icons/upload-icons/prep-icons.md), and [how to use them](/web/add-icons/upload-icons.md#using-uploaded-icons-in-a-project) once they're in your Kit.

## Duotone Classes

| Class             | Details                                                                                                                                                         |
| :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fa-swap-opacity` | Swap the default opacity of each layer in a Duotone icon<br /> (making an icon's primary layer have the default opacity of 40% rather than its secondary layer) |

## Customization

We've added [CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) to make customizing easier and more efficient. Define your own values for the following properties to [override and customize](/web/style/custom.md#using-custom-properties-in-a-project) Font Awesome's defaults.

| CSS Custom Property      | Details                     | Accepted Values                                                                             |
| :----------------------- | :-------------------------- | :------------------------------------------------------------------------------------------ |
| `--fa-primary-color`     | Set primary layer color     | Any valid CSS `color` [value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) |
| `--fa-primary-opacity`   | Set primary layer opacity   | `0` <i class="fa-regular fa-arrows-h fa-fw"></i> `1.0`                                      |
| `--fa-secondary-color`   | Set secondary layer color   | Any valid CSS `color` [value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) |
| `--fa-secondary-opacity` | Set secondary layer opacity | `0` <i class="fa-regular fa-arrows-h fa-fw"></i> `1.0`                                      |

## Troubleshooting

### Can I use Duotone Icons by using CSS pseudo-elements?

Yes, Duotone icons can be added to your web projects as [CSS pseudo-elements](/web/add-icons/pseudo-elements.md). Doing so is [even more complicated](/web/add-icons/pseudo-elements.md#using-css-pseudo-elements-with-duotone-icons) than the base difficulty of rendering icons with CSS pseudo-elements though. It's recommended only for those who can't control the final markup of their site/project as well as ninjas who want complete control over their markup.

### Doh! The icon I want to use isn't showing up as a Duotone icon!

Let's double-check a few things.

- Are you using the Duotone-specific `fa-duotone` or `fa-sharp-duotone` family prefix?
- Duotone icons are only available with Font Awesome Pro — make sure you have an active Pro-level plan or a Pro license with access to **v5.10.0 or greater** for regular Duotone or **v6.6.0 or greater** for Sharp Duotone icons.
- We release icons pretty frequently these days. Make sure you're using the latest and greatest version, so any new icons you want to use are at your fingertips.
- If you've decided to host your own copy of Font Awesome, check that you've moved all of the files you need to use the icon you want. Also, double-check the paths to those files in your HTML's `<head>`.

### Help! I can't target individual layers!

Make sure you're using the correct custom property values. Also, make sure you haven't defined a custom property that may be overriding things (check inline and in your custom CSS). We don't recommend writing custom CSS to target a specific class or pseudo-element — there are some differences between our Web Fonts and SVG versions of Font Awesome that can make this tricky.

### Can I use Font Awesome styling with Duotone icons?

Yes! You can use any of our [styling options](/web/style.md) - like [sizing](/web/style/size.md) and [animations](/web/style/animate.md) just to name a couple - with Duotone icons. And if you're using the SVG + JS version of Font Awesome, our [power transforms](/web/style/power-transform.md) and [layering](/web/style/layer.md) let you do some pretty amazing stuff.

### I'm using a subsetted Kit and the layers of my Duotone icon look weird!

If you are using a Kit where you have set Icon Selection to "By Icon" or "By Style", it is possible for the layers of your Duotone icon to be rendered separately. This will happen when you try to add a Duotone icon in a style that you have not included in your Kit. Here's the fix:

- If you're using "By Style": Check the style of your icon and make sure the icon in that style is included in the styles you have included under Icon Selection.
- If you're using "By Icon", make sure you have included the icon in that style in your selected icons.

### Help! My Duotone icon is cut off in Safari!

Safari clips a Duotone icon's secondary layer when it reaches past the [Icon Canvas](/web/style/icon-canvas.md). Web Fonts + CSS only. `fa-sun` and the `fa-message-*` icons are the ones you'll notice. It's [a WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=294556).

Pad the secondary layer, but scope it to Safari:

```css
@supports (-webkit-hyphens: none) {
  i[class*='fa-']::after {
    padding-block: 0.1em;
  }
}
```

That `@supports` line is load-bearing. Unscoped, the padding lands on a fractional device pixel in Chromium and knocks the two layers about a pixel apart.

The broad selector is fine. A non-Duotone `::after` has no content, so there's no box to pad.

  <h4>
    See the Clipping and Fix in Safari
  </h4>

We render icons on this site with SVG + JS, which never crop. To see the issue, open this [Web Fonts + CSS demo on CodePen](https://codepen.io/fontawesome/pen/xbgyXqm) in Safari.

### Do Duotone icons work with all browsers?

Yep! They work in all the browsers that we list on our [Browser Support](/web/dig-deeper/browser-support.md) page. One quirk worth knowing: [Safari clips Duotone secondary layers](#help-my-duotone-icon-is-cut-off-in-safari). A few lines of CSS fixes it.
