Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SASS 让你更爽的编写 CSS

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

SASS 让你更爽的编写 CSS

SASS 让你更爽的编写 CSS

Praise Song

July 31, 2012

Transcript

24 slides
  1. What  is  SASS?              

     SASS  是一个  CSS3  扩展,为  CSS  扩展了嵌套规则、变量、混入、继承、函数   等强大的功能。SASS  的使命是让  CSS  更有趣味 J   •  CSS  超集   •  CSS3  扩展   •  使  CSS  更有趣   •  SCSS  and  SASS   •  Hampton  Catlin、Nathan  Weizenbaum、Chris  Eppstein       h#p://sass-­‐lang.com/  
  2. Features   1、Fully  CSS3-­‐compaFble   2、Language  extensions  such  as  variables,

     nesFng,  and  mixins   3、Many  useful  funcFons  for  manipulaFng  colors  and  other  values   4、Advanced  features  like  control  direcFves  for  libraries   5、Well-­‐forma#ed,  customizable  output   6、Firebug  integraFon    
  3. @import   SASS   CSS   •  @import    “common.css”;

      •  @import  “common”  screen;   •  @import  h#p://alipay.com/common.css;   •  @import  url();   •  @import  “common.scss/sass”;   •  @import  “common”;  
  4. 回过头来再看 SASS   •  大型样式表   •  制定样式规范   • 

    团队开发   优点   缺点   适用于   •  学习成本低   •  降低样式表维护成本   •  适用于多人开发   •  性能优越   OMG,我无缺点 J  
  5. SASS  VS  LESS   •  实现原理不同   •  创建变量的方式不同  

    •  预编绎机制不同   •  作用域表现不同   •  mixin  方式不同   •  SASS  比  LESS  的数学运算能力更强   •  LESS  没有  SASS  的  Control  DirecFve    

Other Decks in Technology