Less, SASS/SCSS

Source: Internet
Author: User
Tags css preprocessor

The CSS preprocessor is a specialized programming language that designs Web page styles and then compiles them into normal CSS files for use by the project. The CSS preprocessor adds some programming features to the CSS, regardless of browser compatibility issues.

The use of variables, simple logic programs, functions, and so on in CSS can make CSS more concise, more adaptable, more readable, easier to maintain, and many other benefits.

Website Description:

Sass is a meta-language that is higher than CSS, which can be used to describe file styles in a clear, structured way, with more powerful features than regular CSS.

Sass provides a cleaner, more elegant syntax, while providing a variety of features to create maintainable and managed stylesheets.

Sass and Scss differences

1. Unlike the file extension, Sass is based on ". Sass "suffix is extension, and scss is the extension with". scss "suffix;

2. Grammar writing is different, Sass is written in strict indentation grammar, without curly braces ({}) and a few (;), and Scss.

It is recommended to use a file with the suffix named Scss to avoid the strict mode of sass suffix requiring an error.

//Sass$font-stack:helvetica, Sans-serif$primary-color: #333body  font:100% $font-stack  color:$ Primary-color//scss$font-stack:helvetica, Sans-serif; $primary-color: #333; body{font:100% $ Font-stack; color:$primary-color;}

Test monitoring SASS

Sass--watch Test.scss:test.css

Sass is a pre-treatment tool to help do things in advance

Sass different styles of output mode

Nested output mode nested, expanded output mode expanded, compact output mode, compressed output mode compressed

Nested output mode Nestedsass--watch test.scss:test.css--style nested

Expand Output Mode Expandedsass--watch test.scss:test.css--style Expanded

Compact and comfortable mode compact (single-line format) Sass--watch test.scss:test.css--style Compact

Compression output mode Compressedsass--watch test.scss:test.css--style Compressed

Less, SASS/SCSS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.