What is a difference between @import and @include keyword in Sass?

Experience Level: Junior
Tags: Sass

Answer

The @import keyword is used to include partials (smaller Sass files that are prefixed by _underscore character) into a main file.

The @include keyword is used to insert processed css styles from mixin body into a selector. 

Comments

No Comments Yet.
Be the first to tell us what you think.
Sass for beginners
Sass for beginners

Are you learning General ? Try our test we designed to help you progress faster.

Test yourself