logo
logo
Sign in

Smartest Ways to Structure SASS Code

avatar
Andolasoft
Smartest Ways to Structure SASS Code

SASS (Syntactically awesome style sheets) is an extension of the CSS which adds syntactic power to the basic CSS language making it easier for developers to write CSS. It is just a CSS preprocessor, so that you can write CSS in an easy and convenient way.


“Sass is a meta-language on top of CSS that's used to describe the style of a document cleanly and structurally, with more power than flat CSS allows. Sass both provides a simpler, more elegant syntax for CSS and implements various features that are useful for creating manageable style sheets.” 


“Sass is an extension of CSS3, adding nested rules, Variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.”


It’s Sass not SASS. Sass doesn’t stand for anything, except maybe making your CSS Sassier. Sass makes CSS more Sassy because it’s a preprocessor. Preprocessors make writing code easier.


If it helps you making CSS more like a real programming language. If that doesn’t help, just think of it as a way to write CSS that’s cleverer.


TheHistory of SASS:

  • Sass was first given life by Hampton Catlin in 2006, later supported by Natalie weizembaum and ChrisEpstein
  • Sass started life in ruby community
  • Sass supports two syntaxes

–Indentation syntax with file ext .sass

–CSS compatible syntax with file ext .scss 

  • Sass is free to use, require no license.

Why Use SASS?

  • Modularize (@import)
  • Variables for maintainability
  • Mixins improves reusability
  • Reduces redundant rules (keep it DRY)
  • Scalable and Maintainable
  • Sass is completely compatible with all versions of CSS
  • Sass reduces repetition of CSS and therefore saves time
  • It provides the document style in a good, structured format, better than vanilla CSS 
  • It uses re-usable methods, logic statements and some of the built-in functions such as color manipulation, mathematics and parameter lists



Read more on Organize And Structure Your SASS Code

collect
0
avatar
Andolasoft
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more