DEV Community

Discussion on: STOP writing CSS, 10 reasons why

Collapse
 
aspiiire profile image
Aspiiire

Yes i knew that comment was coming hahha, but are not the same as SASS one

Collapse
 
sno2 profile image
Carter Snook

Sass variables are definitely not the same as CSS variables. Sass is a pre-compiled language; therefore, you never run sass in the browser. Sass compiles your code into regular css. It doesn't use CSS Variables. Here is an example sass file:

$myColor: #fff;
html
  color: $myColor
Enter fullscreen mode Exit fullscreen mode

and the compiled file:

html {
  color: #fff;
}
Enter fullscreen mode Exit fullscreen mode

As you can see, we don't have to use the CSS variables which aren't supported by all browsers.