What is use of @import function in Sass?

Anshal Singh
Anshal Singh

Posted On: Feb 22, 2018


Let's see the what's the use of @import function of Saas

  • The CSS has also the @import directive but it takes extra HTTP request every single time.
  • The SASS @import directive removes the drawback of the CSS file.
  • The @import directive permits one sass file to access the content of another sass file.
  • The syntax of the import of SASS is below.
@import “file_name”; 
  • We can need to write an extension (.scss) with the file name. The @import can access the automatic extension.
  • The sass file is myApp.scss show the below.
The another file is myCode.scss show the below.
@import myApp

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    SASS Interview Questions

    What is SASS?

    The sass is the acronym of synthetically Awesome Style Sheet. This is a CSS pre-processor. The sass used to minimize the repetition of CSS style tags and save time. This is a more stable extension ...

    SASS Interview Questions

    Who is the father of SASS?

    The SASS language primarily designed by Hampton Catlin and developed by Natalie Weizenbaum. After the primary version, Natalie Weizenbaum and Chris Eppstein are continuing for SASS with a scripting...

    SASS Interview Questions

    Enlist few features of SASS?

    The Sass is time-saving and minimizes the coding language. Some basic features of SASS which come daily basis is below. List and @each directive together. The list is an initial feature of sass but...