Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use Scss files in CodeSandbox?

I haven't used SASS or SCSS in anything besides codepen before so apologies if this is a basic question, but my CSS was working fine, but I wanted to nest some tags, and when I setup the SCSS and SASS dependencies and changed my filename to .scss, all of my formatting went away. I read something somewhere about importing an scss file into the css file, but I'm not really sure how to accomplish that.

Here's a link to the code sandbox: https://codesandbox.io/s/oj15rk1vw9

like image 333
Cdhippen Avatar asked Jul 21 '18 05:07

Cdhippen


People also ask

How do I import SCSS into HTML?

You can not "import" a SASS/SCSS file to an HTML document. SASS/SCSS is a CSS preprocessor that runs on the server and compiles to CSS code that your browser understands. Save this answer.

How do I view a SCSS file?

Open up Terminal and type the command cd desktop/project . This will bring you to the correct working directory on your desktop. Once you're in the project directory, write the command sass --watch scss:css to begin auto-compiling your Sass to CSS—provided you've already created the “scss” directory.


1 Answers

If you just change all instances of style.css to style.scss then it'll work

like image 195
A7DC Avatar answered Sep 28 '22 02:09

A7DC