Welcome Guest! (App Version 5.16)

websitnero logo name

Sass Partials

What are Partials in Sass?

Partials are Sass files whose name starts with an underscore and in turn they do not automatically compile directly to CSS. In fact they are first imported to the main sass file and then this main.sass (or primary sass file of project) gets converted to CSS and thereby included in HTML Page.

The benefit reaped of this process using partials is that - the project does not require all the code to be botched up in 1 single file. Rather, the project can be split into different modules and functionalities and Sass file can be made 1 for each of them. Then all these separate Sass files can be imported to 1 main file and then this single file will be compiled to CSS.

Example of breaking up project to multiple Sass files can be done as follows:

_reset.scss
_variables.scss
_mixins.scss
_functions.scss
main.scss

Note that there should be 1 file at least which is not a partial and will include all partials within its code.

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.