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

WordCamp Milwaukee 2013: Getting SASSy - Fun wi...

WordCamp Milwaukee 2013: Getting SASSy - Fun with CSS Preproccessors

Write your CSS faster and more efficiently. CSS pre-processors like SASS and LESS let you write DRY CSS that can be modularly used to create themes and sites quite a bit faster.
Starting from a beginner’s perspective, this talk will allow anyone (designers & developers) to get started with SASS or LESS for their WordPress themeing.

Avatar for Brad Parbs

Brad Parbs

June 08, 2013
Tweet

More Decks by Brad Parbs

Other Decks in Technology

Transcript

  1. #wcmke #wcmke 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. #wcmke 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. #wcmke Why SASS over LESS? Compass - “drop-in” bits of

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

    to jump into from CSS What Snow Day Group uses Less keystrokes Cleaner files #wcmke
  5. #wcmke Mixins Appearance Background Clip Background Origin Background Size Border

    Radius Box Box Shadow Box Sizing CSS Regions CSS3 Pie Columns Filter Font Face http://compass-style.org
  6. #wcmke 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% );
  7. #wcmke #wcmke 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.
  8. #wcmke #wcmke 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.
  9. #wcmke #wcmke 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