SlideShare a Scribd company logo
1 of 16
Prototyping with

Haml & Sass
Prototyping
Prototyping

 • Photoshop mock-ups are an approximation
  of a web page.
Prototyping

 • Photoshop mock-ups are an approximation
  of a web page.
 • Wireframes are boring.
Prototyping

 • Photoshop mock-ups are an approximation
  of a web page.
 • Wireframes are boring.
 • Designers who develop have all the power.
Prototyping

 • Photoshop mock-ups are an approximation
  of a web page.
 • Wireframes are boring.
 • Designers who develop have all the power.
 • Mock-ups are just guesses.
Haml
Haml

Haml takes your gross, ugly templates and
replaces them with veritable Haiku.
Haml

Haml takes your gross, ugly templates and
replaces them with veritable Haiku.

<div id="content">                                   #content
  <h1 class="big_header">My Cat's Web Page</h1>        %h1.big_header My Cat's Web Page
  <p>                                                  %p
    <img src="/images/mittens.jpg" align="right"/>        %img(src="/images/mittens.jpg" align="right")
    Say hello to Mittens!                                 Say hello to Mittens!
  </p>                                               #sidebar
</div>                                                 %h2 Mittens' Favourite Food
<div id="sidebar">                                     %ul
  <h2>Mittens' Favourite Food</h2>                        %li Meow Mix
  <ul>                                                    %li Rodents
    <li>Meow Mix</li>                                     %li Grass
    <li>Rodents</li>
    <li>Grass</li>
  </ul>
</div>
Haml

                                           #content
• Elements always start with %               %h1.big_header My Cat's Web Page
                                             %p

• Classes and IDs use CSS syntax                %img(src="/images/mittens.jpg" align="right")
                                                Say hello to Mittens!
                                           #sidebar
• Classes and IDs not used on elements       %h2 Mittens' Favourite Food
                                             %ul
 are assumed to be DIVs                         %li Meow Mix
                                                %li Rodents
                                                %li Grass
• Elements are nested with indentation -
 no closing tags!

• You can use HTML tags
• Any line not started with something is
 just plain text.
Sass
Sass

Sass is like CSS without the urge to kill.
Sass

Sass is like CSS without the urge to kill.

#content h1.big_header   {           !bright_blue = #00aeff
  font-size: 1.6em;
  color: #00aeff;                    =list_defaults
}                                      margin: 0
#content ul.navigation   {             padding: 0
  margin: 0;                           list-style: none
  padding: 0;
  list-style: none;                  #content
}                                      h1.big_header
#content ul.navigation   li {            font-size: 1.6em
  display: inline;                       color: = !bright_blue
  margin-right: 0;                     ul.navigation
}                                        +list_defaults
#content ul.navigation   li.last {       li
  margin: 0;                                display: inline
}                                           margin-right: 0
                                            &.last
                                              margin: 0
Sass

                                         !bright_blue = #00aeff
• No semicolons or brackets
                                         =list_defaults
• All properties on one line               margin: 0
                                           padding: 0
                                           list-style: none
• Nests selectors for scoping
                                         #content
                                           h1.big_header
• Allows use of variables, mixins, and       font-size: 1.6em
                                             color: = !bright_blue
 other advanced features for DRY code
                                           ul.navigation
                                             +list_defaults
• Easy syntax for referencing parent         li
                                                display: inline
 selectors                                      margin-right: 0
                                                &.last
                                                  margin: 0
• Support for Sass partials
Haml & Sass: Best Practices

• Organize your Sass.
• Use classes on <body> to identify pages.
• Use descriptive Class and ID names.
• Use semantic Classes and HTML.
• Donʼt over identify - scope instead.
• Hacks are OK.
• Start with barebones HTML.
Haml & Sass: Resources

• Haml: haml-lang.com
• Sass: sass-lang.com
• Staticmatic: staticmatic.rubyforge.org
• TextMate: macromates.com

More Related Content

Similar to Prototyping With Haml & Sass

Similar to Prototyping With Haml & Sass (20)

Artdm171 Week5 Css
Artdm171 Week5 CssArtdm171 Week5 Css
Artdm171 Week5 Css
 
Css basics
Css basicsCss basics
Css basics
 
ARTDM 171, Week 5: CSS
ARTDM 171, Week 5: CSSARTDM 171, Week 5: CSS
ARTDM 171, Week 5: CSS
 
