I have a Kendo grid with action buttons inside which contains font-awesome icons inside them. What I want to do is to change the font of the button's text. But when you change the font, it overrides the font-awesome and the icons are not displayed (only empty squares are shown instead, which is the expected behavior).
The generated html is:
<a class="k-button k-button-icontext action-btn fa fa-pencil-square-o k-grid-Edit" href="#" style="font-family: 'Montserrat', sans-serif;">
<span class=" "></span>Edit
</a>
I am gonna share an image of how it looks inside chrome tools: My question is how to I override only the button's content font, not the ::before
which is the actual font-awesome element.
Here's a fiddle to try it.
The problem was that this html element was generated by Kendo UI I am using, not by me. So I had to override the css rules, instead of changing the DOM structure.
I resolved the problem easily using these css rules:
.k-button.fa::before{
font-family: 'FontAwesome';
}
.k-button{
font-family: 'Montserrat', sans-serif;
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments