Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 863
Jitendra Vyas Avatar asked Apr 21 '26 22:04

Jitendra Vyas


1 Answers

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.

like image 71
Keith Nicholas Avatar answered Apr 25 '26 17:04

Keith Nicholas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!