Skip to content

Commit

Permalink
master - add example for font replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
hexa-3d committed Mar 29, 2024
1 parent 70463b3 commit b6a2370
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,44 @@ <h3 class="ui header">customize styling</h3>
new Accessibility(options);
</p>
</code>
<br>
<p>
Another example with <code>font-awesome</code> icons:
</p>
<code>
const options = {
<p class="b-space-1">
icon: {
</p>
<p class="b-space-2">
fontFaceSrc: ['https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/v4-font-face.min.css'],
</p>
<p class="b-space-2">
fontFamily: '"FontAwesome"'
</p>
<p class="b-space-1">
}
</p>
};
<p>
new Accessibility(options);
</p>
<p>
:root {
<p class="b-space-1">
--_access-menu-item-icon-increase-text: "\f062";
</p>
<p class="b-space-1">
--_access-menu-item-icon-decrease-text: "\f063";
</p>
<p>
}
</p>
</p>
</code>
<p>
Obviously you will need to add the missing variables for the rest of the fonts.
</p>
</div>

<div class="ui raised segment" id="module-order">
Expand Down

0 comments on commit b6a2370

Please sign in to comment.