Icon size is not working with vue-fontawesome
vsirghii opened this issue · comments
Need help with icon sizing, icons appear to be too big:
Compare with this repo's demo, my icons above are too big:
Here is my code:
As you can see, rotation
attribute works, but size
doesn't (whatever values I'm trying)
Here are my settings:
import { library } from '@fortawesome/fontawesome-svg-core'
import { faUserSecret, faCode, faDownload } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
library.add(faUserSecret, faCode, faDownload)
And this is from INSPECT view:
Notice that icon renders via svg
(not i
or font-awesome-icon
). Might it be that the size isn't working due to svg
???
Size doesn't work cause the icon have a fixed width & height so you need to change that in css
here a css fix to your problem
.v-sidebar-menu .vsm--link_level-1 .vsm--icon {
padding: 5px;
box-sizing: border-box;
}
Thank you!