-
Notifications
You must be signed in to change notification settings - Fork 187
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
Linking to fonts in shadow dom #260
Comments
Can You please prepare CodeSandbox (e.g. fork this one - https://codesandbox.io/s/o1fsc)? |
I encountered the same issue, I resolved it by creating a
|
This really works, thanks. |
@allynsweet this seems to me that it adds the font globally ? not scoped or within the shadow root ? |
That is true, but adding it globally shouldn't matter unless for some reason the parent DOM has a font with the same name, but a different font as the shadow DOM (which seems very unlikely). But if it is likely for your use case, you could import the CSS file from your own server and name the font something obscure enough to be functionally unique. |
First of all, thanks for this repo, it plugs a hole that Vue has and React doesn't and it's working great for my project.
I've stumbled across one thing, with shadowDom enabled, I'm linking to fonts from Google they don't appear to work. It does the initial request and pulls the css file, but doesn't then get the WOFF so the font doesn't come through. Or in the case of Material Icons, they're rendered as placeholders.
I've tried importing using
@import url("")
in the scss and also with the<link href=""
tag in the Vue file itself.Any ideas how to get this working? I guess I could hold them locally from an npm package but this doesn't feel right.
Thanks again
The text was updated successfully, but these errors were encountered: