Jitendra Vyas
Jitendra Vyas

Reputation: 152667

Can we write simple css syntax is .scss file?

Can we write simple css syntax is .scss file?

When we use .scss should we wrie anything directly in .css file?

This is the example code of.scss file

$blue: #3bbfce;
$margin: 16px;

.content-navigation {
  border-color: $blue;
  color:
    darken($blue, 9%);
}

.border {
  padding: $margin / 2;
  margin: $margin / 2;
  border-color: $blue;
}

Sometime I just want to write a simple style like

h1 {font-size:3em}

then where we should keep it. in .css only in .scss only?

Should we never touch .css file?

Upvotes: 4

Views: 4909

Answers (1)

Keith Nicholas
Keith Nicholas

Reputation: 44288

Once you go sass, don't use css at all, no point.

you CAN have sass generating css files, and css files you manually edit and seperately include in your HTML. But if you are writing it, then may as well stick with sass for everything. Very soon you will find yourself writing things with variables and in a lot more "modular" way and depending on the extended syntax of sass.

Upvotes: 1

Related Questions