SCSS Import

SCSS Import is used to import the partial SCSS which have been created. It is imported using '@import'. Lets consider the example below to import _reset.scss into main.scss.

Code Structure:
// reset.scss
html,
body,
ul,
ol{
  margin: 0;
  padding: 0;
}

// main.scss
@import 'reset';

body{
  font: 20px $primary-font;
  color: $primary-color;
}

Result:
html, body, ul, ol {
  margin: 0;
  padding: 0;
}

body {
  font: 20px 'Arial', sans-serif;
  color: #000;
}

Share this

Related Posts