Cascading style sheets - CSS
Cascading style sheets - CSSCascading style sheets - CSS
Cascading style sheets - CSS
 
css v1 guru
css v1 gurucss v1 guru
css v1 guru
 
CSS Layout Tutorial
CSS Layout TutorialCSS Layout Tutorial
CSS Layout Tutorial
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
CSS
CSSCSS
CSS
 
Introdução a CSS
Introdução a CSS Introdução a CSS
Introdução a CSS
 
Pemrograman Web 2 - CSS
Pemrograman Web 2 - CSSPemrograman Web 2 - CSS
Pemrograman Web 2 - CSS
 
Basic css
Basic cssBasic css
Basic css
 
Html standards presentation
Html standards presentationHtml standards presentation
Html standards presentation
 
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
 
Slice and Dice
Slice and DiceSlice and Dice
Slice and Dice
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS Troubleshooting
 
CSS3 notes
CSS3 notesCSS3 notes
CSS3 notes
 
HTML News Packages Lesson
HTML News Packages LessonHTML News Packages Lesson
HTML News Packages Lesson
 
HTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - IHTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - I
 
Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common MistakesBasics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 

Recently uploaded

ARt app | UX Case Study
ARt app | UX Case StudyARt app | UX Case Study
ARt app | UX Case StudySophia Viganò
 
shot list for my tv series two steps back
shot list for my tv series two steps backshot list for my tv series two steps back
shot list for my tv series two steps back17lcow074
 
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证nhjeo1gg
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一F La
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Rndexperts
 
Architecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfArchitecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfSumit Lathwal
 
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
group_15_empirya_p1projectIndustrial.pdf
group_15_empirya_p1projectIndustrial.pdfgroup_15_empirya_p1projectIndustrial.pdf
group_15_empirya_p1projectIndustrial.pdfneelspinoy
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social MediaD SSS
 
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一Fi L
 
Untitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxUntitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxmapanig881
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...Rishabh Aryan
 
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一z xss
 
2024新版美国旧金山州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
2024新版美国旧金山州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree2024新版美国旧金山州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
2024新版美国旧金山州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
西北大学毕业证学位证成绩单-怎么样办伪造
西北大学毕业证学位证成绩单-怎么样办伪造西北大学毕业证学位证成绩单-怎么样办伪造
西北大学毕业证学位证成绩单-怎么样办伪造kbdhl05e
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfAayushChavan5
 
How to Be Famous in your Field just visit our Site
How to Be Famous in your Field just visit our SiteHow to Be Famous in your Field just visit our Site
How to Be Famous in your Field just visit our Sitegalleryaagency
 
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...katerynaivanenko1
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIyuj
 

Recently uploaded (20)

ARt app | UX Case Study
ARt app | UX Case StudyARt app | UX Case Study
ARt app | UX Case Study
 
shot list for my tv series two steps back
shot list for my tv series two steps backshot list for my tv series two steps back
shot list for my tv series two steps back
 
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025
 
Architecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfArchitecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdf
 
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制堪培拉大学毕业证(UC毕业证)#文凭成绩单#真实留信学历认证永久存档
 
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
原版美国亚利桑那州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
group_15_empirya_p1projectIndustrial.pdf
group_15_empirya_p1projectIndustrial.pdfgroup_15_empirya_p1projectIndustrial.pdf
group_15_empirya_p1projectIndustrial.pdf
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media
 
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
办理学位证(TheAuckland证书)新西兰奥克兰大学毕业证成绩单原版一比一
 
Untitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxUntitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptx
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
 
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
 
2024新版美国旧金山州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
2024新版美国旧金山州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree2024新版美国旧金山州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
2024新版美国旧金山州立大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
西北大学毕业证学位证成绩单-怎么样办伪造
西北大学毕业证学位证成绩单-怎么样办伪造西北大学毕业证学位证成绩单-怎么样办伪造
西北大学毕业证学位证成绩单-怎么样办伪造
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdf
 
How to Be Famous in your Field just visit our Site
How to Be Famous in your Field just visit our SiteHow to Be Famous in your Field just visit our Site
How to Be Famous in your Field just visit our Site
 
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
MT. Marseille an Archipelago. Strategies for Integrating Residential Communit...
 
How to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AIHow to Empower the future of UX Design with Gen AI
How to Empower the future of UX Design with Gen AI
 

