sass compass
play

Sass/Compass Or how it finally clicked and I learned to love - PowerPoint PPT Presentation

Sass/Compass Or how it finally clicked and I learned to love preprocessors . . . . . . . Scott Wilkinson HaloFX Media #HaloFX @hackmonk3y halofx.com hackmonkey.com Why ? Because CSS is Hard - Chris Eppstein History In


  1. Sass/Compass Or how it finally clicked and I learned to love preprocessors . . . . . . . Scott Wilkinson HaloFX Media #HaloFX @hackmonk3y halofx.com hackmonkey.com

  2. Why ?

  3. “Because CSS is Hard” - Chris Eppstein

  4. History In the beginning... CSS has allows been a bit of trouble. 1980’s- SGML had stylesheets 1990- Stylesheets goal of HTML from beginning 1995- HTML 2.0, no stylesheets 1996- CSS1 spec – IE3 offers text support, no box support 1997- HTML 3.2 & HTML 4.0 – NN4 offers limited CSS support, only because of IE

  5. History 1998- HTML4.0 & CSS2 spec – Neither IE4 or NN4 support CCS1 well. 1999- CSS3 drafts start to show up. – CSS3 broke into modules – Browser prefix Hell – IE5, Netscape fading fast 2013- CSS3 modules still evolving! Firefox still requires -moz-box-sizing!

  6. What is a preprocessor?  Write in one syntax and output in a different syntax  Extends CSS by writing a stylesheets in an extended meta-language format and compiling out to valid CSS.  Emphasis on DRY (don't repeat yourself)  No browser dependencies

  7. What preproccesors can do  Variables  Define & reuse common rules  Automate common syntax  Make minor changes to existing rules  Better organization of rules  Perform math calculations

  8. Sass & LESS Sass - sass-lang.com – Syntactically Awesome Stylesheets – 2 syntax, (Sass, SCSS) • Identical functionality – Ruby based app – Compass support LESS - lesscss.org – Paired down version of Sass – Javascript based app – Influenced Sass v2 syntax

  9. Sass

  10. Sass Sass {style with attitude} sass-lang.com

  11. Sass Sass – Original syntax – Syntactically Awesome Stylesheets – Indented format • White space matters • No curly brackets or ; – .sass extension SCSS – Newer syntax – Sassy CSS • White space doesn’t matter • Uses curly brackets and ; – .scss extension – Any valid CSS is valid SCSS Functionally identical, SCSS most commonly used

  12. Sass Code Examples

  13. Nesting sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#nested_rules

  14. Variables sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#variables

  15. Parent References sass- lang.com/docs/yardoc/file.SASS_REFERENCE.html#referencing_parent_selectors

  16. Mixins sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixins

  17. Arguments sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixin-arguments

  18. Extends sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#extend

  19. Comments sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#comments

  20. Partials sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#partials

  21. Tools

  22. Sassmeister sassmeister.com

  23. Codepen codepen.io/pen/

  24. Scout mhs.github.io/scout-app

  25. Scout mhs.github.io/scout-app

  26. Compass.app compass.handlino.com

  27. Compass.app compass.handlino.com

  28. Compass.app compass.handlino.com

  29. Compass.app compass.handlino.com

  30. Compass compass-style.org

  31. Compass

  32. Compass compass-style.org/reference/compass

  33. Compass Mixins compass-style.org/reference/compass

  34. Mixins

  35. Horizontal List compass-style.org/reference/compass/typography/lists/horizontal_list

  36. Border Radius compass-style.org/reference/compass/css3/border_radius

  37. Font Face compass-style.org/reference/compass/css3/font_face

  38. Gradients compass-style.org/reference/compass/css3/images

  39. Gradients compass-style.org/reference/compass/css3/images

  40. Box Shadow compass-style.org/reference/compass/css3/box_shadow

  41. Box Shadow compass-style.org/reference/compass/css3/box_shadow

  42. Sprites compass-style.org/reference/compass/utilities/sprites

  43. Sprites compass-style.org/reference/compass/typography/text/replacement

  44. Sprites compass-style.org/help/tutorials/spriting/magic-selectors

  45. Errors

  46. Drupal

  47. Sass, Compass and Omega drupal.org/node/1808252

  48. Sass, Compass and Omega  compass create . --sass-dir=scss --css-dir=css --bare  Copy all files from css folder to scss folder  Rename all .css files to .scss

  49. Sass, Compass and Omega <theme>/scss <theme>/css

  50. Sass/Compass Or how it finally clicked and I learned to love preprocessors . . . . . . . Scott Wilkinson HaloFX Media #HaloFX @hackmonk3y halofx.com hackmonkey.com

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