Skip to content

Instantly share code, notes, and snippets.

@kpuputti
Last active December 25, 2015 21:09
Show Gist options
  • Save kpuputti/7040223 to your computer and use it in GitHub Desktop.
Save kpuputti/7040223 to your computer and use it in GitHub Desktop.

SASS 3.3

New SASS website: http://sass-lang.com/

  • SASS 3.3 alpha available, official version should be coming "soon"
  • Compass 0.13 alpha also available, but seems to use SASS 3.2.5
    • to use Compass: sass --compass --sourcemap --watch
    • dunno about using compass through Grunt
    • more info: Compass/compass#1108

Sourcemaps

  • contributed by some Google folks

& improvements

$module: "my-module";

#{$module} {

  // Some BEM stuff
  #{&}-something {}
  #{&}__child {}
  #{&}--modifier {}
}

Improved if() function

  • only evaluates what is needed

List operation improvements

    • and - implemented for lists
  • nth takes negative indexes
  • list-separator()

Map data type

$font-sizes: (
  small: 12px,
  medium: 14px,
  large: 16px
);

@for $key, $value in $font-sizes {

}

// map-get()

Improved @for loop

  • currently: @for, @while, @each
@for $i from 1 through 10 {

}
  • ability to loop from a smaller number to a larger one
  • support for steps

@at-root

  • takes a nested chunk and moves it to the root level
.module {

  @at-root .hasTouch & {
  
  }
}

New string manipulation functions

  • PL basics

@import rewrite

  • will not land in 3.3, main feature of SASS 4.0
  • import once
  • import CSS files \o/
  • namespacing (like @import "module" as "something-else";)
  • auto-lookup for index.{sass,scss} when importing a dir
  • maybe importing all files from a dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment