SCSS's understanding

Source: Internet
Author: User

The CSS3 is an extension of the code, adding rules nesting, variables, blending, selector inheritance, and so on. Convert it to standard, well-formed CSS code by using the command line tool or the Web framework plugin.

It is in fact the same as the basic content in front of less, the knowledge in less the premise of the increase. Sass syntax is more rigorous, rigorous, while logical and computational functions more powerful, he closer to the machine language logic more distinct

For example: Hide comments, placeholder selectors, data types, color operations, default values for variables, extensions, control commands (such as @if , @for or), @while and so on.

One of the key features of SASS is the indented syntax, which can produce a column-like appearance of code, and less he is a tool that was inspired by SCSS, but less has its own pros and cons.

As a frame-type language scss more logical, but also his difficulty in getting started is relatively increased. If you want to play the 6, or more in the logical language in the next point of the better understanding and acceptance of SCSS,

Here is my personal code:

  @mixin WH ($h, $w) {width: $w; Height: $h;}  @mixin ZT ($F-S, $F-W) {font-weight: $F-W; Font-size: $F-S;}        @mixin margin ($top, $left, $rig, $bot) {margin-top: $top;        Margin-left: $left;        Margin-right: $rig; Margin-bottom: $bot;} $b: 1px solid red; $MD: 0px auto; @mixin typeface_li ($t-h,$-c:left, $f-w:normal, $f-z:12px, $t-d:none, $color: Black, $l-S:  None) {line-height: $t-H;  Font-weight: $f-W;  Text-align: $-c;  Font-size: $f-Z;  Text-decoration: $t-D;  Color: $color; List-style: $l-S;}  *{margin:0px; padding:0px;  font-family: "BRUSHSCRIPTSTD"; Font-family:acaslonpro-bolditalic;}   body{@include WH (100%,100%);  min-width:960px;  Background-image:url ("images/main-bg.jpg");  Background-repeat:no-repeat; Background-color: #1a1a1a;}    header{@include WH (520px,950px);    margin:100px Auto; Background-image:url ("Images/slide-1.jpg");}  

This is a Web page code, too much so also did not all get, knowledge before the declaration and compilation is the core of scss can be. For me, I still feel that CSS is more my heart, can better control it, it can be I only contact, for the new things conflict, but after looking, everything will change with the time

SCSS's understanding

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.