We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be really cool to provide a way to import google's icons using the following configuration :
googleFonts: { // ref : https://fonts.google.com/icons icons: { filled: true, weight: 500, grade: 0, size: 20 } }
and then using the following code :
<p> Description icon : <span class="material-symbols-outlined">description </span> </p>
or even
<p> Description icon : <material-icon>description</material-icon> </p>
The text was updated successfully, but these errors were encountered:
Sounds nice but this will download the variable or static icon?
In a nuxt 3 project I am using this configuration and it seems to work pretty well:
families: { ... /* main fonts */ 'Material Symbols Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200': true, },
Then on my CSS I have:
.material-symbols-outlined { &.-empty { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48; } &.-filled { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48; } &.-slim { font-variation-settings: 'FILL' 0, 'wght' 100, 'GRAD' 0, 'opsz' 48; } }
Which allows me to use a reusable component with variants:
<script lang="ts" setup> interface Props { icon: string variant?: '-empty' | '-filled' | '-slim' } const props = withDefaults(defineProps<Props>(), { variant: '-empty', }) </script> <template> <span :class="['material-symbols-outlined', variant]">{{ icon }}</span> </template>
So, it'll be nice to have this option to be able to get the variable font as well:
googleFonts: { // ref : https://fonts.google.com/icons icons: { filled: '0..1', // Maybe allowing number | string ? weight: '100..700', grade: '-50..200', size: '20...48' } }
Sorry, something went wrong.
No branches or pull requests
It would be really cool to provide a way to import google's icons using the following configuration :
and then using the following code :
or even
The text was updated successfully, but these errors were encountered: