Ext js saas&compass

E
Ext js saas&compass
Theming Ext JS 4


  ROBERT DOUGAN, SENCHA
Ext js saas&compass
Ext js saas&compass
Ext JS 4 Theme
       CSS3
 Component Templates
       SASS
   Theming Ext JS 4
       Demo
CSS3
Ext js saas&compass
Currently
     Design it
      Chop it
Sprite the images
  Add the CSS
 For every state!
With CSS3
  Design it
 Add the CSS
Every Component!
Component Templates
Ext js saas&compass
<table id="ext-comp-1003" cellspacing="0" class="x-btn x-btn-noicon" style="width: auto; ">
    <tbody class="x-btn-small x-btn-icon-small-left">
         <tr>
              <td class="x-btn-tl">
                  <i>&nbsp;</i>
              </td>
              <td class="x-btn-tc"></td>
              <td class="x-btn-tr">
                  <i>&nbsp;</i>
              </td>
         </tr>
         <tr>
              <td class="x-btn-ml">
                  <i>&nbsp;</i>
              </td>
              <td class="x-btn-mc">
                  <em class="" unselectable="on">
                      <button type="button" id="ext-gen9" class=" x-btn-text">Add User</button>
                  </em>
              </td>
              <td class="x-btn-mr">
                  <i>&nbsp;</i>
              </td>
         </tr>
         <tr>
              <td class="x-btn-bl">
                  <i>&nbsp;</i>
              </td>
              <td class="x-btn-bc"></td>
              <td class="x-btn-br">
                  <i>&nbsp;</i>
              </td>
         </tr>
    </tbody>
</table>
<div id="button-1003" class="x-btn x-btn-small x-gray x-btn-icon-small-left x-btn-noicon">
    <button type="button" role="button" id="ext-gen1004">Add User</button>
</div>
Every Component!
Legacy Browsers?
SASS
http://sass-lang.com
Variables
               SCSS                       CSS
$blue:#3bbfce;               /* line 4, ../src/test.scss */
$margin:16px;                .example1 {
                               border-color:#3bbfce;
.example1 {                  }
  border-color:$blue;
}                            /* line 8, ../src/test.scss */
                             .example2 {
.example2 {                    margin:16px;
  margin:$margin;              color:#3bbfce;
                             }
    color:$blue;
}
Inline Variables
               SCSS                        CSS
$str:‘test’;                  /* line 3, ../src/test.scss */
                              .example.test {
.example.#{$str} {              color:black;
  color:black;                }
}
                              /* line 9, ../src/test.scss */
$str:‘foo’;                   .example.foo {
                                color:black;
.example.#{$str} {            }
  color:black;
}
Math Functions
              SCSS                          CSS
$one:8px;                      /* line 5, ../src/test.scss */
$two:16px;                     .example1 {
$three:3px;                      border: 1px solid 4px;
                               }
.example1 {
  border:1px solid $one / 2;   /* line 9, ../src/test.scss */
}                              .example2 {
                                 margin: 48px;
.example2 {                    }
  margin:$two * $three;
}
Color Functions
                SCSS                                   CSS
.example1 {                               /* line 1, ../src/test.scss */
  color:darken(yellow, 10);               .example1 {
                                            color: #cccc00;
    background:lighten(blue, 30);           background: #9999ff;
                                            border-color: #aa0000;
    border-color:saturate(#aa0000, 10);   }
}
                                          /* line 9, ../src/test.scss */
.example2 {                               .example2 {
  background:mix(yellow, red);              background: #ff7f00;
}                                         }
Mixins
               SCSS                              CSS
@mixin add-stuff($color) {        /* line 6, ../src/test.scss */
  color:$color;                   .example {
  background-color:#000;            color: blue;
                                    background-color: #000;
    .child {
      padding:5px;                    .child {
    }                                   padding: 5px;
}                                     }
                                  }
.example {
  @include add-stuff(blue);
}
Combined
                 SCSS                                   CSS
@mixin style-btn($name, $color) {          /* line 2, ../src/test.scss */
  .btn.#{$name} {                          .btn.tangy {
    background:$color;                       background: yellow;
                                             border: 1px solid;
        border:1px solid;                    border-color: #cccc00;
        border-color:darken($color, 10);     color: #666666;
                                           }
        color:lighten($color, 40);
    }                                      /* line 2, ../src/test.scss */
}                                          .btn.pale {
                                             background: blue;
@include style-btn(‘tangy’, yellow);         border: 1px solid;
@include style-btn(‘pale’, blue);            border-color: #0000cc;
                                             color: #666666;
                                           }
Compass
Compass
             SCSS                             CSS
@import 'compass';               /* line 3, ../src/test.scss */
                                 .example1 {
.example1 {                        -moz-border-radius: 5px;
  @include border-radius(5px);     -webkit-border-radius: 5px;
}                                  -o-border-radius: 5px;
                                   -ms-border-radius: 5px;
                                   -khtml-border-radius: 5px;
                                   border-radius: 5px;
                                 }
Theming Ext JS 4
Ext js saas&compass
Neptune
Ext js saas&compass
Ext js saas&compass
Ext js saas&compass
Ext js saas&compass
Ext js saas&compass
Ext js saas&compass
Variables
$base-color: #cc0000;
$frame-base-color: #333;
$frame-border-radius: 10px;
  $frame-font-size: 14px;
Mixins
@include extjs-button-color(‘yellow’, darken(#ddaa00, 13));
Optimization
/*include extjs components*/
@include extjs-button;
@include extjs-form;
@include extjs-panel;
@include extjs-qtip;
@include extjs-toolbar;
@include extjs-window;
/*include extjs components*/
@include extjs-button;
@include extjs-panel;
@include extjs-toolbar;
@include extjs-window;
Documentation
Demo
Questions?
Thanks!
@rdougan
rdougan@me.com
  http://rwd.me

  @senchainc
1 von 47

Recomendados

Sencha Touch von
Sencha TouchSencha Touch
Sencha TouchCraig Walker
2.2K views73 Folien
Basics of html5, data_storage, css3 von
Basics of html5, data_storage, css3Basics of html5, data_storage, css3
Basics of html5, data_storage, css3Sreejith Nair
784 views38 Folien
лукьянченко л.а. пос 10а von
лукьянченко л.а. пос 10алукьянченко л.а. пос 10а
лукьянченко л.а. пос 10аl10bov
233 views12 Folien
Tt subtemplates-caching von
Tt subtemplates-cachingTt subtemplates-caching
Tt subtemplates-cachingValeriy Studennikov
441 views14 Folien
Advance Techniques In Php von
Advance Techniques In PhpAdvance Techniques In Php
Advance Techniques In PhpKumar S
1.4K views9 Folien
Let's write secure drupal code! von
Let's write secure drupal code!Let's write secure drupal code!
Let's write secure drupal code!Balázs Tatár
297 views60 Folien

Más contenido relacionado

Was ist angesagt?

Sass - Making CSS fun again. von
Sass - Making CSS fun again.Sass - Making CSS fun again.
Sass - Making CSS fun again.Gabriel Neutzling
1.3K views42 Folien
CSS3 vs jQuery von
CSS3 vs jQueryCSS3 vs jQuery
CSS3 vs jQueryWeb Essentials Co., Ltd.
1.2K views39 Folien
Growing jQuery von
Growing jQueryGrowing jQuery
Growing jQuerygueste8d8bc
661 views12 Folien
Krueger Library Custom CSS for LibGuides von
Krueger Library Custom CSS for LibGuidesKrueger Library Custom CSS for LibGuides
Krueger Library Custom CSS for LibGuidesTammi Owens
945 views6 Folien
Bloqueador cmd-sh von
Bloqueador cmd-shBloqueador cmd-sh
Bloqueador cmd-shmsbertoldi
36 views1 Folie
JSplash - Adobe MAX 2009 von
JSplash - Adobe MAX 2009JSplash - Adobe MAX 2009
JSplash - Adobe MAX 2009gyuque
853 views16 Folien

Was ist angesagt?(19)

Krueger Library Custom CSS for LibGuides von Tammi Owens
Krueger Library Custom CSS for LibGuidesKrueger Library Custom CSS for LibGuides
Krueger Library Custom CSS for LibGuides
Tammi Owens945 views
Bloqueador cmd-sh von msbertoldi
Bloqueador cmd-shBloqueador cmd-sh
Bloqueador cmd-sh
msbertoldi36 views
JSplash - Adobe MAX 2009 von gyuque
JSplash - Adobe MAX 2009JSplash - Adobe MAX 2009
JSplash - Adobe MAX 2009
gyuque853 views
Dart : one language to rule them all - MixIT 2013 von Sébastien Deleuze
Dart : one language to rule them all - MixIT 2013Dart : one language to rule them all - MixIT 2013
Dart : one language to rule them all - MixIT 2013
Sébastien Deleuze5.1K views
CSS3 and jQuery von psophy
CSS3 and jQueryCSS3 and jQuery
CSS3 and jQuery
psophy1.6K views
Code Tops Comments von Mr Giap
Code Tops CommentsCode Tops Comments
Code Tops Comments
Mr Giap217 views
Finding a Better Way to CSS: Navigating Sass with Compass von Claudina Sarahe
Finding a Better Way to CSS: Navigating Sass with CompassFinding a Better Way to CSS: Navigating Sass with Compass
Finding a Better Way to CSS: Navigating Sass with Compass
Claudina Sarahe5.2K views
Just css results dogmeat template validator von Gaejang Guk
Just css results dogmeat template validatorJust css results dogmeat template validator
Just css results dogmeat template validator
Gaejang Guk680 views
To get user client system name on ui welcome screen.doc von Ripunjay Rathaur
To get user client system name on ui welcome screen.docTo get user client system name on ui welcome screen.doc
To get user client system name on ui welcome screen.doc
Ripunjay Rathaur1.7K views

Destacado

Advanced Templates for Ext JS von
Advanced Templates for Ext JSAdvanced Templates for Ext JS
Advanced Templates for Ext JSSencha
9.2K views23 Folien
Theming Ext JS 4 von
Theming Ext JS 4Theming Ext JS 4
Theming Ext JS 4Sencha
6.5K views47 Folien
The Ext JS 4 Layout System von
The Ext JS 4 Layout SystemThe Ext JS 4 Layout System
The Ext JS 4 Layout SystemSencha
4.1K views37 Folien
Tips for Doing Accurate Data Journalism von
Tips for Doing Accurate Data JournalismTips for Doing Accurate Data Journalism
Tips for Doing Accurate Data JournalismCraig Silverman
12.4K views17 Folien
Ext js 6 von
Ext js 6Ext js 6
Ext js 6Manav Gupta
1.2K views21 Folien
Ext J S Observable von
Ext J S ObservableExt J S Observable
Ext J S Observablejason hu 金良胡
4.3K views14 Folien

Destacado(11)

Advanced Templates for Ext JS von Sencha
Advanced Templates for Ext JSAdvanced Templates for Ext JS
Advanced Templates for Ext JS
Sencha9.2K views
Theming Ext JS 4 von Sencha
Theming Ext JS 4Theming Ext JS 4
Theming Ext JS 4
Sencha6.5K views
The Ext JS 4 Layout System von Sencha
The Ext JS 4 Layout SystemThe Ext JS 4 Layout System
The Ext JS 4 Layout System
Sencha4.1K views
Tips for Doing Accurate Data Journalism von Craig Silverman
Tips for Doing Accurate Data JournalismTips for Doing Accurate Data Journalism
Tips for Doing Accurate Data Journalism
Craig Silverman12.4K views
Diferencias colorimétricas de los colores base Pantone© con barnices de sobre... von Carlos M. Alcántara
Diferencias colorimétricas de los colores base Pantone© con barnices de sobre...Diferencias colorimétricas de los colores base Pantone© con barnices de sobre...
Diferencias colorimétricas de los colores base Pantone© con barnices de sobre...
Carlos M. Alcántara28.9K views
Charting & Data Visualization in Ext JS 4 von Sencha
Charting & Data Visualization in Ext JS 4Charting & Data Visualization in Ext JS 4
Charting & Data Visualization in Ext JS 4
Sencha4.6K views
Sencha and Spring (Spring 2GX 2013) von Sencha
Sencha and Spring (Spring 2GX 2013) Sencha and Spring (Spring 2GX 2013)
Sencha and Spring (Spring 2GX 2013)
Sencha5.5K views

Similar a Ext js saas&compass

Theming and Sass von
Theming and SassTheming and Sass
Theming and SassJames Pearce
3.5K views78 Folien
Simple introduction Sass von
Simple introduction SassSimple introduction Sass
Simple introduction SassZeeshan Ahmed
501 views26 Folien
Preprocessor presentation von
Preprocessor presentationPreprocessor presentation
Preprocessor presentationMario Noble
1.3K views44 Folien
Software programming tools for creating/managing CSS files von
Software programming tools for creating/managing CSS filesSoftware programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS filesDinu Suman
1.4K views26 Folien
Front-End Dev Tools von
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev ToolsNetguru
1.1K views49 Folien
LESS : The dynamic stylesheet language von
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageKatsunori Tanaka
3.3K views68 Folien

Similar a Ext js saas&compass(20)

Preprocessor presentation von Mario Noble
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
Mario Noble1.3K views
Software programming tools for creating/managing CSS files von Dinu Suman
Software programming tools for creating/managing CSS filesSoftware programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS files
Dinu Suman1.4K views
Front-End Dev Tools von Netguru
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev Tools
Netguru1.1K views
LESS : The dynamic stylesheet language von Katsunori Tanaka
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet language
Katsunori Tanaka3.3K views
Sass+Compass, OU: Por que CSS puro nunca mais?!? von Alcides Queiroz
Sass+Compass, OU: Por que CSS puro nunca mais?!?Sass+Compass, OU: Por que CSS puro nunca mais?!?
Sass+Compass, OU: Por que CSS puro nunca mais?!?
Alcides Queiroz1.4K views
CSS: A Slippery Slope to the Backend von FITC
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the Backend
FITC1.4K views
Building a theming system with React - Matteo Ronchi - Codemotion Amsterdam 2017 von Codemotion
Building a theming system with React - Matteo Ronchi - Codemotion Amsterdam 2017Building a theming system with React - Matteo Ronchi - Codemotion Amsterdam 2017
Building a theming system with React - Matteo Ronchi - Codemotion Amsterdam 2017
Codemotion540 views
3 Steps to Make Better & Faster Frontends von Nico Hagenburger
3 Steps to Make Better & Faster Frontends3 Steps to Make Better & Faster Frontends
3 Steps to Make Better & Faster Frontends
Nico Hagenburger4K views
CSS Extenders von Idan Gazit
CSS ExtendersCSS Extenders
CSS Extenders
Idan Gazit4.6K views
LESS CSS Pre-processor von Kannika Kong
LESS CSS Pre-processorLESS CSS Pre-processor
LESS CSS Pre-processor
Kannika Kong938 views
SASS is more than LESS von Itai Koren
SASS is more than LESSSASS is more than LESS
SASS is more than LESS
Itai Koren1.2K views
Getting Started with Sass & Compass von Rob Davarnia
Getting Started with Sass & CompassGetting Started with Sass & Compass
Getting Started with Sass & Compass
Rob Davarnia1.8K views
Doing more with LESS von jsmith92
Doing more with LESSDoing more with LESS
Doing more with LESS
jsmith922K views
Sass and Compass - Getting Started von edgincvg
Sass and Compass - Getting StartedSass and Compass - Getting Started
Sass and Compass - Getting Started
edgincvg1.7K views

Último

Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... von
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...ShapeBlue
180 views18 Folien
State of the Union - Rohit Yadav - Apache CloudStack von
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
297 views53 Folien
Evaluation of Quality of Experience of ABR Schemes in Gaming Stream von
Evaluation of Quality of Experience of ABR Schemes in Gaming StreamEvaluation of Quality of Experience of ABR Schemes in Gaming Stream
Evaluation of Quality of Experience of ABR Schemes in Gaming StreamAlpen-Adria-Universität
38 views34 Folien
CryptoBotsAI von
CryptoBotsAICryptoBotsAI
CryptoBotsAIchandureddyvadala199
40 views5 Folien
"Package management in monorepos", Zoltan Kochan von
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan KochanFwdays
33 views18 Folien
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... von
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...ShapeBlue
161 views13 Folien

Último(20)

Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... von ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue180 views
State of the Union - Rohit Yadav - Apache CloudStack von ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue297 views
"Package management in monorepos", Zoltan Kochan von Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays33 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... von ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue161 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... von ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue126 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs von Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash158 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... von ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue159 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... von ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue166 views
"Node.js Development in 2024: trends and tools", Nikita Galkin von Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays32 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue von ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue263 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... von ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue106 views
Optimizing Communication to Optimize Human Behavior - LCBM von Yaman Kumar
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBM
Yaman Kumar38 views
LLMs in Production: Tooling, Process, and Team Structure von Aggregage
LLMs in Production: Tooling, Process, and Team StructureLLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team Structure
Aggregage42 views
The Power of Generative AI in Accelerating No Code Adoption.pdf von Saeed Al Dhaheri
The Power of Generative AI in Accelerating No Code Adoption.pdfThe Power of Generative AI in Accelerating No Code Adoption.pdf
The Power of Generative AI in Accelerating No Code Adoption.pdf
Saeed Al Dhaheri32 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online von ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue221 views

Ext js saas&compass

  • 2. Theming Ext JS 4 ROBERT DOUGAN, SENCHA
  • 5. Ext JS 4 Theme CSS3 Component Templates SASS Theming Ext JS 4 Demo
  • 8. Currently Design it Chop it Sprite the images Add the CSS For every state!
  • 9. With CSS3 Design it Add the CSS
  • 13. <table id="ext-comp-1003" cellspacing="0" class="x-btn x-btn-noicon" style="width: auto; "> <tbody class="x-btn-small x-btn-icon-small-left"> <tr> <td class="x-btn-tl"> <i>&nbsp;</i> </td> <td class="x-btn-tc"></td> <td class="x-btn-tr"> <i>&nbsp;</i> </td> </tr> <tr> <td class="x-btn-ml"> <i>&nbsp;</i> </td> <td class="x-btn-mc"> <em class="" unselectable="on"> <button type="button" id="ext-gen9" class=" x-btn-text">Add User</button> </em> </td> <td class="x-btn-mr"> <i>&nbsp;</i> </td> </tr> <tr> <td class="x-btn-bl"> <i>&nbsp;</i> </td> <td class="x-btn-bc"></td> <td class="x-btn-br"> <i>&nbsp;</i> </td> </tr> </tbody> </table>
  • 14. <div id="button-1003" class="x-btn x-btn-small x-gray x-btn-icon-small-left x-btn-noicon"> <button type="button" role="button" id="ext-gen1004">Add User</button> </div>
  • 18. Variables SCSS CSS $blue:#3bbfce; /* line 4, ../src/test.scss */ $margin:16px; .example1 { border-color:#3bbfce; .example1 { } border-color:$blue; } /* line 8, ../src/test.scss */ .example2 { .example2 { margin:16px; margin:$margin; color:#3bbfce; } color:$blue; }
  • 19. Inline Variables SCSS CSS $str:‘test’; /* line 3, ../src/test.scss */ .example.test { .example.#{$str} { color:black; color:black; } } /* line 9, ../src/test.scss */ $str:‘foo’; .example.foo { color:black; .example.#{$str} { } color:black; }
  • 20. Math Functions SCSS CSS $one:8px; /* line 5, ../src/test.scss */ $two:16px; .example1 { $three:3px; border: 1px solid 4px; } .example1 { border:1px solid $one / 2; /* line 9, ../src/test.scss */ } .example2 { margin: 48px; .example2 { } margin:$two * $three; }
  • 21. Color Functions SCSS CSS .example1 { /* line 1, ../src/test.scss */ color:darken(yellow, 10); .example1 { color: #cccc00; background:lighten(blue, 30); background: #9999ff; border-color: #aa0000; border-color:saturate(#aa0000, 10); } } /* line 9, ../src/test.scss */ .example2 { .example2 { background:mix(yellow, red); background: #ff7f00; } }
  • 22. Mixins SCSS CSS @mixin add-stuff($color) { /* line 6, ../src/test.scss */ color:$color; .example { background-color:#000; color: blue; background-color: #000; .child { padding:5px; .child { } padding: 5px; } } } .example { @include add-stuff(blue); }
  • 23. Combined SCSS CSS @mixin style-btn($name, $color) { /* line 2, ../src/test.scss */ .btn.#{$name} { .btn.tangy { background:$color; background: yellow; border: 1px solid; border:1px solid; border-color: #cccc00; border-color:darken($color, 10); color: #666666; } color:lighten($color, 40); } /* line 2, ../src/test.scss */ } .btn.pale { background: blue; @include style-btn(‘tangy’, yellow); border: 1px solid; @include style-btn(‘pale’, blue); border-color: #0000cc; color: #666666; }
  • 25. Compass SCSS CSS @import 'compass'; /* line 3, ../src/test.scss */ .example1 { .example1 { -moz-border-radius: 5px; @include border-radius(5px); -webkit-border-radius: 5px; } -o-border-radius: 5px; -ms-border-radius: 5px; -khtml-border-radius: 5px; border-radius: 5px; }
  • 41. /*include extjs components*/ @include extjs-button; @include extjs-form; @include extjs-panel; @include extjs-qtip; @include extjs-toolbar; @include extjs-window;
  • 42. /*include extjs components*/ @include extjs-button; @include extjs-panel; @include extjs-toolbar; @include extjs-window;
  • 44. Demo