Topic: Fontawesome not working with Admin Template
I am trying to use SVG Icons with Admin Template, but When I attach the scripts and css for FontAwesome 5 with SVG it does not look good.
It looks like this without SVG :
When SVG is CSS and JS are added it looks like this :
My Code is as below:
<div class="col-xl-3 col-md-6 mb-4">
<div class="card card-cascade cascading-admin-card">
<i class="fas fa-headset light-green lighten-1"></i>
<h4 class="font-weight-bold dark-grey-text">20000</h4>
<div class="card-body card-body-cascade">
<p class="card-text">Worse than last week (75%)</p>
do you use Admin Dashboard Template? Because these icons work, but these admin cards need custom code which is included only in Admin Dashboard Template and nowhere else.
okay, what SVG icons you want to use? Could you provide any source? Our main icons source is Font Awesome and we do not guarantee the correct operation of other icons.
When you are using SVG it automatically created SVG with PATH and some 'data' attributes and removed dynamically all 'fas, fab, far' classes from HTML and changed it to dependency with JS.
So you have to change every 'fas, fab, far' classes in your SCSS/CSS code to your custom classes, for example, change these classes for 'faz' and add this custom class to your <i> tags where you are using FA5..
For an example:
<i class="fas fa-camera faz"></i>
would you provide any link to the project? Because I'm still not sure how I can help you?
- User: Pro
- Premium support: No
- Technology: jQuery
- MDB Version: 4.5.15
- Device: Windows
- Browser: Chrome
- OS: Windows
- Provided sample code: Yes
- Provided link: No