Prototyping With Haml & Sass

  • 3. Prototyping • Photoshop mock-ups are an approximation of a web page.
  • 4. Prototyping • Photoshop mock-ups are an approximation of a web page. • Wireframes are boring.
  • 5. Prototyping • Photoshop mock-ups are an approximation of a web page. • Wireframes are boring. • Designers who develop have all the power.
  • 6. Prototyping • Photoshop mock-ups are an approximation of a web page. • Wireframes are boring. • Designers who develop have all the power. • Mock-ups are just guesses.
  • 8. Haml Haml takes your gross, ugly templates and replaces them with veritable Haiku.
  • 9. Haml Haml takes your gross, ugly templates and replaces them with veritable Haiku. <div id="content"> #content <h1 class="big_header">My Cat's Web Page</h1> %h1.big_header My Cat's Web Page <p> %p <img src="/images/mittens.jpg" align="right"/> %img(src="/images/mittens.jpg" align="right") Say hello to Mittens! Say hello to Mittens! </p> #sidebar </div> %h2 Mittens' Favourite Food <div id="sidebar"> %ul <h2>Mittens' Favourite Food</h2> %li Meow Mix <ul> %li Rodents <li>Meow Mix</li> %li Grass <li>Rodents</li> <li>Grass</li> </ul> </div>
  • 10. Haml #content • Elements always start with % %h1.big_header My Cat's Web Page %p • Classes and IDs use CSS syntax %img(src="/images/mittens.jpg" align="right") Say hello to Mittens! #sidebar • Classes and IDs not used on elements %h2 Mittens' Favourite Food %ul are assumed to be DIVs %li Meow Mix %li Rodents %li Grass • Elements are nested with indentation - no closing tags! • You can use HTML tags • Any line not started with something is just plain text.
  • 11. Sass
  • 12. Sass Sass is like CSS without the urge to kill.
  • 13. Sass Sass is like CSS without the urge to kill. #content h1.big_header { !bright_blue = #00aeff font-size: 1.6em; color: #00aeff; =list_defaults } margin: 0 #content ul.navigation { padding: 0 margin: 0; list-style: none padding: 0; list-style: none; #content } h1.big_header #content ul.navigation li { font-size: 1.6em display: inline; color: = !bright_blue margin-right: 0; ul.navigation } +list_defaults #content ul.navigation li.last { li margin: 0; display: inline } margin-right: 0 &.last margin: 0
  • 14. Sass !bright_blue = #00aeff • No semicolons or brackets =list_defaults • All properties on one line margin: 0 padding: 0 list-style: none • Nests selectors for scoping #content h1.big_header • Allows use of variables, mixins, and font-size: 1.6em color: = !bright_blue other advanced features for DRY code ul.navigation +list_defaults • Easy syntax for referencing parent li display: inline selectors margin-right: 0 &.last margin: 0 • Support for Sass partials
  • 15. Haml & Sass: Best Practices • Organize your Sass. • Use classes on <body> to identify pages. • Use descriptive Class and ID names. • Use semantic Classes and HTML. • Donʼt over identify - scope instead. • Hacks are OK. • Start with barebones HTML.
  • 16. Haml & Sass: Resources • Haml: haml-lang.com • Sass: sass-lang.com • Staticmatic: staticmatic.rubyforge.org • TextMate: macromates.com

Editor's Notes

  1. - Photoshop isn&amp;#x2019;t an ideal tool for prototyping - Fonts don&amp;#x2019;t look right, it only shows one state forcing you to make many pages - extra work sucks - Managing feedback and revisions is a nightmare - editing multiple files for the same change
  2. - Wireframes are good for quickly sketching out ideas internally among team members - Stakeholders often don&amp;#x2019;t understand wireframes - Stakeholders get more excited playing with the real thing
  3. - Designers who develop have total control - The more people your design goes through, the more it can go wrong - developers don&amp;#x2019;t pay attention to things like margins and grids - Prototyping allows developers and copywriters to be involved early in the process - no waiting around for you to get approval - Be involved in the entire process - refine and improve your work as things change
  4. - Plans are just guesses that take a long time - Do a quick design to get you going then dive into code - Make changes as feedback is given and new information comes to light
  5. Organize - Keep number of stylesheets to a minimum, group sections together, keep properties consistent Names - don&amp;#x2019;t use shortforms Sematics - describe content, not appearance. HTML - use appropriate tags to describe content, not appearance i.e. &lt;strong&gt; vs &lt;b&gt;