Svg icons in html markup

1 Answer 13 Views
General Discussions
Giuseppe
Top achievements
Rank 1
Giuseppe asked on 07 May 2024, 09:31 PM

Hello,

Until recently, I was using font icons in html markup (k-icon, k-i-imagename), but with a recent update to Telerik for Blazor 5.1.1, these do not work anymore. For components which have a Icon property, I simply replace the FontIcon references with SvgIcon.

However, for icons referenced in markup, I'm not able to get the icons to display, as suggested in Changes in Icon Rendering.

Please advise.

Thank you.

1 Answer, 1 is accepted

Sort by
0
Accepted
Svetoslav Dimitrov
Telerik team
answered on 10 May 2024, 11:07 AM

Hello Giuseppe,

I have two suggestions that might resolve the issue:

1. In your global Imports file, add the FontIcons namespace: @using Telerik.FontIcons

2. Load this stylesheet: <link href="https://blazor.cdn.telerik.com/blazor/5.1.1/kendo-font-icons/font-icons.css" rel="stylesheet" type="text/css" /> below the definition of the theme in your application. 

Here is a REPL snippet where the HTML definition of the font icons works as expected. 

Regards,
Svetoslav Dimitrov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Giuseppe
Top achievements
Rank 1
commented on 10 May 2024, 12:07 PM

Hello Svetoslav,

That's what I ended up doing. I guess I misunderstood the documentation.

Thank you.

Tags
General Discussions
Asked by
Giuseppe
Top achievements
Rank 1
Answers by
Svetoslav Dimitrov
Telerik team
Share this question
or