Movatterモバイル変換


[0]ホーム

URL:


MP
Uploaded byMatt Puchlerz
KEY, PPTX1,133 views

Organizing & Simplifying CSS [with Sass]

The document presents tips on organizing and simplifying CSS using SASS, focusing on design principles, specificity, and the use of CSS meta-frameworks. Key strategies include applying balance and rhythm in styling, ordering properties by specificity, and utilizing SASS features such as nesting, variables, functions, and mixins. It concludes with instructions for installing SASS via HAML.

Embed presentation

Download as KEY, PPTX
Organizing & Simplifying  your CSS [with Sass]    Matt Puchlerz   Refresh Chicago    @mattpuchlerz   May 26, 2010
Organizing & Simplifying  your CSS [with Sass]    Matt Puchlerz   Refresh Chicago    @mattpuchlerz   May 26, 2010
Organizing & Simplifying  your CSS [with Sass]    Matt Puchlerz   Refresh Chicago    @mattpuchlerz   May 26, 2010
Organizing & Simplifying  your CSS [with Sass]    Matt Puchlerz   Refresh Chicago    @mattpuchlerz                    GeekFest                    MayJun 15 12:28:43 -0500                        26, 2010                    Tue                        2010
Gross
TIP #1Use designprinciples
1   11                                 2   12Balance                          3   .carousel {                                 4     width:80%;height:50px}                                 5                                 6   blockquote                                 7   {                                 8      position: relative;                                 9      padding: 0px;                                1      color: #555;Images © Digital Web Magazine   0    }
1   11                                 2   12Balance                          3   .carousel {                                 4     width: 80%;                                 5     height: 50px;                                 6   }                                 7                                 8   blockquote {                                 9    position: relative;                                1     padding: 0;Images © Digital Web Magazine   0     color: #555;
1 11                                 2 12Rhythm                           3 #branding {                                 4 width:     350px;                                 5 height:    150px;                                 6 padding: 0px;                                 7 position: absolute;                                 8 top:      15px;                                 9 left:    20px;                                1   background: #c00;Images © Digital Web Magazine   0   color:   #fff;
1 11                                 2 12Rhythm                           3 #branding {                                 4 background: #c00;                                 5 color:    #fff;                                 6 height:    150px;                                 7 left:    20px;                                 8 padding: 0;                                 9 position: absolute;                                1   top:     15px;Images © Digital Web Magazine   0   width:    350px;
1   11                                 2   12Proximity                        3   #header {…}                                 4   .error {…}                                 5   .error p {…}                                 6                                 7   .info   {…}                                 8   .error ul {…}                                 9   .info p {…}                                1Images © Digital Web Magazine   0    #header a {…}
1   11                                 2   12Proximity                        3   .error {…}                                 4   .error p {…}                                 5   .error ul {…}                                 6                                 7   .info   {…}                                 8   .info p {…}                                 9                                1    #header {…}Images © Digital Web Magazine   0    #header a {…}
TIP #2Order bySpeci city
<span class=“info”>Hi!</.info { color: green }span { color: red }
<span class=“info”>Hi!</.info { color: green }span { color: red }
<span class=“info”>Hi!</.info { color: green }span { color: red }
Point value based on:Style Attribute      1000 ptsID                    100 ptsClass or Attribute      10 ptsElement                  1 pt
blockquote        1
blockquote p         2
blockquote p.best        12
blockquote:hover p.best           22
#tagline100
div#tagline  101
div#tagline p:last-child        102
<span style=“color: red”>      1000
<span style=“color: red”>      1000
1   11 2   12 3   p {…} 4   ul {…} 5 6   .error {…} 7   .notice {…} 8 9   input[type=“submit”] {…}10    #container {…}
1   11 2   12 3   p {…} 4   ul {…} 5 6   .error {…} 7   .notice {…} 8 9   input[type=“submit”] {…}10    #container {…}
1   11 2   12 3   p {…} 4   ul {…} 5 6   .error {…} 7   .notice {…} 8 9   input[type=“submit”] {…}10    #container {…}
1   11 2   12 3   p {…} 4   ul {…} 5 6   .error {…} 7   .notice {…} 8 9   input[type=“submit”] {…}10    #container {…}
TIP #3Try CSS meta-frameworks
version 3.0
1 11           2 12Nesting    3 header {           4 font: {           5    size: 18px;           6    weight: bold;           7 }           8           9 h2 {          1     color: blue;          0   }
1   11             2   12Variables    3   $orange: #c75000;             4             5   body {             6     background: $orange;             7     font-family: $ff;             8     line-height: $lh;             9   }            1            0
1   11        2   12Math    3   $lh: 20px;        4        5   dl, ol, p, ul {        6     line-height: $lh;        7     margin-bottom: $lh;        8   }        9       1    #container {       0     padding: $lh / 2;
1   11             2   12Functions    3   $red: #c00;             4             5   a{             6    color: $red;             7             8       :hover {             9         color: darken($red);            1        }            0    }
1   11          2   12Mixins    3   @mixin rounded($rad) {          4     -moz-border-radi…          5     -o-border-radius…          6     -webkit-border-r…          7   }          8          9   input[type=“submit”],         1    select,         0    textarea {
1   11           2   12“SCSS”     3   $lh: 18px; Syntax    4           5   #feature {           6    padding: $lh;           7    width: $lh * 10;           8           9    &:hover {          1      @include rounded;          0      padding: $lh * 2;
1   11           2   12“SASS”     3   $lh: 18px Syntax    4           5   #feature           6    padding: $lh           7    width: $lh * 10           8           9    &:hover          1      @include rounded          0      padding: $lh * 2
Installing Sass via Haml$ gem install haml$ mv styles.css styles.scss$ sass --watch styles.scss:styles.css
Installing Sass via Haml$ gem install haml$ mv styles.css styles.scss$ sass --watch styles.scss:styles.css
Installing Sass via Haml$ gem install haml$ mv styles.css styles.scss$ sass --watch styles.scss:styles.css
Installing Sass via Haml$ gem install haml$ mv styles.css styles.scss$ sass --watch styles.scss:styles.css
TIP #1Use design principles
TIP #1Use design principlesTIP #2Order by speci city
TIP #1Use design principlesTIP #2Order by speci cityTIP #3Try CSS meta-frameworks
anks!Any questions? Matt Puchlerz   Refresh Chicago @mattpuchlerz                 GeekFest                 MayJun 15 12:48:09 -0500                     26, 2010                 Tue                        2010

Recommended

KEY
Simplifying CSS With Sass
KEY
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
PDF
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
PDF
CSS preprocessor: why and how
KEY
Using Sass - Building on CSS
PDF
Compass, Sass, and the Enlightened CSS Developer
PDF
CSS Extenders
PDF
Preprocessor presentation
PDF
Sassive Aggressive: Using Sass to Make Your Life Easier (NSWG Version)
PDF
Sass
PPTX
Css frameworks
PDF
Sass & Compass (Barcamp Stuttgart 2012)
 
PDF
CSS 開發加速指南-Sass & Compass
PDF
The Near Future of CSS
KEY
Stylesheets of the future with Sass and Compass
PDF
Pacific Northwest Drupal Summit: Basic & SASS
PDF
Sass - Making CSS fun again.
PDF
BloggingWithStyle_2008
TXT
Theme 23
PDF
SASS, Compass, Gulp, Greensock
KEY
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
PPTX
Elegant CSS Design In Drupal: LESS vs Sass
PPTX
Oocss & progressive css3 selectors
PDF
CSS and Layout
PDF
[WebVisions 2010] CSS3 Workshop (Afternoon)
PPTX
Colors In CSS3
PDF
LESS is More
PDF
CSS Quick Reference / Cheat Sheet - Scott DeLoach, ClickStart
KEY
Messy css
PDF
Yuicss R7

More Related Content

KEY
Simplifying CSS With Sass
KEY
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
PDF
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
PDF
CSS preprocessor: why and how
KEY
Using Sass - Building on CSS
PDF
Compass, Sass, and the Enlightened CSS Developer
PDF
CSS Extenders
PDF
Preprocessor presentation
Simplifying CSS With Sass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
CSS preprocessor: why and how
Using Sass - Building on CSS
Compass, Sass, and the Enlightened CSS Developer
CSS Extenders
Preprocessor presentation

What's hot

PDF
Sassive Aggressive: Using Sass to Make Your Life Easier (NSWG Version)
PDF
Sass
PPTX
Css frameworks
PDF
Sass & Compass (Barcamp Stuttgart 2012)
 
PDF
CSS 開發加速指南-Sass & Compass
PDF
The Near Future of CSS
KEY
Stylesheets of the future with Sass and Compass
PDF
Pacific Northwest Drupal Summit: Basic & SASS
PDF
Sass - Making CSS fun again.
PDF
BloggingWithStyle_2008
TXT
Theme 23
PDF
SASS, Compass, Gulp, Greensock
KEY
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
PPTX
Elegant CSS Design In Drupal: LESS vs Sass
PPTX
Oocss & progressive css3 selectors
PDF
CSS and Layout
PDF
[WebVisions 2010] CSS3 Workshop (Afternoon)
PPTX
Colors In CSS3
PDF
LESS is More
Sassive Aggressive: Using Sass to Make Your Life Easier (NSWG Version)
Sass
Css frameworks
Sass & Compass (Barcamp Stuttgart 2012)
 
CSS 開發加速指南-Sass & Compass
The Near Future of CSS
Stylesheets of the future with Sass and Compass
Pacific Northwest Drupal Summit: Basic & SASS
Sass - Making CSS fun again.
BloggingWithStyle_2008
Theme 23
SASS, Compass, Gulp, Greensock
Beyond HTML - Scriptsprachen, Frameworks, Templatesprachen und vieles mehr
Elegant CSS Design In Drupal: LESS vs Sass
Oocss & progressive css3 selectors
CSS and Layout
[WebVisions 2010] CSS3 Workshop (Afternoon)
Colors In CSS3
LESS is More

Similar to Organizing & Simplifying CSS [with Sass]

PDF
CSS Quick Reference / Cheat Sheet - Scott DeLoach, ClickStart
KEY
Messy css
PDF
Yuicss R7
PDF
Advanced CSS Troubleshooting & Efficiency
PPTX
PPTX
Css for Development
PDF
Html standards presentation
KEY
Demystifying CSS & WordPress
PDF
Advanced CSS Troubleshooting
PPT
Introduction to HTML
PDF
CSS Systems
PDF
Highly Maintainable, Efficient, and Optimized CSS
PDF
Developing Your Ultimate Package
PDF
Doing more with LESS
KEY
CSS3 Takes on the World
PDF
DRY cross-browser CSS with SASS
DOC
Cis363 a week 3 ilab 3
DOC
Cis363 week 3 i lab 3
DOC
Cis363 week 3 i lab 3
PDF
How browser engines work?
CSS Quick Reference / Cheat Sheet - Scott DeLoach, ClickStart
Messy css
Yuicss R7
Advanced CSS Troubleshooting & Efficiency
Css for Development
Html standards presentation
Demystifying CSS & WordPress
Advanced CSS Troubleshooting
Introduction to HTML
CSS Systems
Highly Maintainable, Efficient, and Optimized CSS
Developing Your Ultimate Package
Doing more with LESS
CSS3 Takes on the World
DRY cross-browser CSS with SASS
Cis363 a week 3 ilab 3
Cis363 week 3 i lab 3
Cis363 week 3 i lab 3
How browser engines work?

Recently uploaded

PDF
Day 5 - Red Team + Blue Team in the Cloud - 2nd Sight Lab Cloud Security Class
PDF
Session 1 - Solving Semi-Structured Documents with Document Understanding
PDF
Digit Expo 2025 - EICC Edinburgh 27th November
PDF
Security Technologys: Access Control, Firewall, VPN
PDF
Making Sense of Raster: From Bit Depth to Better Workflows
PDF
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...
PPTX
AI in Cybersecurity: Digital Defense by Yasir Naveed Riaz
PPTX
AI's Impact on Cybersecurity - Challenges and Opportunities
PDF
December Patch Tuesday
 
PDF
DevFest El Jadida 2025 - Product Thinking
PDF
API-First Architecture in Financial Systems
PPTX
THIS IS CYBER SECURITY NOTES USED IN CLASS ON VARIOUS TOPICS USED IN CYBERSEC...
PDF
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
PPTX
cybercrime in Information security .pptx
DOCX
Introduction to the World of Computers (Hardware & Software)
PPTX
Cloud-and-AI-Platform-FY26-Partner-Playbook.pptx
PDF
Eredità digitale sugli smartphone: cosa resta di noi nei dispositivi mobili
PDF
TrustArc Webinar - Looking Ahead: The 2026 Privacy Landscape
PDF
The year in review - MarvelClient in 2025
PPTX
From Backup to Resilience: How MSPs Are Preparing for 2026
 
Day 5 - Red Team + Blue Team in the Cloud - 2nd Sight Lab Cloud Security Class
Session 1 - Solving Semi-Structured Documents with Document Understanding
Digit Expo 2025 - EICC Edinburgh 27th November
Security Technologys: Access Control, Firewall, VPN
Making Sense of Raster: From Bit Depth to Better Workflows
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...
AI in Cybersecurity: Digital Defense by Yasir Naveed Riaz
AI's Impact on Cybersecurity - Challenges and Opportunities
December Patch Tuesday
 
DevFest El Jadida 2025 - Product Thinking
API-First Architecture in Financial Systems
THIS IS CYBER SECURITY NOTES USED IN CLASS ON VARIOUS TOPICS USED IN CYBERSEC...
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
cybercrime in Information security .pptx
Introduction to the World of Computers (Hardware & Software)
Cloud-and-AI-Platform-FY26-Partner-Playbook.pptx
Eredità digitale sugli smartphone: cosa resta di noi nei dispositivi mobili
TrustArc Webinar - Looking Ahead: The 2026 Privacy Landscape
The year in review - MarvelClient in 2025
From Backup to Resilience: How MSPs Are Preparing for 2026
 

Organizing & Simplifying CSS [with Sass]

  • 1.
    Organizing & Simplifying your CSS [with Sass] Matt Puchlerz Refresh Chicago @mattpuchlerz May 26, 2010
  • 2.
    Organizing & Simplifying your CSS [with Sass] Matt Puchlerz Refresh Chicago @mattpuchlerz May 26, 2010
  • 3.
    Organizing & Simplifying your CSS [with Sass] Matt Puchlerz Refresh Chicago @mattpuchlerz May 26, 2010
  • 4.
    Organizing & Simplifying your CSS [with Sass] Matt Puchlerz Refresh Chicago @mattpuchlerz GeekFest MayJun 15 12:28:43 -0500 26, 2010 Tue 2010
  • 6.
  • 7.
  • 8.
    111 2 12Balance 3 .carousel { 4 width:80%;height:50px} 5 6 blockquote 7 { 8 position: relative; 9 padding: 0px; 1 color: #555;Images © Digital Web Magazine 0 }
  • 9.
    111 2 12Balance 3 .carousel { 4 width: 80%; 5 height: 50px; 6 } 7 8 blockquote { 9 position: relative; 1 padding: 0;Images © Digital Web Magazine 0 color: #555;
  • 10.
    1 11 2 12Rhythm 3 #branding { 4 width: 350px; 5 height: 150px; 6 padding: 0px; 7 position: absolute; 8 top: 15px; 9 left: 20px; 1 background: #c00;Images © Digital Web Magazine 0 color: #fff;
  • 11.
    1 11 2 12Rhythm 3 #branding { 4 background: #c00; 5 color: #fff; 6 height: 150px; 7 left: 20px; 8 padding: 0; 9 position: absolute; 1 top: 15px;Images © Digital Web Magazine 0 width: 350px;
  • 12.
    111 2 12Proximity 3 #header {…} 4 .error {…} 5 .error p {…} 6 7 .info {…} 8 .error ul {…} 9 .info p {…} 1Images © Digital Web Magazine 0 #header a {…}
  • 13.
    111 2 12Proximity 3 .error {…} 4 .error p {…} 5 .error ul {…} 6 7 .info {…} 8 .info p {…} 9 1 #header {…}Images © Digital Web Magazine 0 #header a {…}
  • 14.
  • 15.
    <span class=“info”>Hi!</.info {color: green }span { color: red }
  • 16.
    <span class=“info”>Hi!</.info {color: green }span { color: red }
  • 17.
    <span class=“info”>Hi!</.info {color: green }span { color: red }
  • 18.
    Point value basedon:Style Attribute 1000 ptsID 100 ptsClass or Attribute 10 ptsElement 1 pt
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
    111 2 12 3 p {…} 4 ul {…} 5 6 .error {…} 7 .notice {…} 8 9 input[type=“submit”] {…}10 #container {…}
  • 29.
    111 2 12 3 p {…} 4 ul {…} 5 6 .error {…} 7 .notice {…} 8 9 input[type=“submit”] {…}10 #container {…}
  • 30.
    111 2 12 3 p {…} 4 ul {…} 5 6 .error {…} 7 .notice {…} 8 9 input[type=“submit”] {…}10 #container {…}
  • 31.
    111 2 12 3 p {…} 4 ul {…} 5 6 .error {…} 7 .notice {…} 8 9 input[type=“submit”] {…}10 #container {…}
  • 32.
    TIP #3Try CSSmeta-frameworks
  • 34.
  • 35.
    1 11 2 12Nesting 3 header { 4 font: { 5 size: 18px; 6 weight: bold; 7 } 8 9 h2 { 1 color: blue; 0 }
  • 36.
    111 2 12Variables 3 $orange: #c75000; 4 5 body { 6 background: $orange; 7 font-family: $ff; 8 line-height: $lh; 9 } 1 0
  • 37.
    111 2 12Math 3 $lh: 20px; 4 5 dl, ol, p, ul { 6 line-height: $lh; 7 margin-bottom: $lh; 8 } 9 1 #container { 0 padding: $lh / 2;
  • 38.
    111 2 12Functions 3 $red: #c00; 4 5 a{ 6 color: $red; 7 8 :hover { 9 color: darken($red); 1 } 0 }
  • 39.
    111 2 12Mixins 3 @mixin rounded($rad) { 4 -moz-border-radi… 5 -o-border-radius… 6 -webkit-border-r… 7 } 8 9 input[type=“submit”], 1 select, 0 textarea {
  • 40.
    111 2 12“SCSS” 3 $lh: 18px; Syntax 4 5 #feature { 6 padding: $lh; 7 width: $lh * 10; 8 9 &:hover { 1 @include rounded; 0 padding: $lh * 2;
  • 41.
    111 2 12“SASS” 3 $lh: 18px Syntax 4 5 #feature 6 padding: $lh 7 width: $lh * 10 8 9 &:hover 1 @include rounded 0 padding: $lh * 2
  • 46.
    Installing Sass viaHaml$ gem install haml$ mv styles.css styles.scss$ sass --watch styles.scss:styles.css
  • 47.
    Installing Sass viaHaml$ gem install haml$ mv styles.css styles.scss$ sass --watch styles.scss:styles.css
  • 48.
    Installing Sass viaHaml$ gem install haml$ mv styles.css styles.scss$ sass --watch styles.scss:styles.css
  • 49.
    Installing Sass viaHaml$ gem install haml$ mv styles.css styles.scss$ sass --watch styles.scss:styles.css
  • 50.
  • 51.
    TIP #1Use designprinciplesTIP #2Order by speci city
  • 52.
    TIP #1Use designprinciplesTIP #2Order by speci cityTIP #3Try CSS meta-frameworks
  • 53.
    anks!Any questions? MattPuchlerz Refresh Chicago @mattpuchlerz GeekFest MayJun 15 12:48:09 -0500 26, 2010 Tue 2010

Editor's Notes

  • #2 Web craftsmanOne of many software craftspeople at Obtiva
  • #3 Web craftsmanOne of many software craftspeople at Obtiva
  • #4 Web craftsmanOne of many software craftspeople at Obtiva
  • #5 Web craftsmanOne of many software craftspeople at Obtiva
  • #6 Web craftsmanOne of many software craftspeople at Obtiva
  • #7 Show of handsGross!Point out nauseating parts; offer tips
  • #8 Show of handsGross!Point out nauseating parts; offer tips
  • #9 Steve Smith (Ordered List) gave a talk on &amp;#x201C;Designing Code&amp;#x201D;Don&amp;#x2019;t just write CSS, sculpt it.
  • #10 Uneven brackets, indentation, spacingNo alignment
  • #12 Could be whitespace between rulesWithin properties is &amp;#x201C;progressive rhythm&amp;#x201D;&amp;#x2026; How to improve?
  • #13 Alphabetize!
  • #14 Items in close proximity to, or aligned with one another, ought to be grouped by similarity..error class in several spots#header in several spots
  • #15 Now that we are grouping well, be mindful of order
  • #16 CSS properties are applied based on the specificity of their selector and their order.
  • #38 Popular &amp;#x201C;frameworks&amp;#x201D; like Blueprint and 960.gs just give us defaults&amp;#x201C;Metaframeworks&amp;#x201D; alter the way we write CSS
  • #42 Nesting selectors and properties

[8]ページ先頭

©2009-2025 Movatter.jp