css is for clark kent sass is for superman about john
play

CSS is for Clark Kent. Sass is for Superman. About John Albin - PowerPoint PPT Presentation

http://bit.ly/sass-for-superman FRONTEND TRACK | JOHN ALBIN WILKINS | FEBRUARY 7 2013 CSS is for Clark Kent. Sass is for Superman. About John Albin Wilkins JohnAlbin drupal.org/user/11297 @JohnAlbin 2 OReilly book: Sass and Compass


  1. http://bit.ly/sass-for-superman FRONTEND TRACK | JOHN ALBIN WILKINS | FEBRUARY 7 2013 CSS is for Clark Kent. Sass is for Superman.

  2. About John Albin Wilkins JohnAlbin drupal.org/user/11297 @JohnAlbin 2

  3. O’Reilly book: Sass and Compass – Will be published in the spring of 2013. – Will be awesome. – May contain Lemurs. 3

  4. The CMS 1993 2013 4

  5. We had mobile devices in 1993! 5

  6. Efficiency in CSS 7

  7. Efficiency in CSS 7

  8. Obviously, we have a problem. 8

  9. We’re screwed. • Responsive • HTML5 • Lazy loading • Accessibility • Front-end Web Design • SMACSS • Aria performance • CSS3 • Microformats • Aggregation • Flexbox • Sprites strategies • Vendor Prefixes • Data URIs • Yeoman • Transitions • jQuery • Compass • OCSS • Media queries • Normalize.css • BEM • YepNope • Mobile first • Sass • Mobile • Canvas • Less • Testing • AMD • Bower • Require.js • Drupal theming 9

  10. Nicolas Gallagher “ Are you new to front-end web development? Here’s a secret: no one else really knows what they’re doing either.” — @necolas 10

  11. Clark Kent was decent at his job. 11

  12. Clark Kent was decent at his job. …but Lois Lane kicked his ass. 11

  13. 2 years ago, at…

  14. ZERO COMMITMENT!!!! Sass = CSS + extras Sass compiles to normal CSS Automatic compilation 13

  15. http://bit.ly/sass-for-superman Installing Sass & Compass • Command line — FREE (I use this.) http://thesassway.com/beginner/getting-started-with-sass-and-compass sudo gem install compass • Compass.app — $10 http://compass.handlino.com • Fire.app — $14 (I use this too.) http://fireapp.handlino.com • CodeKit — $25 http://incident57.com/codekit/ 14

  16. sass --watch $> sass --watch sass:css [sass dir]:[css dir] >>> Sass is watching for changes. Press Ctrl-C to stop. 15

  17. sass --watch $> sass --watch sass:css [sass dir]:[css dir] >>> Sass is watching for changes. Press Ctrl-C to stop. SASQUATCH! 15

  18. http://bit.ly/superman-1 Variables and color functions http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html 16

  19. http://bit.ly/superman-1 Variables and color functions http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html 16

  20. http://bit.ly/superman-1 Variables and color functions http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html 16

  21. http://bit.ly/superman-1 Variables and color functions http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html 16

  22. http://bit.ly/superman-2 Nesting (rulesets and properties) http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#nested_rules 17

  23. http://bit.ly/superman-2 Nesting (rulesets and properties) http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#nested_rules 17

  24. http://bit.ly/superman-3 Comments and output style http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#output_style 18

  25. http://bit.ly/superman-3 Comments and output style http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#output_style 18

  26. http://bit.ly/superman-3 Comments and output style http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#output_style 18

  27. http://bit.ly/superman-3 Comments and output style http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#output_style 18

  28. http://bit.ly/superman-4 Parent selectors http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#referencing_parent_selectors_ 19

  29. http://bit.ly/superman-4 Parent selectors http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#referencing_parent_selectors_ 19

  30. @import 20

  31. @import styles.scss : 20

  32. @import styles.scss : normalize.scss : print.scss : 20

  33. @import styles.scss : styles.css : 20

  34. Partials 21

  35. Partials styles.scss : 21

  36. _init.scss • Declare all your variables • Import all your modules (Compass, Zen Grids, etc.) 22

  37. _init.scss • Declare all your variables • Import all your modules (Compass, Zen Grids, etc.) File organization 22

  38. Drupal integration my-theme.info : stylesheets[all][] = css/styles.css 23

  39. There’s a module for that™ * “that” refers to $@#$ing up your CSS. PHP version of Sass = Buggy version of Sass 24

  40. Feeling the speed yet? 25

  41. http://bit.ly/superman-5 Extends & placeholder selectors http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#placeholder_selectors_ http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#extend 26

  42. http://bit.ly/superman-5 Extends & placeholder selectors http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#placeholder_selectors_ http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#extend 26

  43. http://bit.ly/superman-6 Mixins http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixins 27

  44. http://bit.ly/superman-6 Mixins http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixins 27

  45. Compass!!!!! 28

  46. Data URIs (with @import “compass”; ) 29

  47. Data URIs (with @import “compass”; ) 29

  48. Data URIs (with @import “compass”; ) 29

  49. http://bit.ly/superman-7 CSS3 & Vendor prefixes http://compass-style.org/reference/compass/css3/border_radius/ 30

  50. http://bit.ly/superman-7 CSS3 & Vendor prefixes http://compass-style.org/reference/compass/css3/border_radius/ 30

  51. http://bit.ly/superman-7 CSS3 & Vendor prefixes http://compass-style.org/reference/compass/css3/border_radius/ 30

  52. Zen Grids Homepage: http://zengrids.com Webinar: https://www.acquia.com/resources/acquia-tv/ conference/creating-responsive-drupal-sites-zen-grids-and- zen-5-theme-july-19 31

  53. 32

  54. BOF! ALL THINGS SASS & COMPASS Tomorrow morning @ 10:45am! 33

  55. What if we all shared? 34

  56. What if we all shared? 34

  57. Thank you!

  58. What did you think? Session review: http://bit.ly/i-love-superman Stalk Follow me: @JohnAlbin

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend