-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stretched Icons when building project #1002
Comments
Would passing the options to the plugin like mentioned in egoist/tailwindcss-icons#24 solve your issue? We could imagine the |
I'm still having this bug, even after adding the |
I'm having the same issue as lavoscore @benjamincanac - even on edge. I saw it was merged to dev, but I'm not sure how often edge is updated w/ dev - safe to assume it should be there? Also, not sure if it matters, but I'm using fontawesome pro w/ iconify. |
+1 Still an occurring issue, development is fine but building wise it stretches them out, building with SSR off on my end, and I'm not using fontawesome pro :) |
Adding |
i have the same issue(( |
@benjamincanac - I just resolved it by removing the 'webkit' prefix on the extraProperties. If someone else can give it a shot, this might just be a documentation update.
|
@shurth Thanks! I can confirm it works for me as well without the 'webkit' prefix. Here is my UI icons configuration in my nuxt.config.ts: import { getIconCollections } from '@egoist/tailwindcss-icons'
export default defineNuxtConfig({
ui: {
icons: {
extraProperties: { 'mask-size': 'contain', 'mask-position': 'center' },
collections: { ...getIconCollections(['fa6-solid', 'circle-flags', 'simple-icons']) },
},
},
...
}) |
What browser are you using? Should you not keep those with |
I'm using Chrome and Brave (Chromium), for both it works by removing the |
Environment
Version
v2.10.0
Reproduction
https://stackblitz.com/edit/nuxt-ui-6ersbm
Description
Icons from FontAwesome 6 are being stretched when executing the
nuxi generate
ornuxi build
commands. The root cause of this issue is the removal of theviewBox
attribute from the SVG data used for themask-image
. Unfortunately, I am unable to address this issue on my own. However, I came across some discussions that may be relevant:viewBox
attribute getting stripped in HTML parcel-bundler/parcel#1523removeViewBox
option will not work cpsoinos/nuxt-svgo#54Additionally, I found a potential solution in case preventing the removal of the
viewBox
attribute proves to be challenging:I assume this problem will affect all icon sets that have non-square icons.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: