Understanding of 1.Sass

1.Sass css is a pre-processor.

2. What is the css preprocessor?

  Appeared CSS preprocessor, allows us to as "programming" approach to writing CSS like operating JavaScript. In the CSS preprocessor, we can use variables, loops, functions, etc. to simplify operations and improve development efficiency.

3.css language preprocessor most common three kinds:

   1》Sass

    2》Less

    3》Stylus

4.Sass and Less comparison:

  (1) Sass Because it is written in Ruby, so compile time is processed on the server side; and Less because it is written in JavaScript, so compile time is the browser-side processing;

 (2) Sass has more powerful features such as loops, functions, macros, etc. mixed, but less but did not;

 (3) Sass has a mature and stable framework to aid in the development, especially Compass, but less but did not;

 (4) Sass discussions maximum heat at home and abroad, and have a strong team in the maintenance of stable;

 (5) a significant number of companies are more inclined to use Sass, rather than less;

4.Sass and Less comparison:

    1 "Sass, there are two kinds of syntax: (1) Format Sass; (2) Scss format. That is, we usually say Sass and Scss is actually the same thing to, collectively known as Sass. Scss Sass and Sass are only two kinds of syntax Bale.

     2 "difference:

            . Sass format , Sass is "old version grammar." Such syntax, without the use of braces "{}" and semicolon ";", but to make use of strict grammar rules indented writing, which is similar to the Ruby language written.

                 E.g:$color:white

          $bgColor:red
 
          body
          color:$color
          background-color:$bgColor

                 . Scss format  , Sass is a "new version of the grammar." This syntax, braces "{}" and semicolon ";" does not use strict grammar rules indented writing, which is similar to CSS written format.

 

Guess you like

Origin www.cnblogs.com/hou-yuan-zhen/p/11614832.html