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

#WCGR - Getting SASSy

Brad Parbs
August 24, 2013

#WCGR - Getting SASSy

Brad Parbs

August 24, 2013
Tweet

More Decks by Brad Parbs

Other Decks in Technology

Transcript

  1. #wcgr #wcpvd I’m Brad Parbs. Created Wolf, hook_s & wpWizard

    Core Contributor in 3.5 & 3.6 Run Snow Day Group, (snowday.io) ♥ WordPress, Startups, and Code Plugin and Theme author/developer @BradParbs brad.parbs.me
  2. #wcgr What is SASS? “Sass is a meta-language on top

    of CSS ... with more power than flat CSS allows. Sass both provides a simpler, more elegant syntax for CSS and implements various features that are useful for creating manageable stylesheets.” sass-lang.org
  3. #wcgr Why SASS over LESS? Compass - “drop-in” bits of

    SASS @extend() - allows for cleaner HTML Easily Embedding Media Queries #wcmke
  4. #wcgr Two Flavors .scss .sass More similar to CSS Easier

    to jump into from CSS Probably where you want to start Less keystrokes Cleaner files #wcgr
  5. #wcgr Mixins Appearance Background Clip Background Origin Background Size Border

    Radius Box Box Shadow Box Sizing CSS Regions CSS3 Pie Columns Filter Font Face
  6. #wcgr Mixins Reset Utilities Links Lists Text Vertical Rhythm Color

    General Print Sprites Tables http://compass-style.org
  7. #wcgr Color Functions examples from: http://b.parbs.me/PSRH $base-color: #AD141E; darken( $base-color,

    10% ); lighten( $base-color, 10% ); saturate( $base-color, 20% ); desaturate( $base-color, 20% );
  8. #wcgr Color Functions examples from: http://b.parbs.me/PSRH $base-color: #AD141E; darken( $base-color,

    10% ); lighten( $base-color, 10% ); saturate( $base-color, 20% ); desaturate( $base-color, 20% );
  9. #wcgr Color Functions examples from: http://b.parbs.me/PSRH $base-color: #AD141E; darken( $base-color,

    10% ); lighten( $base-color, 10% ); saturate( $base-color, 20% ); desaturate( $base-color, 20% ); adjust-hue( $base-color, 20% );
  10. #wcgr Color Functions examples from: http://b.parbs.me/PSRH $base-color: #AD141E; darken( $base-color,

    10% ); lighten( $base-color, 10% ); saturate( $base-color, 20% ); desaturate( $base-color, 20% ); adjust-hue( $base-color, 20% );
  11. #wcgr Let’s install Twitter Bootstrap Without SASS: 1.Download zip file.

    2. Copy+Paste into stylesheet or: @import another CSS file or: <link> another CSS file 3.Redo all of this when there’s an update. 4.Ugh this sucks, I’ll just use BootstrapWP. #wcgr
  12. #wcgr Let’s install Twitter Bootstrap With SASS: 1.$ gem install

    compass-bootstrap (only have to ever do this once) 2. Add require “compass- bootstrap” to config.rb. #wcgr
  13. #wcgr Building a WP Theme • We want only one

    stylesheet • Our SASS folder should live independently • config.rb in the root, so we can use Codekit to optimize images & JS https://github.com/bradp/Wolf #wcgr