Closed n4ks closed 4 months ago
Did you find a solution to this?
Okay so the problem is the css variable overrides Explanation: https://stackoverflow.com/a/53240578
My code that solved the issue:
<script lang="ts">
import 'vue-select/dist/vue-select.css'
</script>
<style scoped>
.v-select::v-deep {
--vs-controls-color: rgba(255, 255, 255, 0.2);
</style>
@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.
:tada: This issue has been resolved in version 3.20.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
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-class