Signup/Sign In

Converting from SCSS to SASS and vice versa

SASS and SCSS are two sides of the same coin. With some minor differences in their syntax like SCSS using the semicolons, and SASS using indentation, it's your choice what you want.

Whatever you choose, you can always covert one style into another style.

Yes, if you have your stylesheet written in SCSS, you can convert it into SASS code and if you have your stylesheet written in SASS you can convert it into SCSS code.

Either syntax can import the file written in another syntax. At this point, there is no need to rewrite the file in another syntax. The files can be converted using some simple command-line tool i.e. sass-convert.

/* to convert Sass syntax to SCSS syntax */
$ sass-convert style.sass style.scss

/* To convert SCSS Syntax to Sass syntax */
$ sass-convert style.scss style.sass

Where the first file after the command is the source file and the second file indicates destination file.



About the author:
I like writing content about C/C++, DBMS, Java, Docker, general How-tos, Linux, PHP, Java, Go lang, Cloud, and Web development. I have 10 years of diverse experience in software development. Founder @ Studytonight