Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change charset in SASS (SCSS)

Tags:

css

sass

When working on web projects I'm using css preprocessor SASS with SCSS syntax. In the comments, I like to write what the following code does, I write comments in my language (in czech). Unfortunately, when you compile it throws me the error coding. I'm using for compilation app Koala.

Error msg by compilation:

 Error: Invalid US-ASCII character "\xC5" on line 7 
 of /Users/martinjinda/Documents/www/_welcome_screen/local/sass/main.scss 
 Use --trace for backtrace.

SCSS code:

 // ---------------------------------------------------------------------------
 // Import všech zdrojových souborů a následná kompilace do /css/main.css

 @import 'reset.scss';
 @import 'typo.scss';
 @import 'mixins.scss';
 @import 'layout.scss';
 @import 'content.scss';
like image 951
Mardzis Avatar asked Dec 22 '14 10:12

Mardzis


People also ask

Can we change in SCSS to CSS?

If you click on the title CSS (SCSS) in CodePen (don't change the pre-processor with the gear) it will switch to the compiled CSS view. There's now an eye icon on the right that does the job. You know have to click the 'View Compiled' button near the top of the CSS tab.

Can I use sass in SCSS?

It is Sass that will generate a CSS file for us with the same code. To start, create a folder with two folders inside, CSS and images. Then inside the CSS folder create a file with the Sass extension – in my case it's style. scss.

How do I change a SCSS file?

SCSS files are created by right clicking the Styles group in the Design panel and choosing the New > SCSS File option. To edit a . scss file, double click it. This will open it in our code editor.


1 Answers

Try @charset "UTF-8"; on the beginning of file, before any spaces, comments.

like image 149
Pavelloz Avatar answered Sep 23 '22 12:09

Pavelloz