There must be a really simple solution I have tried everything.
App.vue file
<style lang="scss" scoped>
@import 'src/assets/styles/_variables.scss'
img {
height: $height;
}
</style>
_variables.scss file
height: 27px;
Even if I move img { height: $height; } I still get an error. For the life of me I just want access to $height from an imported scss file. This must be so simple?
error seen in this screen shot: screenshot of error Raw Error:
ERROR in ./~/css-loader?{"minimize":false,"sourceMap":false}!./~/vue-loader/lib/style-compiler?{"id":"data-v-06ade8f3","scoped":false,"hasInlineConfig":false}!./~/sass-loader/lib/loader.js?{"sourceMap":false}!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue
Module build failed:
img {
^
Invalid CSS after "img": expected 1 selector or at-rule, was "{"
in /Applications/MAMP/htdocs/vuejs-portfolio/src/App.vue (line 63, column 4)