• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Wrangling the CSS Beast  with Sass
 

Wrangling the CSS Beast with Sass

on

  • 1,994 views

Sass is an extension of CSS3 that adds power and elegance to the basic language. It allows you to use variables, nested rules, mixins, inline imports, and more, all with a fully CSS-compatible syntax. ...

Sass is an extension of CSS3 that adds power and elegance to the basic language. It allows you to use variables, nested rules, mixins, inline imports, and more, all with a fully CSS-compatible syntax. (With a little help from Ruby) This talk will cover an overview of what Sass is, how to get it, run it, and use it, and show some examples of its magic.

Code examples at: https://github.com/founddrama/vt-code-camp

Statistics

Views

Total Views
1,994
Views on SlideShare
1,689
Embed Views
305

Actions

Likes
2
Downloads
34
Comments
0

11 Embeds 305

http://blog.founddrama.net 248
http://notundefined.tumblr.com 41
http://speakerrate.com 4
http://www.linkedin.com 3
http://twitter.com 2
http://feeds.feedburner.com 2
http://translate.googleusercontent.com 1
http://blog.founddrama.net. 1
https://twitter.com 1
http://safe.tumblr.com 1
https://www.linkedin.com 1
More...

Accessibility

Upload Details

Uploaded via as Apple Keynote

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • - other claim to fame: a reviewer for Fogus/Houser "Joy of Clojure"\n
  • - other claim to fame: a reviewer for Fogus/Houser "Joy of Clojure"\n
  • - ...and numerous others (including Eric Meyer)\n
  • - ...and numerous others (including Eric Meyer)\n
  • - ...and numerous others (including Eric Meyer)\n
  • SIDE NOTE - mention "throughout this talk, when I say Sass, I mean... / If I say 'Sass syntax' I'm really talking about SCSS... / never Python-inspired, whitespace-sensitive Sass syntax..."\n
  • \n
  • \n
  • - repetitive = you wind up copy/pasting a lot\n- repetitive = (not just joking) : parts of individual declarations can get repetitive (e.g., properties like `font-` and `border-` prefixed properties); then you start throwing in vendor prefixes for things like border-radius and gradients and you’ve got even MORE repetition\n- not expressive = .selector { property: value; } - meaning that you wind up doing things like setting your color values and copy/pasting them, and hand-calculating your grid units (you are using a grid system, right?) and then littering your CSS w/ magic values etc.\n- which leads us right to the other problems... -- “no variables” (well: that’s just another form of repetition) which leads to situations where you might miss things (e.g., a single color expressed multiple ways, to say nothing of any derivative colors) -- and not being able to calculate widths and heights leads to code littered with “magic values”...\n
  • - repetitive = you wind up copy/pasting a lot\n- repetitive = (not just joking) : parts of individual declarations can get repetitive (e.g., properties like `font-` and `border-` prefixed properties); then you start throwing in vendor prefixes for things like border-radius and gradients and you’ve got even MORE repetition\n- not expressive = .selector { property: value; } - meaning that you wind up doing things like setting your color values and copy/pasting them, and hand-calculating your grid units (you are using a grid system, right?) and then littering your CSS w/ magic values etc.\n- which leads us right to the other problems... -- “no variables” (well: that’s just another form of repetition) which leads to situations where you might miss things (e.g., a single color expressed multiple ways, to say nothing of any derivative colors) -- and not being able to calculate widths and heights leads to code littered with “magic values”...\n
  • - repetitive = you wind up copy/pasting a lot\n- repetitive = (not just joking) : parts of individual declarations can get repetitive (e.g., properties like `font-` and `border-` prefixed properties); then you start throwing in vendor prefixes for things like border-radius and gradients and you’ve got even MORE repetition\n- not expressive = .selector { property: value; } - meaning that you wind up doing things like setting your color values and copy/pasting them, and hand-calculating your grid units (you are using a grid system, right?) and then littering your CSS w/ magic values etc.\n- which leads us right to the other problems... -- “no variables” (well: that’s just another form of repetition) which leads to situations where you might miss things (e.g., a single color expressed multiple ways, to say nothing of any derivative colors) -- and not being able to calculate widths and heights leads to code littered with “magic values”...\n
  • - repetitive = you wind up copy/pasting a lot\n- repetitive = (not just joking) : parts of individual declarations can get repetitive (e.g., properties like `font-` and `border-` prefixed properties); then you start throwing in vendor prefixes for things like border-radius and gradients and you’ve got even MORE repetition\n- not expressive = .selector { property: value; } - meaning that you wind up doing things like setting your color values and copy/pasting them, and hand-calculating your grid units (you are using a grid system, right?) and then littering your CSS w/ magic values etc.\n- which leads us right to the other problems... -- “no variables” (well: that’s just another form of repetition) which leads to situations where you might miss things (e.g., a single color expressed multiple ways, to say nothing of any derivative colors) -- and not being able to calculate widths and heights leads to code littered with “magic values”...\n
  • - repetitive = you wind up copy/pasting a lot\n- repetitive = (not just joking) : parts of individual declarations can get repetitive (e.g., properties like `font-` and `border-` prefixed properties); then you start throwing in vendor prefixes for things like border-radius and gradients and you’ve got even MORE repetition\n- not expressive = .selector { property: value; } - meaning that you wind up doing things like setting your color values and copy/pasting them, and hand-calculating your grid units (you are using a grid system, right?) and then littering your CSS w/ magic values etc.\n- which leads us right to the other problems... -- “no variables” (well: that’s just another form of repetition) which leads to situations where you might miss things (e.g., a single color expressed multiple ways, to say nothing of any derivative colors) -- and not being able to calculate widths and heights leads to code littered with “magic values”...\n
  • - NOTED : pedants will argue that CSS3 adds some new selectors and pseudos and media queries -- but that doesn't really solve the problems that we're talking about here\n\n
  • - NOTED : pedants will argue that CSS3 adds some new selectors and pseudos and media queries -- but that doesn't really solve the problems that we're talking about here\n\n
  • - NOTED : pedants will argue that CSS3 adds some new selectors and pseudos and media queries -- but that doesn't really solve the problems that we're talking about here\n\n
  • - NOTED : pedants will argue that CSS3 adds some new selectors and pseudos and media queries -- but that doesn't really solve the problems that we're talking about here\n\n
  • - NOTED : pedants will argue that CSS3 adds some new selectors and pseudos and media queries -- but that doesn't really solve the problems that we're talking about here\n\n
  • \n
  • \n
  • NOTED : You may want to add `sudo` in there lest you get something like\n > ERROR: While executing gem ... (Gem::FilePermissionError)\n > You don't have write permissions into the /usr/bin directory.\n\n
  • NOTED : You may want to add `sudo` in there lest you get something like\n > ERROR: While executing gem ... (Gem::FilePermissionError)\n > You don't have write permissions into the /usr/bin directory.\n\n
  • NOTED : You may want to add `sudo` in there lest you get something like\n > ERROR: While executing gem ... (Gem::FilePermissionError)\n > You don't have write permissions into the /usr/bin directory.\n\n
  • NOTED : You may want to add `sudo` in there lest you get something like\n > ERROR: While executing gem ... (Gem::FilePermissionError)\n > You don't have write permissions into the /usr/bin directory.\n\n
  • NOTED : You may want to add `sudo` in there lest you get something like\n > ERROR: While executing gem ... (Gem::FilePermissionError)\n > You don't have write permissions into the /usr/bin directory.\n\n
  • NOTE : anyone that downloaded it can fire up the interactive mode with `sass -i`\n
  • - so... `mv` your existing css to scss\n- and then compile it from scss to css\n- but that didn’t buy you anything\n- except that it’s drop-dead simple to migrate\n- and drop-dead simple to “just start” using it\n\nNOTE:\n- sass file.scss goes to stdout\n- sass file.scss:file.css gives it a destination file\n
  • - so... `mv` your existing css to scss\n- and then compile it from scss to css\n- but that didn’t buy you anything\n- except that it’s drop-dead simple to migrate\n- and drop-dead simple to “just start” using it\n\nNOTE:\n- sass file.scss goes to stdout\n- sass file.scss:file.css gives it a destination file\n
  • \n
  • "Why save the best for last? Let's introduce everyone's favoritest Sass feature right off the bat... the one that is often called 'the single most-requested feature for CSS' -- the ability to set variables."\n\n* first: a totally contrived example that you would hopefully never see anywhere ever\n-- but it presents a thought question esp. w/r/t/ efficacy of Find/Replace (esp. if you have any derivative colors)\n\n* and right there you have a pretty compelling reason to at least look into Sass:\n-- think "themes" and "theme kits"\n-- think WordPress themes, think white labeling your enterprise apps\n\n"...now how about something a little more usefully illustrative?"\n
  • "Why save the best for last? Let's introduce everyone's favoritest Sass feature right off the bat... the one that is often called 'the single most-requested feature for CSS' -- the ability to set variables."\n\n* first: a totally contrived example that you would hopefully never see anywhere ever\n-- but it presents a thought question esp. w/r/t/ efficacy of Find/Replace (esp. if you have any derivative colors)\n\n* and right there you have a pretty compelling reason to at least look into Sass:\n-- think "themes" and "theme kits"\n-- think WordPress themes, think white labeling your enterprise apps\n\n"...now how about something a little more usefully illustrative?"\n
  • "Why save the best for last? Let's introduce everyone's favoritest Sass feature right off the bat... the one that is often called 'the single most-requested feature for CSS' -- the ability to set variables."\n\n* first: a totally contrived example that you would hopefully never see anywhere ever\n-- but it presents a thought question esp. w/r/t/ efficacy of Find/Replace (esp. if you have any derivative colors)\n\n* and right there you have a pretty compelling reason to at least look into Sass:\n-- think "themes" and "theme kits"\n-- think WordPress themes, think white labeling your enterprise apps\n\n"...now how about something a little more usefully illustrative?"\n
  • "Why save the best for last? Let's introduce everyone's favoritest Sass feature right off the bat... the one that is often called 'the single most-requested feature for CSS' -- the ability to set variables."\n\n* first: a totally contrived example that you would hopefully never see anywhere ever\n-- but it presents a thought question esp. w/r/t/ efficacy of Find/Replace (esp. if you have any derivative colors)\n\n* and right there you have a pretty compelling reason to at least look into Sass:\n-- think "themes" and "theme kits"\n-- think WordPress themes, think white labeling your enterprise apps\n\n"...now how about something a little more usefully illustrative?"\n
  • / "...now how about something a little more usefully illustrative?" /\n\n--> we dove right into "the good stuff" with variables there, but let's take a step back for a moment and explain some of the nesting that was going on in that example\n
  • re: #1 - you've probably seen code like this? maybe even written it yourself?\n\nre: #2 - a little easier to cope w/ -- esp. if `.post` is getting used as part of the selector for a lot of the CSS\n-- (I'm looking at you, WordPress devs!?)\n\nALSO : #2 compiles to #1\n
  • re: #1 - you've probably seen code like this? maybe even written it yourself?\n\nre: #2 - a little easier to cope w/ -- esp. if `.post` is getting used as part of the selector for a lot of the CSS\n-- (I'm looking at you, WordPress devs!?)\n\nALSO : #2 compiles to #1\n
  • "a bit more of the same - but this time w/ properties instead of selectors"\n\n- again: #2 compiles to #1\n
  • "a bit more of the same - but this time w/ properties instead of selectors"\n\n- again: #2 compiles to #1\n
  • Imagine building your own little re-usable CSS function library? \n- "now you can"\n\n- we'll do this example in reverse - the Sass first, then we'll see how it compiles\n
  • \n
  • COMPILES TO...\n- and takes some of the pain out of your CSS3\n\n
  • sass-lang.com says: "Sass can tell one selector to inherit all the styles of another without duplicating the CSS properties."\n\n- again: we'll do this in reverse (Sass 1st)\n
  • \n
  • - for a small CSS code base, & w/ a disciplined CSS dev\n-- you would probably get that result anyway\n-- but this helps to enforce it, and makes it easier to solve that problem\n\n- SIDE NOTE : note the `&` operator? - that gets the parent selector reference\n
  • [PAUSE] "Maybe I should have started with this?"\n-- SassScript provides the foundations for a lot of what we've already seen\n\nALSO : sass-lang.com includes variables here\n-- but they got their own slide series already...)\n\nSOME EXAMPLES ... ready?\n
  • [PAUSE] "Maybe I should have started with this?"\n-- SassScript provides the foundations for a lot of what we've already seen\n\nALSO : sass-lang.com includes variables here\n-- but they got their own slide series already...)\n\nSOME EXAMPLES ... ready?\n
  • [PAUSE] "Maybe I should have started with this?"\n-- SassScript provides the foundations for a lot of what we've already seen\n\nALSO : sass-lang.com includes variables here\n-- but they got their own slide series already...)\n\nSOME EXAMPLES ... ready?\n
  • [PAUSE] "Maybe I should have started with this?"\n-- SassScript provides the foundations for a lot of what we've already seen\n\nALSO : sass-lang.com includes variables here\n-- but they got their own slide series already...)\n\nSOME EXAMPLES ... ready?\n
  • [PAUSE] "Maybe I should have started with this?"\n-- SassScript provides the foundations for a lot of what we've already seen\n\nALSO : sass-lang.com includes variables here\n-- but they got their own slide series already...)\n\nSOME EXAMPLES ... ready?\n
  • [PAUSE] "Maybe I should have started with this?"\n-- SassScript provides the foundations for a lot of what we've already seen\n\nALSO : sass-lang.com includes variables here\n-- but they got their own slide series already...)\n\nSOME EXAMPLES ... ready?\n
  • - checked: arithmetic\n- some simple math... that gracefully handles the units -- it even WANTS the units\n
  • - checked: arithmetic\n- some simple math... that gracefully handles the units -- it even WANTS the units\n
  • - checked: string interpolation, arithmetic, simple logic, control directives (looping and logical), color functions\n\nOF PARTICULAR INTEREST\n- sass-lang.com has 27 documented color functions -- including:\n-- hsl($h, $s, $l) & hsla(), $rgb() & $rgba()\n-- saturate($color, $amount)\n-- transparentize($color, #amount)\n-- mix($color_1, $color_2, [$weight])\n
  • - `@import` is good in theory... but:\n-- generates an extra `http` request\n-- and the browser can't even execute the downloads in parallel\n-- which is why: [Google says "don't use it"](http://code.google.com/speed/page-speed/docs/rtt.html#AvoidCssImport)\n\n- Sass `@import` fixes that by compiling properly\n-- [example](https://gist.github.com/709180#file_3.sass)\n-- AND/BUT if you insist on doing your @import the old-fashioned way, you can\n\n
  • - `@import` is good in theory... but:\n-- generates an extra `http` request\n-- and the browser can't even execute the downloads in parallel\n-- which is why: [Google says "don't use it"](http://code.google.com/speed/page-speed/docs/rtt.html#AvoidCssImport)\n\n- Sass `@import` fixes that by compiling properly\n-- [example](https://gist.github.com/709180#file_3.sass)\n-- AND/BUT if you insist on doing your @import the old-fashioned way, you can\n\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `expanded` - this being the style I would describe as "the most common for CSS source files" - with the closing curly brackets on the next line etc. - good for SCSS that is being watched in development\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `expanded` - this being the style I would describe as "the most common for CSS source files" - with the closing curly brackets on the next line etc. - good for SCSS that is being watched in development\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `expanded` - this being the style I would describe as "the most common for CSS source files" - with the closing curly brackets on the next line etc. - good for SCSS that is being watched in development\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `expanded` - this being the style I would describe as "the most common for CSS source files" - with the closing curly brackets on the next line etc. - good for SCSS that is being watched in development\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `nested` - the default - almost exactly like `expanded` but with the closing curly on the same line as the last declaration in a selector's block (to each his own...) -- ALSO: "nests" presumably derivative selector blocks - - SIDE NOTE : both `expanded` and `nested` honor line-breaks b/w selector blocks AND preserve all comments except single-line comments\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `nested` - the default - almost exactly like `expanded` but with the closing curly on the same line as the last declaration in a selector's block (to each his own...) -- ALSO: "nests" presumably derivative selector blocks - - SIDE NOTE : both `expanded` and `nested` honor line-breaks b/w selector blocks AND preserve all comments except single-line comments\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `nested` - the default - almost exactly like `expanded` but with the closing curly on the same line as the last declaration in a selector's block (to each his own...) -- ALSO: "nests" presumably derivative selector blocks - - SIDE NOTE : both `expanded` and `nested` honor line-breaks b/w selector blocks AND preserve all comments except single-line comments\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `nested` - the default - almost exactly like `expanded` but with the closing curly on the same line as the last declaration in a selector's block (to each his own...) -- ALSO: "nests" presumably derivative selector blocks - - SIDE NOTE : both `expanded` and `nested` honor line-breaks b/w selector blocks AND preserve all comments except single-line comments\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `compact` - minifies each selector block to be one line; minifies multi-line comments to be one-line (unless they are /*! loud comments */); otherwise honors line-breaks b/w selector blocks\n\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `compact` - minifies each selector block to be one line; minifies multi-line comments to be one-line (unless they are /*! loud comments */); otherwise honors line-breaks b/w selector blocks\n\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `compact` - minifies each selector block to be one line; minifies multi-line comments to be one-line (unless they are /*! loud comments */); otherwise honors line-breaks b/w selector blocks\n\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `compact` - minifies each selector block to be one line; minifies multi-line comments to be one-line (unless they are /*! loud comments */); otherwise honors line-breaks b/w selector blocks\n\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `compressed` - minifies everything to a single line (unless it absolutely cannot); ONLY honors /*! loud comments */ - basically scrubs out EVERYTHING that is not ABSOLUTELY required for that CSS to work as written\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `compressed` - minifies everything to a single line (unless it absolutely cannot); ONLY honors /*! loud comments */ - basically scrubs out EVERYTHING that is not ABSOLUTELY required for that CSS to work as written\n
  • "Considering that Sass 'fixes' the @include directive... this becomes that much more important, and its value that much more obvious."\n\n* `compressed` - minifies everything to a single line (unless it absolutely cannot); ONLY honors /*! loud comments */ - basically scrubs out EVERYTHING that is not ABSOLUTELY required for that CSS to work as written\n
  • “I know what you’re thinking... LAME and/or SO WHAT”\n- but let’s face it -- there is NO REASON for single line comments to be missing\n...and naturally: this does not interfere with your /* multi-line comments */\n
  • “I know what you’re thinking... LAME and/or SO WHAT”\n- but let’s face it -- there is NO REASON for single line comments to be missing\n...and naturally: this does not interfere with your /* multi-line comments */\n
  • \n
  • \n
  • \n
  • \n
  • - ADMIT IT : we don't use Compass at DDC - and so my experience with it is ... "this much"\n- BUT it's worth mentioning b/c...\n-- it's gaining traction among Sass users\n-- -- e.g., Sencha uses it for their theming kit (nod to the previous presenter)\n-- Chris Eppstein is a Sass core contributor and the creator of Compass\n-- -- and he is also co-author of "Sass and Compass in Action" (Manning Press)\n\n"...in other words: I'm not expert, but I'd be negligent not to mention it. Hence: BONUS ROUND."\n
  • - ADMIT IT : we don't use Compass at DDC - and so my experience with it is ... "this much"\n- BUT it's worth mentioning b/c...\n-- it's gaining traction among Sass users\n-- -- e.g., Sencha uses it for their theming kit (nod to the previous presenter)\n-- Chris Eppstein is a Sass core contributor and the creator of Compass\n-- -- and he is also co-author of "Sass and Compass in Action" (Manning Press)\n\n"...in other words: I'm not expert, but I'd be negligent not to mention it. Hence: BONUS ROUND."\n
  • - ADMIT IT : we don't use Compass at DDC - and so my experience with it is ... "this much"\n- BUT it's worth mentioning b/c...\n-- it's gaining traction among Sass users\n-- -- e.g., Sencha uses it for their theming kit (nod to the previous presenter)\n-- Chris Eppstein is a Sass core contributor and the creator of Compass\n-- -- and he is also co-author of "Sass and Compass in Action" (Manning Press)\n\n"...in other words: I'm not expert, but I'd be negligent not to mention it. Hence: BONUS ROUND."\n
  • - ADMIT IT : we don't use Compass at DDC - and so my experience with it is ... "this much"\n- BUT it's worth mentioning b/c...\n-- it's gaining traction among Sass users\n-- -- e.g., Sencha uses it for their theming kit (nod to the previous presenter)\n-- Chris Eppstein is a Sass core contributor and the creator of Compass\n-- -- and he is also co-author of "Sass and Compass in Action" (Manning Press)\n\n"...in other words: I'm not expert, but I'd be negligent not to mention it. Hence: BONUS ROUND."\n
  • - ADMIT IT : we don't use Compass at DDC - and so my experience with it is ... "this much"\n- BUT it's worth mentioning b/c...\n-- it's gaining traction among Sass users\n-- -- e.g., Sencha uses it for their theming kit (nod to the previous presenter)\n-- Chris Eppstein is a Sass core contributor and the creator of Compass\n-- -- and he is also co-author of "Sass and Compass in Action" (Manning Press)\n\n"...in other words: I'm not expert, but I'd be negligent not to mention it. Hence: BONUS ROUND."\n
  • - ADMIT IT : we don't use Compass at DDC - and so my experience with it is ... "this much"\n- BUT it's worth mentioning b/c...\n-- it's gaining traction among Sass users\n-- -- e.g., Sencha uses it for their theming kit (nod to the previous presenter)\n-- Chris Eppstein is a Sass core contributor and the creator of Compass\n-- -- and he is also co-author of "Sass and Compass in Action" (Manning Press)\n\n"...in other words: I'm not expert, but I'd be negligent not to mention it. Hence: BONUS ROUND."\n
  • - ADMIT IT : we don't use Compass at DDC - and so my experience with it is ... "this much"\n- BUT it's worth mentioning b/c...\n-- it's gaining traction among Sass users\n-- -- e.g., Sencha uses it for their theming kit (nod to the previous presenter)\n-- Chris Eppstein is a Sass core contributor and the creator of Compass\n-- -- and he is also co-author of "Sass and Compass in Action" (Manning Press)\n\n"...in other words: I'm not expert, but I'd be negligent not to mention it. Hence: BONUS ROUND."\n
  • - ADMIT IT : we don't use Compass at DDC - and so my experience with it is ... "this much"\n- BUT it's worth mentioning b/c...\n-- it's gaining traction among Sass users\n-- -- e.g., Sencha uses it for their theming kit (nod to the previous presenter)\n-- Chris Eppstein is a Sass core contributor and the creator of Compass\n-- -- and he is also co-author of "Sass and Compass in Action" (Manning Press)\n\n"...in other words: I'm not expert, but I'd be negligent not to mention it. Hence: BONUS ROUND."\n
  • \n
  • LONG ANSWER involves talking about the (original? Python-inspired? deprecated?) `.sass` syntax with all of its significant whitespace etc.\n\nbut as mentioned earlier - the `.scss` syntax is a super-set of CSS -- so valid CSS is valid SCSS, and the syntax that SCSS adds is (or ought to be) exactly what you'd expect "just by adding" the nesting and the directives etc.\n
  • LONG ANSWER involves talking about the (original? Python-inspired? deprecated?) `.sass` syntax with all of its significant whitespace etc.\n\nbut as mentioned earlier - the `.scss` syntax is a super-set of CSS -- so valid CSS is valid SCSS, and the syntax that SCSS adds is (or ought to be) exactly what you'd expect "just by adding" the nesting and the directives etc.\n
  • LONG ANSWER involves talking about the (original? Python-inspired? deprecated?) `.sass` syntax with all of its significant whitespace etc.\n\nbut as mentioned earlier - the `.scss` syntax is a super-set of CSS -- so valid CSS is valid SCSS, and the syntax that SCSS adds is (or ought to be) exactly what you'd expect "just by adding" the nesting and the directives etc.\n
  • - we've been talking about this for years now - about all that min'ing and concat'ing\n- and without a tool like Sass you're probably rolling your own (YUI compressor and the like for min'ing... and then what? cat each min'ed file to something else?)\n
  • - we've been talking about this for years now - about all that min'ing and concat'ing\n- and without a tool like Sass you're probably rolling your own (YUI compressor and the like for min'ing... and then what? cat each min'ed file to something else?)\n
  • - we've been talking about this for years now - about all that min'ing and concat'ing\n- and without a tool like Sass you're probably rolling your own (YUI compressor and the like for min'ing... and then what? cat each min'ed file to something else?)\n
  • - we've been talking about this for years now - about all that min'ing and concat'ing\n- and without a tool like Sass you're probably rolling your own (YUI compressor and the like for min'ing... and then what? cat each min'ed file to something else?)\n
  • - we've been talking about this for years now - about all that min'ing and concat'ing\n- and without a tool like Sass you're probably rolling your own (YUI compressor and the like for min'ing... and then what? cat each min'ed file to something else?)\n
  • - we've been talking about this for years now - about all that min'ing and concat'ing\n- and without a tool like Sass you're probably rolling your own (YUI compressor and the like for min'ing... and then what? cat each min'ed file to something else?)\n
  • - we've been talking about this for years now - about all that min'ing and concat'ing\n- and without a tool like Sass you're probably rolling your own (YUI compressor and the like for min'ing... and then what? cat each min'ed file to something else?)\n
  • - we've been talking about this for years now - about all that min'ing and concat'ing\n- and without a tool like Sass you're probably rolling your own (YUI compressor and the like for min'ing... and then what? cat each min'ed file to something else?)\n
  • ADMIT IT : "I'm just as guilty of this as anyone else..."\n-- bad habits? deep nesting?\n-- -- but Sass has helped me change my thinking about CSS...\n
  • ADMIT IT : "I'm just as guilty of this as anyone else..."\n-- bad habits? deep nesting?\n-- -- but Sass has helped me change my thinking about CSS...\n
  • ADMIT IT : "I'm just as guilty of this as anyone else..."\n-- bad habits? deep nesting?\n-- -- but Sass has helped me change my thinking about CSS...\n
  • ADMIT IT : "I'm just as guilty of this as anyone else..."\n-- bad habits? deep nesting?\n-- -- but Sass has helped me change my thinking about CSS...\n
  • ADMIT IT : "I'm just as guilty of this as anyone else..."\n-- bad habits? deep nesting?\n-- -- but Sass has helped me change my thinking about CSS...\n
  • ADMIT IT : "I'm just as guilty of this as anyone else..."\n-- bad habits? deep nesting?\n-- -- but Sass has helped me change my thinking about CSS...\n
  • ADMIT IT : "I'm just as guilty of this as anyone else..."\n-- bad habits? deep nesting?\n-- -- but Sass has helped me change my thinking about CSS...\n
  • ADMIT IT : "I'm just as guilty of this as anyone else..."\n-- bad habits? deep nesting?\n-- -- but Sass has helped me change my thinking about CSS...\n
  • ADMIT IT : "I'm just as guilty of this as anyone else..."\n-- bad habits? deep nesting?\n-- -- but Sass has helped me change my thinking about CSS...\n
  • "By all means: use Sass along with your CSS framework of choice."\n\n"At the end of the day -- even if you are using a grid system or some other framework -- you are still writing your own CSS within that framework. You should be using Sass to manage THAT."\n\nGOAL (of both) = make your life easier\n-- so... "What is going to make your life easier?"\n\n- http://www.blueprintcss.org/ \n
  • "By all means: use Sass along with your CSS framework of choice."\n\n"At the end of the day -- even if you are using a grid system or some other framework -- you are still writing your own CSS within that framework. You should be using Sass to manage THAT."\n\nGOAL (of both) = make your life easier\n-- so... "What is going to make your life easier?"\n\n- http://www.blueprintcss.org/ \n
  • "By all means: use Sass along with your CSS framework of choice."\n\n"At the end of the day -- even if you are using a grid system or some other framework -- you are still writing your own CSS within that framework. You should be using Sass to manage THAT."\n\nGOAL (of both) = make your life easier\n-- so... "What is going to make your life easier?"\n\n- http://www.blueprintcss.org/ \n
  • - deeply nested selectors in Sass still get compiled to really long selectors (try to limit yourself there)\n\n- sometimes there is nothing you can do about the verbosity of the compiled CSS\n-- but if you're using Sass effectively (w/ @extend + @mixin etc.) then it should take care of most of the optimizations for you\n-- "If the Sass is compiling to ugly CSS, just think of how ugly it might have been if you had written it yourself?"\n\n- "the important thing is..." - that your Sass source is clean and easy to follow, which should make development time (and maintenance!) a breeze compared to "the old fashioned way"\n
  • - deeply nested selectors in Sass still get compiled to really long selectors (try to limit yourself there)\n\n- sometimes there is nothing you can do about the verbosity of the compiled CSS\n-- but if you're using Sass effectively (w/ @extend + @mixin etc.) then it should take care of most of the optimizations for you\n-- "If the Sass is compiling to ugly CSS, just think of how ugly it might have been if you had written it yourself?"\n\n- "the important thing is..." - that your Sass source is clean and easy to follow, which should make development time (and maintenance!) a breeze compared to "the old fashioned way"\n
  • - deeply nested selectors in Sass still get compiled to really long selectors (try to limit yourself there)\n\n- sometimes there is nothing you can do about the verbosity of the compiled CSS\n-- but if you're using Sass effectively (w/ @extend + @mixin etc.) then it should take care of most of the optimizations for you\n-- "If the Sass is compiling to ugly CSS, just think of how ugly it might have been if you had written it yourself?"\n\n- "the important thing is..." - that your Sass source is clean and easy to follow, which should make development time (and maintenance!) a breeze compared to "the old fashioned way"\n
  • - deeply nested selectors in Sass still get compiled to really long selectors (try to limit yourself there)\n\n- sometimes there is nothing you can do about the verbosity of the compiled CSS\n-- but if you're using Sass effectively (w/ @extend + @mixin etc.) then it should take care of most of the optimizations for you\n-- "If the Sass is compiling to ugly CSS, just think of how ugly it might have been if you had written it yourself?"\n\n- "the important thing is..." - that your Sass source is clean and easy to follow, which should make development time (and maintenance!) a breeze compared to "the old fashioned way"\n
  • - deeply nested selectors in Sass still get compiled to really long selectors (try to limit yourself there)\n\n- sometimes there is nothing you can do about the verbosity of the compiled CSS\n-- but if you're using Sass effectively (w/ @extend + @mixin etc.) then it should take care of most of the optimizations for you\n-- "If the Sass is compiling to ugly CSS, just think of how ugly it might have been if you had written it yourself?"\n\n- "the important thing is..." - that your Sass source is clean and easy to follow, which should make development time (and maintenance!) a breeze compared to "the old fashioned way"\n
  • \n
  • \n

Wrangling the CSS Beast  with Sass Wrangling the CSS Beast with Sass Presentation Transcript