I’d like to use simple @media query in css section of a component but I can’t make it work.
I prepared a codesandbox.io here in the component HelloWorld.vue
:
I would expect to change from red to green when squeezing the window… What am I doing wrong? [EDIT: as somebody noted, it's working in some circumstancies, it's still not working if I put this code in a component in vuejs + vuetify (while it works in a component of standard vuejs)]
<style>
.vega {
height: 100px;
background-color: red;
}
@media (max-width: 400px) {
.vega {
height: 40px;
background-color: green;
}
}
</style>
Thanks in advance sandro
SOLVED: it was a bogus invisible char in css selector that prevented it to be applied...