Skip to content
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

fix: redundant/suboptimal @font-face definitions #259

Open
PawelDmochowski opened this issue May 17, 2023 · 0 comments
Open

fix: redundant/suboptimal @font-face definitions #259

PawelDmochowski opened this issue May 17, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@PawelDmochowski
Copy link

🐛 The bug

When encountering multiple @font-face definitions addressing the same font (according to "src" attribute) defined in CSS with i.e. multiple unicode-ranges and/or font-weights/styles this module outputs the same override for every definition.

image

🛠️ To reproduce

https://stackblitz.com/edit/github-wrgakp-4yzwmm

🌈 Expected behaviour

Output should either group overrides by "src" attribute eliminating multiplication of CSS or (probably unnecessary) take into account weight/style/unicode-range variations.

ℹ️ Additional context

In the reproduction look at <style type="text/css" data-vite-dev-id="/home/projects/github-wrgakp-4yzwmm/node_modules/.cache/nuxt-google-fonts/css/nuxt-google-fonts.css"> in the <head> section.

@PawelDmochowski PawelDmochowski added the bug Something isn't working label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants