SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
Eine kurze Einführung in




                    SASS
                    und eine noch Kürzere in Compass


Montag, 14. November 11
„CSS zu kompilieren ist eine völlig
               bescheuerte Idee. Das braucht kein
               Mensch und wer es nutzt, schlägt
               auch Omas auf der Straße.“
                                   — Andreas Dantz, 2009




Montag, 14. November 11
Montag, 14. November 11
SASS
                          .box
                            margin: 1em
                            .entry-content
                               border: 1px solid #f00




Montag, 14. November 11
SCSS
                          .box {
                            margin: 1em;
                            .entry-content {
                              border: 1px solid #f00;
                            }
                          }




Montag, 14. November 11
CSS 2.1




Montag, 14. November 11
CSS 3




Montag, 14. November 11
VARIABLEN & Co.       CSS wird Programmiersprache




Montag, 14. November 11
SCSS


       $maincolor: #f00;
       $compcolor: #0ff;

       a { color: $maincolor; }
       a:hover,
       a:focus { color: $compcolor; }

                                        CSS


       a { color: #f00; }
       a:hover,
       a:focus { color: #0ff; }




Montag, 14. November 11
SCSS


       4px         +      4px;
       4px         -      4px;
       4px         *      2;
       4px         /      2;
                                 CSS


       8px;
       0px;
       8px;
       2px;




Montag, 14. November 11
SCSS


       $defaultmargin: 20px;

       .box {
         border: 1px solid #000;
         margin: $defaultmargin / 2;
         padding: $defaultmargin / 2 - 1px;
       }
                                              CSS


       .box {
         border: 1px solid #000;
         margin: 10px;
         padding: 9px;
       }



Montag, 14. November 11
SCSS


       round(4.3);
       ceil(4.2);
       floor(4.6);
       abs(-12);
       percentage(26/50);
                            CSS


       4;
       5;
       4;
       12;
       52%;




Montag, 14. November 11
SCSS


       $maincolor: #f00;

       a { color: $maincolor; }
       a:hover,
       a:focus { color: lighten($maincolor, 30%); }

                                                      CSS


       a { color: #f00; }
       a:hover,
       a:focus { color: #f99; }




Montag, 14. November 11
SCSS




       adjust-hue($color, $degrees)
       lighten($color, $amount)
       darken($color, $amount)
       saturate($color, $amount)
       desaturate($color, $amount)
       grayscale($color)
       complement($color)
       invert($color)




Montag, 14. November 11
NESTING   Vererbung &
                           das Klä ern auf Bäume




Montag, 14. November 11
SCSS


       .box {
         width: 60%;
         h2 { font-size: 24px; }
       }
                                      CSS


       .box {
         width: 60%;
       }

       .box h2 { font-size: 24px; }




Montag, 14. November 11
SCSS


       .box {
         header, footer { background-color: #000; }
       }
                                                      CSS


       .box header, .box footer {
         background-color: #000
       }




Montag, 14. November 11
SCSS


       a {
         color: #f00;
         text-decoration: none;
         &:hover { text-decoration: underline }
       }
                                                  CSS


       a {
         color: #f00;
         text-decoration:none;
       }

       a:hover { text-decoration: underline; }




Montag, 14. November 11
SCSS


       button {
         background: linear-gradient(#fff, #eee };
         .no-cssgradients & { background: #eee };
       }

                                                     CSS


       button {
         # code mit dem Verlauf
       }

       .no-cssgradients button {
         background: #eee;
       }



Montag, 14. November 11
flickr.com/photos/sharynmorrow/
Montag, 14. November 11
SCSS


       .message {
         background-color: #eee;
         border: 1px solid #ccc;
         padding: 1em;
       }

       .message p:last-child { margin-bottom: 0; }

       .error {
         @extend .message;
         background-color: lighten(#f00, 60%);
         border: 1px solid #f00;
       }




Montag, 14. November 11
CSS


       .message, .error {
         background-color: #eee;
         border: 1px solid #ccc;
         padding: 1em;
       }

       .message p:last-child,
       .error p:last-child { margin-bottom: 0; }

       .error {
         background-color: white;
         border: 1px solid #f00;
       }




Montag, 14. November 11
VORSICHT!
Montag, 14. November 11
CSS




       #wrapper header#header .meta-nav nav ul li a span,
       .container #sidebar .region-sidebar .views-view-
       generic .item span {
         color #f00;
       }




Montag, 14. November 11
MIXINS
                           Einen Gang höher




Montag, 14. November 11
SCSS


       @mixin linkeffect {
         color: #f00;
         &:hover { color: darken(#f00, 30%); }
       }

       nav a { @include linkeffect; }
                                                 CSS


       nav a {
         color: #f00;
       }

       nav a:hover {
         color: #660000;
       }


Montag, 14. November 11
SCSS


       @mixin border-radius($radius) {
         -webkit-border-radius: $radius;
         -moz-border-radius: $radius;
         border-radius: $radius;
       }

       .box { @include border-radius(5px); }

                                               CSS


       .box {
         -webkit-border-radius: 5px;
         -moz-border-radius: 5px;
         border-radius: 5px;
       }


Montag, 14. November 11
SCSS


       @mixin linkcolor($link:black, $hover:red) {
         color: $link;
         &:hover { color: $hover; }
       }

       a { @include linkcolor($hover:yellow ); }


                                                     CSS


       a { color: black; }
       a:hover { color: yellow; }




Montag, 14. November 11
SCSS


       @mixin linkcolor($dark: false) {
         @if $dark == true {
             color: black;
             &:hover { color: blue; }
           } @else {
             color: white;
             &:hover { color: #ccc; }
           }
       }

       a { @include linkcolor(); }
       a.alt { @include linkcolor(true); }   CSS


       a { color: white; }
       a:hover { color: #ccc; }
       a.alt { color: black; }
       a.alt:hover { color: blue; }
Montag, 14. November 11
Montag, 14. November 11
DAS GIBT ES FÜR’S GELD
              ★ Alles, was SASS bietet
              ★ Noch mehr Funktionen
              ★ Mixin Bibliothek
              ★ Projekt-Umgebung
              ★ Erweiterungen




Montag, 14. November 11
SCSS


       header {
         background: image-url('logo.jpg');
         h1 {
           width: image-width('logo.jpg');
           height: image-height('logo.jpg');
         }
       }
                                                           CSS


       header {
         background: url('/images/logo.jpg?1321202172');
       }

       header h1 {
         width: 346px;
         height: 400px;
       }
Montag, 14. November 11
SCSS


       .box {
         @include border-radius(8px);
         @include background(linear-gradient(#000, #333));
       }
                                                        CSS


       .box {
         -moz-border-radius: 8px;-webkit-border-radius:
       8px;-ms-border-radius: 8px; border-radius: 8px;
         background: -webkit-gradient(linear, 50% 0%, 50%
       100%, color-stop(0%, #000000), color-stop(100%,
       #333333));
         background: -webkit-linear-gradient(#000000,
       #333333);
         background: -moz-linear-gradient(#000000, #333333);
         background: linear-gradient(#000000, #333333);
       }
Montag, 14. November 11
flickr.com/photos/runningdevine
Montag, 14. November 11
SCSS


       @import "icon/*.png";
       @include all-icon-sprites($dimensions:true);

                                                           CSS



       .icon-sprite, .icon-minus {
         background: url('/images/icon-sd557c6037f.png')
         no-repeat;
       }

       .icon-minus {
         background-position: 0 0;
         height: 7px;
         width: 24px;
       }


Montag, 14. November 11
JA, ABER…
Montag, 14. November 11
FRAGEN?  @dantz
                            ad@vortrieb.net
                               vortrieb.net




Montag, 14. November 11
BONUS
Montag, 14. November 11

Weitere ähnliche Inhalte

Ähnlich wie Eine kleine Einführung in SASS

Drupal & CSS Preprocessors
Drupal & CSS PreprocessorsDrupal & CSS Preprocessors
Drupal & CSS Preprocessorskdmarks
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentationMario Noble
 
Using Sass - Building on CSS
Using Sass - Building on CSSUsing Sass - Building on CSS
Using Sass - Building on CSSSayanee Basu
 
CSS with LESS for #jd13nl
CSS with LESS for #jd13nlCSS with LESS for #jd13nl
CSS with LESS for #jd13nlHans Kuijpers
 

Ähnlich wie Eine kleine Einführung in SASS (6)

FCIP SASS Talk
FCIP SASS TalkFCIP SASS Talk
FCIP SASS Talk
 
Drupal & CSS Preprocessors
Drupal & CSS PreprocessorsDrupal & CSS Preprocessors
Drupal & CSS Preprocessors
 
Theming and Sass
Theming and SassTheming and Sass
Theming and Sass
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
 
Using Sass - Building on CSS
Using Sass - Building on CSSUsing Sass - Building on CSS
Using Sass - Building on CSS
 
CSS with LESS for #jd13nl
CSS with LESS for #jd13nlCSS with LESS for #jd13nl
CSS with LESS for #jd13nl
 

Kürzlich hochgeladen

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Eine kleine Einführung in SASS

  • 1. Eine kurze Einführung in SASS und eine noch Kürzere in Compass Montag, 14. November 11
  • 2. „CSS zu kompilieren ist eine völlig bescheuerte Idee. Das braucht kein Mensch und wer es nutzt, schlägt auch Omas auf der Straße.“ — Andreas Dantz, 2009 Montag, 14. November 11
  • 4. SASS .box margin: 1em .entry-content border: 1px solid #f00 Montag, 14. November 11
  • 5. SCSS .box { margin: 1em; .entry-content { border: 1px solid #f00; } } Montag, 14. November 11
  • 6. CSS 2.1 Montag, 14. November 11
  • 7. CSS 3 Montag, 14. November 11
  • 8. VARIABLEN & Co. CSS wird Programmiersprache Montag, 14. November 11
  • 9. SCSS $maincolor: #f00; $compcolor: #0ff; a { color: $maincolor; } a:hover, a:focus { color: $compcolor; } CSS a { color: #f00; } a:hover, a:focus { color: #0ff; } Montag, 14. November 11
  • 10. SCSS 4px + 4px; 4px - 4px; 4px * 2; 4px / 2; CSS 8px; 0px; 8px; 2px; Montag, 14. November 11
  • 11. SCSS $defaultmargin: 20px; .box { border: 1px solid #000; margin: $defaultmargin / 2; padding: $defaultmargin / 2 - 1px; } CSS .box { border: 1px solid #000; margin: 10px; padding: 9px; } Montag, 14. November 11
  • 12. SCSS round(4.3); ceil(4.2); floor(4.6); abs(-12); percentage(26/50); CSS 4; 5; 4; 12; 52%; Montag, 14. November 11
  • 13. SCSS $maincolor: #f00; a { color: $maincolor; } a:hover, a:focus { color: lighten($maincolor, 30%); } CSS a { color: #f00; } a:hover, a:focus { color: #f99; } Montag, 14. November 11
  • 14. SCSS adjust-hue($color, $degrees) lighten($color, $amount) darken($color, $amount) saturate($color, $amount) desaturate($color, $amount) grayscale($color) complement($color) invert($color) Montag, 14. November 11
  • 15. NESTING Vererbung & das Klä ern auf Bäume Montag, 14. November 11
  • 16. SCSS .box { width: 60%; h2 { font-size: 24px; } } CSS .box { width: 60%; } .box h2 { font-size: 24px; } Montag, 14. November 11
  • 17. SCSS .box { header, footer { background-color: #000; } } CSS .box header, .box footer { background-color: #000 } Montag, 14. November 11
  • 18. SCSS a { color: #f00; text-decoration: none; &:hover { text-decoration: underline } } CSS a { color: #f00; text-decoration:none; } a:hover { text-decoration: underline; } Montag, 14. November 11
  • 19. SCSS button { background: linear-gradient(#fff, #eee }; .no-cssgradients & { background: #eee }; } CSS button { # code mit dem Verlauf } .no-cssgradients button { background: #eee; } Montag, 14. November 11
  • 21. SCSS .message { background-color: #eee; border: 1px solid #ccc; padding: 1em; } .message p:last-child { margin-bottom: 0; } .error { @extend .message; background-color: lighten(#f00, 60%); border: 1px solid #f00; } Montag, 14. November 11
  • 22. CSS .message, .error { background-color: #eee; border: 1px solid #ccc; padding: 1em; } .message p:last-child, .error p:last-child { margin-bottom: 0; } .error { background-color: white; border: 1px solid #f00; } Montag, 14. November 11
  • 24. CSS #wrapper header#header .meta-nav nav ul li a span, .container #sidebar .region-sidebar .views-view- generic .item span { color #f00; } Montag, 14. November 11
  • 25. MIXINS Einen Gang höher Montag, 14. November 11
  • 26. SCSS @mixin linkeffect { color: #f00; &:hover { color: darken(#f00, 30%); } } nav a { @include linkeffect; } CSS nav a { color: #f00; } nav a:hover { color: #660000; } Montag, 14. November 11
  • 27. SCSS @mixin border-radius($radius) { -webkit-border-radius: $radius; -moz-border-radius: $radius; border-radius: $radius; } .box { @include border-radius(5px); } CSS .box { -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } Montag, 14. November 11
  • 28. SCSS @mixin linkcolor($link:black, $hover:red) { color: $link; &:hover { color: $hover; } } a { @include linkcolor($hover:yellow ); } CSS a { color: black; } a:hover { color: yellow; } Montag, 14. November 11
  • 29. SCSS @mixin linkcolor($dark: false) { @if $dark == true { color: black; &:hover { color: blue; } } @else { color: white; &:hover { color: #ccc; } } } a { @include linkcolor(); } a.alt { @include linkcolor(true); } CSS a { color: white; } a:hover { color: #ccc; } a.alt { color: black; } a.alt:hover { color: blue; } Montag, 14. November 11
  • 31. DAS GIBT ES FÜR’S GELD ★ Alles, was SASS bietet ★ Noch mehr Funktionen ★ Mixin Bibliothek ★ Projekt-Umgebung ★ Erweiterungen Montag, 14. November 11
  • 32. SCSS header { background: image-url('logo.jpg'); h1 { width: image-width('logo.jpg'); height: image-height('logo.jpg'); } } CSS header { background: url('/images/logo.jpg?1321202172'); } header h1 { width: 346px; height: 400px; } Montag, 14. November 11
  • 33. SCSS .box { @include border-radius(8px); @include background(linear-gradient(#000, #333)); } CSS .box { -moz-border-radius: 8px;-webkit-border-radius: 8px;-ms-border-radius: 8px; border-radius: 8px; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #000000), color-stop(100%, #333333)); background: -webkit-linear-gradient(#000000, #333333); background: -moz-linear-gradient(#000000, #333333); background: linear-gradient(#000000, #333333); } Montag, 14. November 11
  • 35. SCSS @import "icon/*.png"; @include all-icon-sprites($dimensions:true); CSS .icon-sprite, .icon-minus { background: url('/images/icon-sd557c6037f.png') no-repeat; } .icon-minus { background-position: 0 0; height: 7px; width: 24px; } Montag, 14. November 11
  • 36. JA, ABER… Montag, 14. November 11
  • 37. FRAGEN? @dantz ad@vortrieb.net vortrieb.net Montag, 14. November 11