SlideShare a Scribd company logo
COMPASS, SASS, AND THE ENLIGHTENED WEB


                             WYNNNETHERLAND
whoami
+
Compass, Sass, and the Enlightened CSS Developer
or “Okie” in the local
Native Oklahoman        vernacular.




              Naturalized Texan
Like you, I work on the Interwebs.
... but my story begins in
the

DARK AGES
Literally.




   this still works :
brew install lynx
gopher://      anyone?
    look it up, kids.
Flight of the Navigator




 technology from the future!
These were perilous times.
Full of strange magic.
<font>
<center>
<blink>
<table>
  <tr>
    <td valign=top>Remember this?</td>
    <td>
    <table>
         <tr>
           <td>And this?</td>
         </tr>
       </table>
    </td>
  </tr>

                        Nested tables FTW.
  </tr>
</table>
JavaScript vs. JScript
Compass, Sass, and the Enlightened CSS Developer
Sometimes we’d hide these and
update the page without a refresh, back
when Ajax was something Momma used to
clean the bathtub.
DOM level 0.
document.formName.inputName
Compass, Sass, and the Enlightened CSS Developer
Why am I sharing all this?
Consider it inoculation against
CURMUDGEONRY.
THAT’S THE
WAY IT WAS AND
WE LIKED IT.
“GET OFF
 MY LAWN.”
 Nathan Smith
 Creator, 960.gs
 RefreshOKC headliner
 Reformed Curmudgeon
Back to our story
the

RENAISSANCE
JavaScript Frameworks
CSS Frameworks
HTML5
CSS3
border-radius
border-image
www.zurb.com/playground/awesome-overlays
background-size
gradients
RGBA, HSL, HSLA colors

rgba (0,0,0,1) is the new black!
text-shadow
box-shadow
word
wrap
outline
columns
@font-face
       means

Typographic freedom!
Cool
       New selectors
CSS3 selectors (and some golden oldies)
          *                 ::first-letter                   :enabled
          E                   :first-line                   :disabled
       .class                 ::first-line                   :checked
         #id              E[attribute^=value]                 :header
         E F              E[attribute$=value]
        E > F             E[attribute*=value]
        E + F                     E ~ F
    E[attribute]                  :root       Steal   this from jQuery, please
E[attribute=value]            :last-child
E[attribute~=value]           :only-child
E[attribute|=value]           :nth-child()
    :first-child           :nth-last-child()
        :link               :first-of-type
      :visited               :last-of-type
      :lang()                :only-of-type
      :before               :nth-of-type()
      ::before            :nth-last-of-type()
       :after                    :empty
      ::after                    :not()
   :first-letter                :target
This is not a talk about CSS
Follow @smashingmag for your CSS tips & tricks
I want to talk about

        REAL stylesheet innovation
I want to talk about

        HOW we write stylesheets
I want to talk about

     how we MAINTAIN stylesheets
I want to talk about

      how we SIMPLIFY stylesheets
We're gonna see a brave new
world where they run everybody a
wire and hook us all up to a grid.
Yes, sir, a veritable age of reason.
Like the one they had in France.
Not a moment too soon.

~ Ulysses Everett McGill
the
AGE OF ENLIGHTENMENT
Sass
Syntax options
Syntax options - SCSS   Sassy CSS!


table.users {
  tr {
    td {
       background: #d1d1d;
       a {
         color: #111;
       }
    }
  }
}
Syntax options - Indented   I   whitespace


table.users
  tr
     td
        background: #d1d1d
        a
          color: #111
Nested rules
Nested rules - selectors
table.users tr td a {color: #111}

table.users tr.alt td a {color: #333}
Nested rules - selectors
table.users                Lo  o k , Ma,
  tr                        n o braces
     td
        a
          color: #111                or semicolons
     td.alt
        a
          color: #333
                                  But you can use
                                 both if you wanna
Nested rules - selectors
table.users
  tr
                           C ha nge this
     td
        color: #111
        &.alt                         you chang e these
                           . . . an d
          color: #333
        &:hover
          color: #666
Nested rules - properties
.users
  font:
    size: 1.2em
    style: italics
    weight: bold
Variables
Variables
.user {
  background: #333;
  border-size: 2px;
}

.owner {
  background: #333;
  border-size: 2px;
}

.admin {
  background: #666;
  border-size: 4px;
}
Variables
!gray = #333
!default_border = 2px

.user
  background: = !gray
  border-size: = !default_border

.owner

                                            r mixing!
  background: = !gray
  border-size: = !default_border   and colo
.admin                                Ev  e n ma t h !
  background: = !gray + #333
  border-size: = !default_border + 2px
Variables
 $font-apres:           Apres, Arial, sans-serif
 $dark-gray:            #1e1e1e !default
 $body-text:            #bbb !default
 $strong-text:          lighten($body-text, 40%)
 $muted-text:           darken($body-text, 40%)
 $content-background:   #fff
 $content-text:         #555
 $content-border:       #ccc
 $form-background:      rgba(0, 0, 0, .5)

 $blue-primary:         #6095c2
 $blue-secondary:       #1742db
 $green-primary:        #64b900
 $green-secondary:      #298527
 $pink-primary:         #f44ab7
Mixins
Mixins
.avatar {
  padding: 2px;
  border: solid 1px #ddd;
  position: absolute;
  top: 5px;
  left: 5px;
}

p img {
  padding: 2px;
  border: solid 1px #ddd;
}
Mixins
=frame(!padding_width = 2px, !border_color = #ddd)
  padding = !padding_width
  border:
    width: 1px
                                             defines   t he mixin
    style: solid
    color = !border_color

.avatar
  +frame
  position: absolute
  top: 5px
                       mixes in t h e rule s
  left: 5px

p img
  +frame(1px, #ccc)
Selector inheritance
Selector inheritance
.flash {
  padding: 5px;
  border-width: 1px;
  font-weight: bold;
}
.error {
  color: #8a1f11;
  background: #fbe3e4;
}
.notice {
  color: #514721;
  background: #fff6bf;
}
Selector inheritance
.flash
  padding: 5px
  border-width: 1px
  font-weight: bold

.error.flash
  color: #8a1f11
  background: #fbe3e4

.notice.flash
  color: #514721
  background: #fff6bf
Selector inheritance
.flash,
.error,
.notice { padding: 5px; border-width: 1px; font-weight: bold; }

.error { color: #8a1f11; background: #fbe3e4; }

.notice { color: #514721; background: #fff6bf; }



                   now we can use a single class in our markup
Imports
Imports
@import url(/css/reset.css)
@import url(/css/typography.css)
@import url(/css/layout.css)


    parent + 3 @imports = 4 http requests
Imports
@import reset.sass          #   _reset.sass
@import typography.sass     #   _typography.sass
@import layout.sass         #   _layout.sass


          Included at compile time -
             just one http request
Imports + Mixins

  Now it gets fun!
Compass CSS3 mixins
@import compass/css3.sass

.callout
  +border-radius(5px)
  +linear-gradient("left top", "left bottom", #fff, #ddd)



.callout {                             very different syntax
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  -border-radius: 5px;
  background-image: -moz-linear-gradient(top, bottom, from(#fff), to
(#ddd));
  background-image: -webkit-gradient(linear, left top, left bottom,
color-stop(0.00, #fff), color-stop(1.00, #ddd));
}
Compass CSS3 mixins
css3/border_radius.sass
css3/inline_block.sass
css3/opacity.sass
css3/text_shadow.sass
css3/box_shadow.sass
css3/columns.sass
css3/box_sizing.sass
css3/gradient.sass
css3/background_clip.sass
css3/background_origin.sass
css3/background_size.sass
css3/font_face.sass
css3/transform.sass
css3/transition.sass
Bring your favorite CSS Framework
A Blueprint example
<div id='wrapper' class="container">
    <div id='content' class="span-7 prepend-1">
        <div id='main' class="container">

                                                      boo
            ...
        </div>
        <div id='featured' class="span-5 last">
            ...
        </div>
    </div>
    <div id='sidebar' class="span-3 append-1 last">
        ...
    </div>
</div>
A Blueprint example
@import   blueprint/reset.sass
@import   partials/base.sass
@import   blueprint
@import   blueprint/modules/scaffolding.sass


#wrapper
  +container
  #content
    +column(7)
    +append(1)
    #featured
      +column(5, true)
  #sidebar
    +column(3, true)
    +prepend(1)
Functions
Very. Powerful. Functions.
Sass 2.4 color functions
hue(#cc3) => 60deg
saturation(#cc3) => 60%
lightness(#cc3) => 50%

adjust-hue(#cc3, 20deg) => #9c3
saturate(#cc3, 10%) => #d9d926
desaturate(#cc3, 10%) => #bfbf40
lighten(#cc3, 10%) => #d6d65c
darken(#cc3, 10%) => #a3a329

grayscale(#cc3) => desaturate(#cc3, 100%) = #808080
complement(#cc3) => adjust-hue(#cc3, 180deg) = #33c

mix(#cc3, #00f) => #e56619
mix(#cc3, #00f, 10%) => #f91405
mix(#cc3, #00f, 90%) => #d1b72d




http://nex-3.com/posts/89-powerful-color-manipulation-with-sass
with alpha support!
Sass 2.4 color functions
mix(rgba(51, 255, 51, 0.75), #f00) => rgba(178, 95, 19, 0.875)
mix(rgba(51, 255, 51, 0.90), #f00) => rgba(163, 114, 22, 0.95)

alpha(rgba(51, 255, 51, 0.75)) => 0.75
opacity(rgba(51, 255, 51, 0.75)) => 0.75

opacify(rgba(51, 255, 51, 0.75), 0.1) => rgba(51, 255, 51, 0.85)
fade-in(rgba(51, 255, 51, 0.75), 0.1) => rgba(51, 255, 51, 0.85)

transparentize(rgba(51, 255, 51, 0.75), 0.1) => rgba(51, 255, 51, 0.65)
fade-out(rgba(51, 255, 51, 0.75), 0.1) => rgba(51, 255, 51, 0.65)




http://nex-3.com/posts/89-powerful-color-manipulation-with-sass
Who makes this syntactic sugar?
Patte
       xtens io n s &             rns &
C SS e                       plugins
     co mpiler

             Sass and Compass
...like peas and carrots.
Sass and Compass
$ sudo gem install haml
$ sudo gem install compass --pre




CALL IT FROM THE COMMAND LINE
$ sass screen.sass screen.css


OR COMPASS-IZE YOUR PROJECT
$ compass --rails -f blueprint


OR WATCH A FOLDER
$ compass --watch
A quick survey of Compass
Blueprint
Blueprint
 ★ Buttons             ★ Link Icons
 ★ Colors              ★ Liquid
 ★ Debug               ★ Print
 ★ Fancy Type          ★ Reset
 ★ Form                ★ Rtl
 ★ Grid                ★ Scaffolding
 ★ Interaction         ★ Typography
 ★ Internet Explorer   ★ Utilities
CSS3
CSS3
 ★ Appearance          ★ Gradient
 ★ Background Clip     ★ Images
 ★ Background Origin   ★ Inline Block
 ★ Background Size     ★ Opacity
 ★ Border Radius       ★ Shared Utilities
 ★ Box                 ★ Text Shadow
 ★ Box Shadow          ★ Transform
 ★ Box Sizing          ★ Transform (legacy)
 ★ CSS3 Pie            ★ Transition
 ★ Columns
 ★ Font Face
Image sprites
I like the Sprite in you
   Image sprites                                                                  ®




                                                                                             1.
                                                     @import "icon/*.png"
@import "icon/*.png"

.actions     2.                                      public/images/icon/new.png
                                                     public/images/icon/edit.png
  .new
                                                     public/images/icon/save.png
    +icon-sprite(new)
                                                     public/images/icon/delete.png
  .edit
    +icon-sprite(edit)
  .save                     .icon-sprite,
    +icon-sprite(save)      .actions .new,
  .delete                   .actions .edit,
    +icon-sprite(delete)    .actions .save,
                            .actions .delete
                            { background: url('/images/icon-34fe0604ab.png') no-repeat; }

                            .actions   .new      {   background-position:   0   -64px;   }
                            .actions   .edit     {   background-position:   0   -32px;   }
                            .actions   .save     {   background-position:   0   -96px;   }

                       3.
                            .actions   .delete   {   background-position:   0   0;       }
URL helpers
URL helpers
#nav
  background: image-url("nav_bg.png") repeat-x top center



DEVELOPMENT
#nav {
  background: url("/images/nav_bg.png") repeat-x top center;
}

                                                           elopment,
                                                ths for dev
                                    relative pa
PRODUCTION                                             production
                                         a bsolute for
#nav {
  background: url("http://assets.example.com/images/nav_bg.png")
repeat-x top center;
}
URL helpers
stylesheet-url($path)

font-url($path)

image-url($path)
Share your patterns
http://brandonmathis.com/projects/fancy-buttons/
@import "fancy-buttons"
button,
a.button
  +fancy-button(#2966a8)
compass-960
Compass 960
 $ninesixty-columns: 16


 #wrap
   +grid-container
   #left-nav
     +alpha
     +grid(5)
   #main-content
     +grid-prefix(1)
     +grid(10)
     +omega




https://github.com/chriseppstein/compass-960-plugin
compass-wordpress
shameless plug
Compass and WordPress
$ gem install compass-wordpress


CRANK OUT A NEW SASS-Y WORDPRESS THEME
$ compass -r compass-wordpress 
        -f wordpress  -p thematic 
        --sass-dir=sass --css-dir=css 
        -s compressed my_awesome_theme


AUTOCOMPILE YOUR CHANGES
$ compass --watch
Announcing!
compass-formalize
Compass, Sass, and the Enlightened CSS Developer
Compass and Formalize
INSTALL THE GEM
$ gem install compass_formalize


CREATE THE COMPASS PROJECT
$ compass create my-great-app -r compass_formalize

$ cd my-great-app


APPLY THE PATTERN
$ compass install formalize/jquery
Stats
Stats
|   ---------------------------------   |   -----   |   ----------   |   --------------   |   -----------   |   ---------   |   --------------   |
|   Filename                            |   Rules   |   Properties   |      Mixins Defs   |   Mixins Used   |   CSS Rules   |   CSS Properties   |
|   ---------------------------------   |   -----   |   ----------   |   --------------   |   -----------   |   ---------   |   --------------   |
|   app/stylesheets/_960.sass           |     198   |          141   |                0   |             0   |          --   |               --   |
|   app/stylesheets/_animation.sass     |       2   |            2   |                0   |             0   |          --   |               --   |
|   app/stylesheets/application.sass    |     268   |          607   |                0   |            33   |        1131   |             3684   |
|   app/stylesheets/_data_table.sass    |      39   |           66   |                0   |             4   |          --   |               --   |
|   app/stylesheets/_datepicker.sass    |     125   |          242   |                0   |             0   |          --   |               --   |
|   app/stylesheets/_formalize.sass     |      82   |           78   |                0   |             4   |          --   |               --   |
|   app/stylesheets/_forms.sass         |     227   |          242   |                0   |            21   |          --   |               --   |
|   app/stylesheets/ie.sass             |       0   |            0   |                0   |             0   |           0   |                0   |
|   app/stylesheets/_jscrollpane.sass   |      20   |           43   |                0   |             0   |          --   |               --   |
|   app/stylesheets/_prettify.sass      |      16   |           16   |                0   |             0   |          --   |               --   |
|   app/stylesheets/print.sass          |       0   |            0   |                0   |             0   |           0   |                0   |
|   app/stylesheets/_reset.sass         |     111   |           18   |                0   |             0   |          --   |               --   |
|   app/stylesheets/_text.sass          |      27   |           18   |                0   |             0   |          --   |               --   |
|   app/stylesheets/_tiptip.sass        |      19   |           40   |                0   |             0   |          --   |               --   |
|   app/stylesheets/_util.sass          |      56   |           54   |                0   |             0   |          --   |               --   |
|   app/stylesheets/_vars.sass          |       0   |            6   |                2   |             0   |          --   |               --   |
|   ---------------------------------   |   -----   |   ----------   |   --------------   |   -----------   |   ---------   |   --------------   |
|   Total (16 files):                   |    1190   |         1573   |                2   |            62   |        1131   |             3684   |
|   ---------------------------------   |   -----   |   ----------   |   --------------   |   -----------   |   ---------   |   --------------   |
Isn’t she Sassy, folks?




GET
THE
BOOK.
Save 40% and get early access!


           sass40

Sadly, sass100 is not a valid code.
Resources     an d thanks for having me!


sass-lang.com
beta.compass-style.org


                               slides!
wynn.fm/okc
                    gra b t he

     blog:    wynnnetherland.com
     twitter: @pengwynn
     email: wynn@hp.com

     linkedin.com/in/netherland
Ad

More Related Content

What's hot (20)

Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass Presentation
Daniel Yuschick
 
SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESS
Itai Koren
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Claudina Sarahe
 
JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
Wynn Netherland
 
Ruby on Rails 3.1: Let's bring the fun back into web programing
Ruby on Rails 3.1: Let's bring the fun back into web programingRuby on Rails 3.1: Let's bring the fun back into web programing
Ruby on Rails 3.1: Let's bring the fun back into web programing
Bozhidar Batsov
 
Finding your way with Sass+Compass
Finding your way with Sass+CompassFinding your way with Sass+Compass
Finding your way with Sass+Compass
drywallbmb
 
LESS CSS Pre-processor
LESS CSS Pre-processorLESS CSS Pre-processor
LESS CSS Pre-processor
Kannika Kong
 
Xlrays online web tutorials
Xlrays online web tutorialsXlrays online web tutorials
Xlrays online web tutorials
Yogesh Gupta
 
Sass and Compass - Getting Started
Sass and Compass - Getting StartedSass and Compass - Getting Started
Sass and Compass - Getting Started
edgincvg
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction Sass
Zeeshan Ahmed
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y trying
James Cryer
 
Keep calm and let's play CSS3
Keep calm and let's play CSS3Keep calm and let's play CSS3
Keep calm and let's play CSS3
A2 Comunicação
 
LESS
LESSLESS
LESS
Joe Seifi
 
Software programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS filesSoftware programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS files
Dinu Suman
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
Rob Friesel
 
Sass
SassSass
Sass
Bram Verdyck
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
Rachel Andrew
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
Rachel Andrew
 
Document
DocumentDocument
Document
Naveed Anjum
 
HTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventionsHTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventions
Knoldus Inc.
 
Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass Presentation
Daniel Yuschick
 
SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESS
Itai Koren
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Claudina Sarahe
 
Ruby on Rails 3.1: Let's bring the fun back into web programing
Ruby on Rails 3.1: Let's bring the fun back into web programingRuby on Rails 3.1: Let's bring the fun back into web programing
Ruby on Rails 3.1: Let's bring the fun back into web programing
Bozhidar Batsov
 
Finding your way with Sass+Compass
Finding your way with Sass+CompassFinding your way with Sass+Compass
Finding your way with Sass+Compass
drywallbmb
 
LESS CSS Pre-processor
LESS CSS Pre-processorLESS CSS Pre-processor
LESS CSS Pre-processor
Kannika Kong
 
Xlrays online web tutorials
Xlrays online web tutorialsXlrays online web tutorials
Xlrays online web tutorials
Yogesh Gupta
 
Sass and Compass - Getting Started
Sass and Compass - Getting StartedSass and Compass - Getting Started
Sass and Compass - Getting Started
edgincvg
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction Sass
Zeeshan Ahmed
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y trying
James Cryer
 
Keep calm and let's play CSS3
Keep calm and let's play CSS3Keep calm and let's play CSS3
Keep calm and let's play CSS3
A2 Comunicação
 
Software programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS filesSoftware programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS files
Dinu Suman
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
Rob Friesel
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
Rachel Andrew
 
HTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventionsHTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventions
Knoldus Inc.
 

Similar to Compass, Sass, and the Enlightened CSS Developer (20)

Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
Mario Noble
 
DotNetNuke World CSS3
DotNetNuke World CSS3DotNetNuke World CSS3
DotNetNuke World CSS3
gravityworksdd
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
Bryce Kerley
 
Getting Started with Sass & Compass
Getting Started with Sass & CompassGetting Started with Sass & Compass
Getting Started with Sass & Compass
Rob Davarnia
 
LESS(CSS preprocessor)
LESS(CSS preprocessor)LESS(CSS preprocessor)
LESS(CSS preprocessor)
VIPIN KUMAR
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
ThemePartner
 
Learn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandLearn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day Deutschland
ThemePartner
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
 
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Adam Darowski
 
Compass And Sass(Tim Riley)
Compass And Sass(Tim Riley)Compass And Sass(Tim Riley)
Compass And Sass(Tim Riley)
elliando dias
 
Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.
Eugene Nor
 
Sass Essentials
Sass EssentialsSass Essentials
Sass Essentials
romiguelangel
 
CSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and ConsCSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and Cons
Sanjoy Kr. Paul
 
Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)
emrox
 
Rapid Prototyping
Rapid PrototypingRapid Prototyping
Rapid Prototyping
Even Wu
 
HTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwordsHTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwords
Mo Jangda
 
CSS Extenders
CSS ExtendersCSS Extenders
CSS Extenders
Idan Gazit
 
CSS3 is Not Magic Pixie Dust
CSS3 is Not Magic Pixie DustCSS3 is Not Magic Pixie Dust
CSS3 is Not Magic Pixie Dust
Kyle Adams
 
Css3 101
Css3 101Css3 101
Css3 101
Ignacio Coloma
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the Backend
FITC
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
Mario Noble
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
Bryce Kerley
 
Getting Started with Sass & Compass
Getting Started with Sass & CompassGetting Started with Sass & Compass
Getting Started with Sass & Compass
Rob Davarnia
 
LESS(CSS preprocessor)
LESS(CSS preprocessor)LESS(CSS preprocessor)
LESS(CSS preprocessor)
VIPIN KUMAR
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
ThemePartner
 
Learn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandLearn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day Deutschland
ThemePartner
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
 
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Adam Darowski
 
Compass And Sass(Tim Riley)
Compass And Sass(Tim Riley)Compass And Sass(Tim Riley)
Compass And Sass(Tim Riley)
elliando dias
 
Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.
Eugene Nor
 
CSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and ConsCSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and Cons
Sanjoy Kr. Paul
 
Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)Sass & Compass (Barcamp Stuttgart 2012)
Sass & Compass (Barcamp Stuttgart 2012)
emrox
 
Rapid Prototyping
Rapid PrototypingRapid Prototyping
Rapid Prototyping
Even Wu
 
HTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwordsHTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwords
Mo Jangda
 
CSS3 is Not Magic Pixie Dust
CSS3 is Not Magic Pixie DustCSS3 is Not Magic Pixie Dust
CSS3 is Not Magic Pixie Dust
Kyle Adams
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the Backend
FITC
 
Ad

More from Wynn Netherland (9)

Your government is Mashed UP!
Your government is Mashed UP!Your government is Mashed UP!
Your government is Mashed UP!
Wynn Netherland
 
MongoDB is the MashupDB
MongoDB is the MashupDBMongoDB is the MashupDB
MongoDB is the MashupDB
Wynn Netherland
 
America, your congress is Mashed UP!
America, your congress is Mashed UP!America, your congress is Mashed UP!
America, your congress is Mashed UP!
Wynn Netherland
 
CSS Metaframeworks: King of all @media
CSS Metaframeworks: King of all @mediaCSS Metaframeworks: King of all @media
CSS Metaframeworks: King of all @media
Wynn Netherland
 
Hands on with Ruby & MongoDB
Hands on with Ruby & MongoDBHands on with Ruby & MongoDB
Hands on with Ruby & MongoDB
Wynn Netherland
 
MongoDB - Ruby document store that doesn't rhyme with ouch
MongoDB - Ruby document store that doesn't rhyme with ouchMongoDB - Ruby document store that doesn't rhyme with ouch
MongoDB - Ruby document store that doesn't rhyme with ouch
Wynn Netherland
 
Build An App Start A Movement
Build An App Start A MovementBuild An App Start A Movement
Build An App Start A Movement
Wynn Netherland
 
Javascript And Ruby Frameworks
Javascript And Ruby FrameworksJavascript And Ruby Frameworks
Javascript And Ruby Frameworks
Wynn Netherland
 
Free(ish) Tools For Virtual Teams
Free(ish) Tools For Virtual TeamsFree(ish) Tools For Virtual Teams
Free(ish) Tools For Virtual Teams
Wynn Netherland
 
Your government is Mashed UP!
Your government is Mashed UP!Your government is Mashed UP!
Your government is Mashed UP!
Wynn Netherland
 
America, your congress is Mashed UP!
America, your congress is Mashed UP!America, your congress is Mashed UP!
America, your congress is Mashed UP!
Wynn Netherland
 
CSS Metaframeworks: King of all @media
CSS Metaframeworks: King of all @mediaCSS Metaframeworks: King of all @media
CSS Metaframeworks: King of all @media
Wynn Netherland
 
Hands on with Ruby & MongoDB
Hands on with Ruby & MongoDBHands on with Ruby & MongoDB
Hands on with Ruby & MongoDB
Wynn Netherland
 
MongoDB - Ruby document store that doesn't rhyme with ouch
MongoDB - Ruby document store that doesn't rhyme with ouchMongoDB - Ruby document store that doesn't rhyme with ouch
MongoDB - Ruby document store that doesn't rhyme with ouch
Wynn Netherland
 
Build An App Start A Movement
Build An App Start A MovementBuild An App Start A Movement
Build An App Start A Movement
Wynn Netherland
 
Javascript And Ruby Frameworks
Javascript And Ruby FrameworksJavascript And Ruby Frameworks
Javascript And Ruby Frameworks
Wynn Netherland
 
Free(ish) Tools For Virtual Teams
Free(ish) Tools For Virtual TeamsFree(ish) Tools For Virtual Teams
Free(ish) Tools For Virtual Teams
Wynn Netherland
 
Ad

Recently uploaded (20)

Emily's slide design 101 - training module
Emily's slide design 101 - training moduleEmily's slide design 101 - training module
Emily's slide design 101 - training module
yourmisswright
 
Baby panda 400.pdf de ciencias naturales
Baby panda 400.pdf de ciencias naturalesBaby panda 400.pdf de ciencias naturales
Baby panda 400.pdf de ciencias naturales
debbie loaiza
 
Presentation mockup using lots of animals
Presentation mockup using lots of animalsPresentation mockup using lots of animals
Presentation mockup using lots of animals
ChunChihChenPhD
 
Take this ppt refference and give content on mahindra commitment to sustainab...
Take this ppt refference and give content on mahindra commitment to sustainab...Take this ppt refference and give content on mahindra commitment to sustainab...
Take this ppt refference and give content on mahindra commitment to sustainab...
kochars428
 
presentation on healing architecture .pptx
presentation on healing architecture .pptxpresentation on healing architecture .pptx
presentation on healing architecture .pptx
buildnpl
 
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngnReport Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
yousafmuzammil19
 
Design of a Low-Power VLSI Router for Network-on-Chip.pptx
Design of a Low-Power VLSI Router for Network-on-Chip.pptxDesign of a Low-Power VLSI Router for Network-on-Chip.pptx
Design of a Low-Power VLSI Router for Network-on-Chip.pptx
BapujiBanothu
 
Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.
vanzan01
 
4K Video Downloader Crack (2025) + License Key Free
4K Video Downloader Crack (2025) + License Key Free4K Video Downloader Crack (2025) + License Key Free
4K Video Downloader Crack (2025) + License Key Free
Designer
 
masterddedeeeeeeeeedded seminar (1).pptx
masterddedeeeeeeeeedded seminar (1).pptxmasterddedeeeeeeeeedded seminar (1).pptx
masterddedeeeeeeeeedded seminar (1).pptx
tgavel7869
 
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptx
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptxHalstead’s_Software_Science_&_Putnam’s_Model[1].pptx
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptx
prachiikumarii1
 
Wondershare Filmora Crack Free Download 2025
Wondershare Filmora Crack Free Download 2025Wondershare Filmora Crack Free Download 2025
Wondershare Filmora Crack Free Download 2025
Designer
 
DOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptxDOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptx
laugolac31
 
Designing Interactive and Engaging Museum Exhibits
Designing Interactive and Engaging Museum ExhibitsDesigning Interactive and Engaging Museum Exhibits
Designing Interactive and Engaging Museum Exhibits
Peach Prime Consultancy
 
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptxPayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
rayyansiddiqui034
 
Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?
Gregory Vigneaux
 
STOCK ANALYSYS.pptx manajemen keuangan s
STOCK ANALYSYS.pptx manajemen keuangan sSTOCK ANALYSYS.pptx manajemen keuangan s
STOCK ANALYSYS.pptx manajemen keuangan s
kfdpontianak2012
 
dFdDVWeb_Design_Basics_Presentation.pptx
dFdDVWeb_Design_Basics_Presentation.pptxdFdDVWeb_Design_Basics_Presentation.pptx
dFdDVWeb_Design_Basics_Presentation.pptx
AKSHAYKAMBLE806728
 
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
Friends of Figm a, Sydney
 
PPT UNTUK ISU STRATEGIS (1).pptx PPT UNTUK ISU STRATEGIS (1).pptx
PPT UNTUK ISU STRATEGIS (1).pptx PPT UNTUK ISU STRATEGIS (1).pptxPPT UNTUK ISU STRATEGIS (1).pptx PPT UNTUK ISU STRATEGIS (1).pptx
PPT UNTUK ISU STRATEGIS (1).pptx PPT UNTUK ISU STRATEGIS (1).pptx
rachmatunnisa29
 
Emily's slide design 101 - training module
Emily's slide design 101 - training moduleEmily's slide design 101 - training module
Emily's slide design 101 - training module
yourmisswright
 
Baby panda 400.pdf de ciencias naturales
Baby panda 400.pdf de ciencias naturalesBaby panda 400.pdf de ciencias naturales
Baby panda 400.pdf de ciencias naturales
debbie loaiza
 
Presentation mockup using lots of animals
Presentation mockup using lots of animalsPresentation mockup using lots of animals
Presentation mockup using lots of animals
ChunChihChenPhD
 
Take this ppt refference and give content on mahindra commitment to sustainab...
Take this ppt refference and give content on mahindra commitment to sustainab...Take this ppt refference and give content on mahindra commitment to sustainab...
Take this ppt refference and give content on mahindra commitment to sustainab...
kochars428
 
presentation on healing architecture .pptx
presentation on healing architecture .pptxpresentation on healing architecture .pptx
presentation on healing architecture .pptx
buildnpl
 
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngnReport Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
yousafmuzammil19
 
Design of a Low-Power VLSI Router for Network-on-Chip.pptx
Design of a Low-Power VLSI Router for Network-on-Chip.pptxDesign of a Low-Power VLSI Router for Network-on-Chip.pptx
Design of a Low-Power VLSI Router for Network-on-Chip.pptx
BapujiBanothu
 
Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.
vanzan01
 
4K Video Downloader Crack (2025) + License Key Free
4K Video Downloader Crack (2025) + License Key Free4K Video Downloader Crack (2025) + License Key Free
4K Video Downloader Crack (2025) + License Key Free
Designer
 
masterddedeeeeeeeeedded seminar (1).pptx
masterddedeeeeeeeeedded seminar (1).pptxmasterddedeeeeeeeeedded seminar (1).pptx
masterddedeeeeeeeeedded seminar (1).pptx
tgavel7869
 
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptx
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptxHalstead’s_Software_Science_&_Putnam’s_Model[1].pptx
Halstead’s_Software_Science_&_Putnam’s_Model[1].pptx
prachiikumarii1
 
Wondershare Filmora Crack Free Download 2025
Wondershare Filmora Crack Free Download 2025Wondershare Filmora Crack Free Download 2025
Wondershare Filmora Crack Free Download 2025
Designer
 
DOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptxDOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptx
laugolac31
 
Designing Interactive and Engaging Museum Exhibits
Designing Interactive and Engaging Museum ExhibitsDesigning Interactive and Engaging Museum Exhibits
Designing Interactive and Engaging Museum Exhibits
Peach Prime Consultancy
 
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptxPayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
rayyansiddiqui034
 
Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?
Gregory Vigneaux
 
STOCK ANALYSYS.pptx manajemen keuangan s
STOCK ANALYSYS.pptx manajemen keuangan sSTOCK ANALYSYS.pptx manajemen keuangan s
STOCK ANALYSYS.pptx manajemen keuangan s
kfdpontianak2012
 
dFdDVWeb_Design_Basics_Presentation.pptx
dFdDVWeb_Design_Basics_Presentation.pptxdFdDVWeb_Design_Basics_Presentation.pptx
dFdDVWeb_Design_Basics_Presentation.pptx
AKSHAYKAMBLE806728
 
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
𝗗𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝗳𝗼𝗿 𝗮𝗹𝗹: 𝗜𝗻𝗰𝗹𝘂𝘀𝗶𝘃𝗲 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗳𝗼𝗿 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀
Friends of Figm a, Sydney
 
PPT UNTUK ISU STRATEGIS (1).pptx PPT UNTUK ISU STRATEGIS (1).pptx
PPT UNTUK ISU STRATEGIS (1).pptx PPT UNTUK ISU STRATEGIS (1).pptxPPT UNTUK ISU STRATEGIS (1).pptx PPT UNTUK ISU STRATEGIS (1).pptx
PPT UNTUK ISU STRATEGIS (1).pptx PPT UNTUK ISU STRATEGIS (1).pptx
rachmatunnisa29
 

Compass, Sass, and the Enlightened CSS Developer

  • 1. COMPASS, SASS, AND THE ENLIGHTENED WEB WYNNNETHERLAND
  • 3. +
  • 5. or “Okie” in the local Native Oklahoman vernacular. Naturalized Texan
  • 6. Like you, I work on the Interwebs.
  • 7. ... but my story begins in
  • 9. Literally. this still works : brew install lynx
  • 10. gopher:// anyone? look it up, kids.
  • 11. Flight of the Navigator technology from the future!
  • 13. Full of strange magic.
  • 17. <table> <tr> <td valign=top>Remember this?</td> <td> <table> <tr> <td>And this?</td> </tr> </table> </td> </tr> Nested tables FTW. </tr> </table>
  • 20. Sometimes we’d hide these and update the page without a refresh, back when Ajax was something Momma used to clean the bathtub.
  • 24. Why am I sharing all this?
  • 25. Consider it inoculation against CURMUDGEONRY.
  • 26. THAT’S THE WAY IT WAS AND WE LIKED IT.
  • 27. “GET OFF MY LAWN.” Nathan Smith Creator, 960.gs RefreshOKC headliner Reformed Curmudgeon
  • 28. Back to our story
  • 32. HTML5
  • 33. CSS3
  • 39. RGBA, HSL, HSLA colors rgba (0,0,0,1) is the new black!
  • 45. @font-face means Typographic freedom!
  • 46. Cool New selectors
  • 47. CSS3 selectors (and some golden oldies) * ::first-letter :enabled E :first-line :disabled .class ::first-line :checked #id E[attribute^=value] :header E F E[attribute$=value] E > F E[attribute*=value] E + F E ~ F E[attribute] :root Steal this from jQuery, please E[attribute=value] :last-child E[attribute~=value] :only-child E[attribute|=value] :nth-child() :first-child :nth-last-child() :link :first-of-type :visited :last-of-type :lang() :only-of-type :before :nth-of-type() ::before :nth-last-of-type() :after :empty ::after :not() :first-letter :target
  • 48. This is not a talk about CSS Follow @smashingmag for your CSS tips & tricks
  • 49. I want to talk about REAL stylesheet innovation
  • 50. I want to talk about HOW we write stylesheets
  • 51. I want to talk about how we MAINTAIN stylesheets
  • 52. I want to talk about how we SIMPLIFY stylesheets
  • 53. We're gonna see a brave new world where they run everybody a wire and hook us all up to a grid. Yes, sir, a veritable age of reason. Like the one they had in France. Not a moment too soon. ~ Ulysses Everett McGill
  • 55. Sass
  • 57. Syntax options - SCSS Sassy CSS! table.users { tr { td { background: #d1d1d; a { color: #111; } } } }
  • 58. Syntax options - Indented I whitespace table.users tr td background: #d1d1d a color: #111
  • 60. Nested rules - selectors table.users tr td a {color: #111} table.users tr.alt td a {color: #333}
  • 61. Nested rules - selectors table.users Lo o k , Ma, tr n o braces td a color: #111 or semicolons td.alt a color: #333 But you can use both if you wanna
  • 62. Nested rules - selectors table.users tr C ha nge this td color: #111 &.alt you chang e these . . . an d color: #333 &:hover color: #666
  • 63. Nested rules - properties .users font: size: 1.2em style: italics weight: bold
  • 65. Variables .user { background: #333; border-size: 2px; } .owner { background: #333; border-size: 2px; } .admin { background: #666; border-size: 4px; }
  • 66. Variables !gray = #333 !default_border = 2px .user background: = !gray border-size: = !default_border .owner r mixing! background: = !gray border-size: = !default_border and colo .admin Ev e n ma t h ! background: = !gray + #333 border-size: = !default_border + 2px
  • 67. Variables $font-apres: Apres, Arial, sans-serif $dark-gray: #1e1e1e !default $body-text: #bbb !default $strong-text: lighten($body-text, 40%) $muted-text: darken($body-text, 40%) $content-background: #fff $content-text: #555 $content-border: #ccc $form-background: rgba(0, 0, 0, .5) $blue-primary: #6095c2 $blue-secondary: #1742db $green-primary: #64b900 $green-secondary: #298527 $pink-primary: #f44ab7
  • 69. Mixins .avatar { padding: 2px; border: solid 1px #ddd; position: absolute; top: 5px; left: 5px; } p img { padding: 2px; border: solid 1px #ddd; }
  • 70. Mixins =frame(!padding_width = 2px, !border_color = #ddd) padding = !padding_width border: width: 1px defines t he mixin style: solid color = !border_color .avatar +frame position: absolute top: 5px mixes in t h e rule s left: 5px p img +frame(1px, #ccc)
  • 72. Selector inheritance .flash { padding: 5px; border-width: 1px; font-weight: bold; } .error { color: #8a1f11; background: #fbe3e4; } .notice { color: #514721; background: #fff6bf; }
  • 73. Selector inheritance .flash padding: 5px border-width: 1px font-weight: bold .error.flash color: #8a1f11 background: #fbe3e4 .notice.flash color: #514721 background: #fff6bf
  • 74. Selector inheritance .flash, .error, .notice { padding: 5px; border-width: 1px; font-weight: bold; } .error { color: #8a1f11; background: #fbe3e4; } .notice { color: #514721; background: #fff6bf; } now we can use a single class in our markup
  • 76. Imports @import url(/css/reset.css) @import url(/css/typography.css) @import url(/css/layout.css) parent + 3 @imports = 4 http requests
  • 77. Imports @import reset.sass # _reset.sass @import typography.sass # _typography.sass @import layout.sass # _layout.sass Included at compile time - just one http request
  • 78. Imports + Mixins Now it gets fun!
  • 79. Compass CSS3 mixins @import compass/css3.sass .callout +border-radius(5px) +linear-gradient("left top", "left bottom", #fff, #ddd) .callout { very different syntax -moz-border-radius: 5px; -webkit-border-radius: 5px; -border-radius: 5px; background-image: -moz-linear-gradient(top, bottom, from(#fff), to (#ddd)); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.00, #fff), color-stop(1.00, #ddd)); }
  • 81. Bring your favorite CSS Framework
  • 82. A Blueprint example <div id='wrapper' class="container"> <div id='content' class="span-7 prepend-1"> <div id='main' class="container"> boo ... </div> <div id='featured' class="span-5 last"> ... </div> </div> <div id='sidebar' class="span-3 append-1 last"> ... </div> </div>
  • 83. A Blueprint example @import blueprint/reset.sass @import partials/base.sass @import blueprint @import blueprint/modules/scaffolding.sass #wrapper +container #content +column(7) +append(1) #featured +column(5, true) #sidebar +column(3, true) +prepend(1)
  • 86. Sass 2.4 color functions hue(#cc3) => 60deg saturation(#cc3) => 60% lightness(#cc3) => 50% adjust-hue(#cc3, 20deg) => #9c3 saturate(#cc3, 10%) => #d9d926 desaturate(#cc3, 10%) => #bfbf40 lighten(#cc3, 10%) => #d6d65c darken(#cc3, 10%) => #a3a329 grayscale(#cc3) => desaturate(#cc3, 100%) = #808080 complement(#cc3) => adjust-hue(#cc3, 180deg) = #33c mix(#cc3, #00f) => #e56619 mix(#cc3, #00f, 10%) => #f91405 mix(#cc3, #00f, 90%) => #d1b72d http://nex-3.com/posts/89-powerful-color-manipulation-with-sass
  • 87. with alpha support! Sass 2.4 color functions mix(rgba(51, 255, 51, 0.75), #f00) => rgba(178, 95, 19, 0.875) mix(rgba(51, 255, 51, 0.90), #f00) => rgba(163, 114, 22, 0.95) alpha(rgba(51, 255, 51, 0.75)) => 0.75 opacity(rgba(51, 255, 51, 0.75)) => 0.75 opacify(rgba(51, 255, 51, 0.75), 0.1) => rgba(51, 255, 51, 0.85) fade-in(rgba(51, 255, 51, 0.75), 0.1) => rgba(51, 255, 51, 0.85) transparentize(rgba(51, 255, 51, 0.75), 0.1) => rgba(51, 255, 51, 0.65) fade-out(rgba(51, 255, 51, 0.75), 0.1) => rgba(51, 255, 51, 0.65) http://nex-3.com/posts/89-powerful-color-manipulation-with-sass
  • 88. Who makes this syntactic sugar?
  • 89. Patte xtens io n s & rns & C SS e plugins co mpiler Sass and Compass
  • 90. ...like peas and carrots.
  • 91. Sass and Compass $ sudo gem install haml $ sudo gem install compass --pre CALL IT FROM THE COMMAND LINE $ sass screen.sass screen.css OR COMPASS-IZE YOUR PROJECT $ compass --rails -f blueprint OR WATCH A FOLDER $ compass --watch
  • 92. A quick survey of Compass
  • 94. Blueprint ★ Buttons ★ Link Icons ★ Colors ★ Liquid ★ Debug ★ Print ★ Fancy Type ★ Reset ★ Form ★ Rtl ★ Grid ★ Scaffolding ★ Interaction ★ Typography ★ Internet Explorer ★ Utilities
  • 95. CSS3
  • 96. CSS3 ★ Appearance ★ Gradient ★ Background Clip ★ Images ★ Background Origin ★ Inline Block ★ Background Size ★ Opacity ★ Border Radius ★ Shared Utilities ★ Box ★ Text Shadow ★ Box Shadow ★ Transform ★ Box Sizing ★ Transform (legacy) ★ CSS3 Pie ★ Transition ★ Columns ★ Font Face
  • 98. I like the Sprite in you Image sprites ® 1. @import "icon/*.png" @import "icon/*.png" .actions 2. public/images/icon/new.png public/images/icon/edit.png .new public/images/icon/save.png +icon-sprite(new) public/images/icon/delete.png .edit +icon-sprite(edit) .save .icon-sprite, +icon-sprite(save) .actions .new, .delete .actions .edit, +icon-sprite(delete) .actions .save, .actions .delete { background: url('/images/icon-34fe0604ab.png') no-repeat; } .actions .new { background-position: 0 -64px; } .actions .edit { background-position: 0 -32px; } .actions .save { background-position: 0 -96px; } 3. .actions .delete { background-position: 0 0; }
  • 100. URL helpers #nav background: image-url("nav_bg.png") repeat-x top center DEVELOPMENT #nav { background: url("/images/nav_bg.png") repeat-x top center; } elopment, ths for dev relative pa PRODUCTION production a bsolute for #nav { background: url("http://assets.example.com/images/nav_bg.png") repeat-x top center; }
  • 104. @import "fancy-buttons" button, a.button +fancy-button(#2966a8)
  • 106. Compass 960 $ninesixty-columns: 16 #wrap +grid-container #left-nav +alpha +grid(5) #main-content +grid-prefix(1) +grid(10) +omega https://github.com/chriseppstein/compass-960-plugin
  • 108. shameless plug Compass and WordPress $ gem install compass-wordpress CRANK OUT A NEW SASS-Y WORDPRESS THEME $ compass -r compass-wordpress -f wordpress  -p thematic  --sass-dir=sass --css-dir=css -s compressed my_awesome_theme AUTOCOMPILE YOUR CHANGES $ compass --watch
  • 111. Compass and Formalize INSTALL THE GEM $ gem install compass_formalize CREATE THE COMPASS PROJECT $ compass create my-great-app -r compass_formalize $ cd my-great-app APPLY THE PATTERN $ compass install formalize/jquery
  • 112. Stats
  • 113. Stats | --------------------------------- | ----- | ---------- | -------------- | ----------- | --------- | -------------- | | Filename | Rules | Properties | Mixins Defs | Mixins Used | CSS Rules | CSS Properties | | --------------------------------- | ----- | ---------- | -------------- | ----------- | --------- | -------------- | | app/stylesheets/_960.sass | 198 | 141 | 0 | 0 | -- | -- | | app/stylesheets/_animation.sass | 2 | 2 | 0 | 0 | -- | -- | | app/stylesheets/application.sass | 268 | 607 | 0 | 33 | 1131 | 3684 | | app/stylesheets/_data_table.sass | 39 | 66 | 0 | 4 | -- | -- | | app/stylesheets/_datepicker.sass | 125 | 242 | 0 | 0 | -- | -- | | app/stylesheets/_formalize.sass | 82 | 78 | 0 | 4 | -- | -- | | app/stylesheets/_forms.sass | 227 | 242 | 0 | 21 | -- | -- | | app/stylesheets/ie.sass | 0 | 0 | 0 | 0 | 0 | 0 | | app/stylesheets/_jscrollpane.sass | 20 | 43 | 0 | 0 | -- | -- | | app/stylesheets/_prettify.sass | 16 | 16 | 0 | 0 | -- | -- | | app/stylesheets/print.sass | 0 | 0 | 0 | 0 | 0 | 0 | | app/stylesheets/_reset.sass | 111 | 18 | 0 | 0 | -- | -- | | app/stylesheets/_text.sass | 27 | 18 | 0 | 0 | -- | -- | | app/stylesheets/_tiptip.sass | 19 | 40 | 0 | 0 | -- | -- | | app/stylesheets/_util.sass | 56 | 54 | 0 | 0 | -- | -- | | app/stylesheets/_vars.sass | 0 | 6 | 2 | 0 | -- | -- | | --------------------------------- | ----- | ---------- | -------------- | ----------- | --------- | -------------- | | Total (16 files): | 1190 | 1573 | 2 | 62 | 1131 | 3684 | | --------------------------------- | ----- | ---------- | -------------- | ----------- | --------- | -------------- |
  • 114. Isn’t she Sassy, folks? GET THE BOOK.
  • 115. Save 40% and get early access! sass40 Sadly, sass100 is not a valid code.
  • 116. Resources an d thanks for having me! sass-lang.com beta.compass-style.org slides! wynn.fm/okc gra b t he blog: wynnnetherland.com twitter: @pengwynn email: wynn@hp.com linkedin.com/in/netherland