Hi,
Is there any way how to convert CSS to SCSS?
just simple like generate install scss into vue, the methods will below:
npm install -D sass sass-loader@^10
after installed completed, the next thing you must do is install node-sass
npm install -S node-sass
after installation is completed, You’re able to use scss inside your project.
You can make your variable as well as change its value like this
:root{
–my-colour: #fff;
}
Now you can assign --my-colour to your scss variable as well so you wont have to do change in multiple places:
$theme : var( --my-colour );
@whitersun Thanks mate, cant wait to try
@whitersun Opps! It’s not working…
I installed below and change variable.css to variable.scss and stll got the error
npm install -D sass sass-loader@^10
npm install -S node-sass
did you try change the direct file name in main.js?
Cus the problem is in you main.js of variable is css file, so that why system will call errors.
Perfect thanks mate