-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
vue-select.css styles are not applied to the web component #1680
vue-select.css styles are not applied to the web component #1680
Comments
Did you find a solution to this? |
Okay so the problem is the css variable overrides My code that solved the issue:
|
@n4ks I don't have any experience with web components unfortunately. If you could provide a https://codesandbox.io to demonstrate, that'd be much appreciated and maybe I can get that fixed. |
🎉 This issue has been resolved in version 3.20.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug
When I work on a project in dev mode there is no problem, but as soon as I build an application as a web component, the styles are not applied.
I managed to find that the problem is that the css variables in the vue-select.css file are in the
:root
pseudo-class and if I replace it with:host
everything works fine. Honestly I have no idea how to fix this without changing the library styles manually.Steps To Reproduce
@import 'vue-select/dist/vue-select.css';
)"build": "vue-cli-service build --target wc --name weather-widget ./src/components/weather-widget.vue"
I also want to note that not only the styles that I override are broken, but in general all of the styles that use css variables from the file vue-select.css
Expected behavior
Styles are applied after the web component is built.
Screenshots
:root
pseudo-class:host
pseudo-classThe text was updated successfully, but these errors were encountered: