SlideShare a Scribd company logo
Haml & Sass (SCSS)
by Krzysztof Jablonski
ERb (Embedded Ruby)
ERb is the default template language included with Rails.
It is very similar to PHP, JSP and ASP.
ERb (Embedded Ruby)
ERb is the default template language included with Rails.
It is very similar to PHP, JSP and ASP.
ERb (Embedded Ruby)
ERb is the default template language included with Rails.
It is very similar to PHP, JSP and ASP.
ERb (Embedded Ruby)
<%= %>
will render the result returned from the embedded Ruby expression
as text
ERb (Embedded Ruby)
<%= %>
will render the result returned from the embedded Ruby expression
as text
<% %> 
will execute the embedded expression without rendering the result
ERb (Embedded Ruby)
<%= %>
will render the result returned from the embedded Ruby expression
as text
<% %> 
will execute the embedded expression without rendering the result
<% -%>
will execute the embedded expression without rendering the
result and will suppress trailing whitespace
ERb (Embedded Ruby)
<%= %>
will render the result returned from the embedded Ruby expression
as text
<% %> 
will execute the embedded expression without rendering the result
<% -%>
will execute the embedded expression without rendering the
result and will suppress trailing whitespace
<%- %>
will execute the embedded expression without rendering the result
and will suppress leading whitespace
ERb (Embedded Ruby)
<%= %>
will render the result returned from the embedded Ruby expression
as text
<% %> 
will execute the embedded expression without rendering the result
<% -%>
will execute the embedded expression without rendering the
result and will suppress trailing whitespace
<%- %>
will execute the embedded expression without rendering the result
and will suppress leading whitespace
<%# %>
will cause the embedded expression to be parsed as a comment
Haml
Haml is based on one primary principle. Markup should be
beautiful.
Haml
Haml is based on one primary principle. Markup should be
beautiful.
index.html.haml
Haml
Haml is based on one primary principle. Markup should be
beautiful.
index.html.haml
index.html.erb
Haml examples
Haml examples
Haml examples
Haml examples
Haml 3.0
Easier Multiline Ruby Functions
Haml 3.0
Custom Data Attributes
CSS (Cascading Style Sheets)
CSS (Cascading Style Sheets)
Netguru rules:
CSS (Cascading Style Sheets)
Netguru rules:
one style sheet for all browsers
CSS (Cascading Style Sheets)
Netguru rules:
one style sheet for all browsers
IE6 support
CSS (Cascading Style Sheets)
Netguru rules:
one style sheet for all browsers
IE6 support
rounded corners (CSS)
CSS (Cascading Style Sheets)
Netguru rules:
one style sheet for all browsers
IE6 support
rounded corners (CSS)
only PNG without PNGfix
Sass 
Sass is an extension of CSS3, adding:
nested rules,
variables,
mixins,
selector inheritance,
and more.
Sass
 
Sass
 
Sass
 
Sass
 
Sass vs SCSS (Sassy CSS)
SCSS SASS
Sass 3
variables with the $ prefix instead of ! (bang)
Sass 3
variables with the $ prefix instead of ! (bang)
mixins are declared with @mixin and included with
@include
Sass 3
variables with the $ prefix instead of ! (bang)
mixins are declared with @mixin and included with
@include
color functions (lighten, darken, etc.)
Sass 3
variables with the $ prefix instead of ! (bang)
mixins are declared with @mixin and included with
@include
color functions (lighten, darken, etc.)
selector inheritance (@extend) 
Sass 3
variables with the $ prefix instead of ! (bang)
mixins are declared with @mixin and included with
@include
color functions (lighten, darken, etc.)
selector inheritance (@extend) 
= is no longer necessary for declaring properties with
variable values
Sass 3
variables with the $ prefix instead of ! (bang)
mixins are declared with @mixin and included with
@include
color functions (lighten, darken, etc.)
selector inheritance (@extend) 
= is no longer necessary for declaring properties with
variable values
strings without quotes were deprecated
Haml & sass
Sites
http://haml-lang.com/
http://sass-lang.com/
http://nex-3.com/

More Related Content

PPTX
Introduction to HAML
KEY
Sass: The Future of Stylesheets
KEY
The Cascade, Grids, Headings, and Selectors from an OOCSS Perspective, Ajax ...
PDF
Html:css crash course (4:5)
PPTX
Castro Chapter 7
PDF
01 Introduction To CSS
Introduction to HAML
Sass: The Future of Stylesheets
The Cascade, Grids, Headings, and Selectors from an OOCSS Perspective, Ajax ...
Html:css crash course (4:5)
Castro Chapter 7
01 Introduction To CSS

What's hot (9)

PPTX
Design todevelop
PPTX
Css 3
PPTX
Css 3
KEY
Wrangling the CSS Beast with Sass
ODP
HTML5, CSS, JavaScript Style guide and coding conventions
KEY
Advanced sass/compass
PDF
Perfect Styling - How to write better CSS
PDF
PDF
Flickr Architecture Presentation
Design todevelop
Css 3
Css 3
Wrangling the CSS Beast with Sass
HTML5, CSS, JavaScript Style guide and coding conventions
Advanced sass/compass
Perfect Styling - How to write better CSS
Flickr Architecture Presentation
Ad

Viewers also liked (17)

PPTX
Pollner figurativelanguage
PPTX
Langer dan 4 jaar doen met je pc
PPT
DICTIONARY INFORMATICA
PDF
Theories of child Development
PDF
Virtual classrooms warrier&preeti
PDF
PDF
Apple project final
PPSX
Institucional Anacã
PPT
Activemerchant
PDF
Risk based capital management preeti & warrier
PPT
RupyTuesday - Facebook
PDF
New mediakeynote
PDF
An approach to erm in the insurance industry apria 2002 rama warrier&preeti
PPT
Presentazione geometri2012 13
PPTX
Pollner figurativelanguage
PPT
6 word memoir
PPT
Heroes de novela
Pollner figurativelanguage
Langer dan 4 jaar doen met je pc
DICTIONARY INFORMATICA
Theories of child Development
Virtual classrooms warrier&preeti
Apple project final
Institucional Anacã
Activemerchant
Risk based capital management preeti & warrier
RupyTuesday - Facebook
New mediakeynote
An approach to erm in the insurance industry apria 2002 rama warrier&preeti
Presentazione geometri2012 13
Pollner figurativelanguage
6 word memoir
Heroes de novela
Ad

Similar to Haml & sass (20)

PPT
Soap vs-rest
PDF
Killing the Angle Bracket
PPT
Ruby on rails
PPTX
Elegant CSS Design In Drupal: LESS vs Sass
KEY
Authoring Stylesheets with Compass & Sass
PPS
What is LessCSS and its Detailed Explation - Xhtmlchop
PPTX
Intro to Ruby on Rails
PPTX
Write LESS. DO more.
PPT
Choosing a Templating System
KEY
HTML5 and CSS3 for Teachers
PDF
How DSL works on Ruby
PDF
Ruby and Rails short motivation
PDF
Pacific Northwest Drupal Summit: Basic & SASS
PDF
Haml And Sass: Put your markup on a diet
PDF
-Haml Presentation
KEY
Advanced sass
PPT
Rails Vs CakePHP
PDF
Css preprocessor-140606115334-phpapp01
PDF
CSS preprocessor: why and how
KEY
Soap vs-rest
Killing the Angle Bracket
Ruby on rails
Elegant CSS Design In Drupal: LESS vs Sass
Authoring Stylesheets with Compass & Sass
What is LessCSS and its Detailed Explation - Xhtmlchop
Intro to Ruby on Rails
Write LESS. DO more.
Choosing a Templating System
HTML5 and CSS3 for Teachers
How DSL works on Ruby
Ruby and Rails short motivation
Pacific Northwest Drupal Summit: Basic & SASS
Haml And Sass: Put your markup on a diet
-Haml Presentation
Advanced sass
Rails Vs CakePHP
Css preprocessor-140606115334-phpapp01
CSS preprocessor: why and how

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
1. Introduction to Computer Programming.pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
DP Operators-handbook-extract for the Mautical Institute
PPT
What is a Computer? Input Devices /output devices
PPTX
Tartificialntelligence_presentation.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Hybrid model detection and classification of lung cancer
PDF
Architecture types and enterprise applications.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Programs and apps: productivity, graphics, security and other tools
1. Introduction to Computer Programming.pptx
A novel scalable deep ensemble learning framework for big data classification...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
DP Operators-handbook-extract for the Mautical Institute
What is a Computer? Input Devices /output devices
Tartificialntelligence_presentation.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Module 1.ppt Iot fundamentals and Architecture
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Group 1 Presentation -Planning and Decision Making .pptx
observCloud-Native Containerability and monitoring.pptx
cloud_computing_Infrastucture_as_cloud_p
A comparative study of natural language inference in Swahili using monolingua...
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
Getting started with AI Agents and Multi-Agent Systems
Hybrid model detection and classification of lung cancer
Architecture types and enterprise applications.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game

Haml & sass

  • 1. Haml & Sass (SCSS) by Krzysztof Jablonski
  • 2. ERb (Embedded Ruby) ERb is the default template language included with Rails. It is very similar to PHP, JSP and ASP.
  • 3. ERb (Embedded Ruby) ERb is the default template language included with Rails. It is very similar to PHP, JSP and ASP.
  • 4. ERb (Embedded Ruby) ERb is the default template language included with Rails. It is very similar to PHP, JSP and ASP.
  • 5. ERb (Embedded Ruby) <%= %> will render the result returned from the embedded Ruby expression as text
  • 6. ERb (Embedded Ruby) <%= %> will render the result returned from the embedded Ruby expression as text <% %>  will execute the embedded expression without rendering the result
  • 7. ERb (Embedded Ruby) <%= %> will render the result returned from the embedded Ruby expression as text <% %>  will execute the embedded expression without rendering the result <% -%> will execute the embedded expression without rendering the result and will suppress trailing whitespace
  • 8. ERb (Embedded Ruby) <%= %> will render the result returned from the embedded Ruby expression as text <% %>  will execute the embedded expression without rendering the result <% -%> will execute the embedded expression without rendering the result and will suppress trailing whitespace <%- %> will execute the embedded expression without rendering the result and will suppress leading whitespace
  • 9. ERb (Embedded Ruby) <%= %> will render the result returned from the embedded Ruby expression as text <% %>  will execute the embedded expression without rendering the result <% -%> will execute the embedded expression without rendering the result and will suppress trailing whitespace <%- %> will execute the embedded expression without rendering the result and will suppress leading whitespace <%# %> will cause the embedded expression to be parsed as a comment
  • 10. Haml Haml is based on one primary principle. Markup should be beautiful.
  • 11. Haml Haml is based on one primary principle. Markup should be beautiful. index.html.haml
  • 12. Haml Haml is based on one primary principle. Markup should be beautiful. index.html.haml index.html.erb
  • 17. Haml 3.0 Easier Multiline Ruby Functions
  • 18. Haml 3.0 Custom Data Attributes
  • 20. CSS (Cascading Style Sheets) Netguru rules:
  • 21. CSS (Cascading Style Sheets) Netguru rules: one style sheet for all browsers
  • 22. CSS (Cascading Style Sheets) Netguru rules: one style sheet for all browsers IE6 support
  • 23. CSS (Cascading Style Sheets) Netguru rules: one style sheet for all browsers IE6 support rounded corners (CSS)
  • 24. CSS (Cascading Style Sheets) Netguru rules: one style sheet for all browsers IE6 support rounded corners (CSS) only PNG without PNGfix
  • 25. Sass  Sass is an extension of CSS3, adding: nested rules, variables, mixins, selector inheritance, and more.
  • 30. Sass vs SCSS (Sassy CSS) SCSS SASS
  • 31. Sass 3 variables with the $ prefix instead of ! (bang)
  • 32. Sass 3 variables with the $ prefix instead of ! (bang) mixins are declared with @mixin and included with @include
  • 33. Sass 3 variables with the $ prefix instead of ! (bang) mixins are declared with @mixin and included with @include color functions (lighten, darken, etc.)
  • 34. Sass 3 variables with the $ prefix instead of ! (bang) mixins are declared with @mixin and included with @include color functions (lighten, darken, etc.) selector inheritance (@extend) 
  • 35. Sass 3 variables with the $ prefix instead of ! (bang) mixins are declared with @mixin and included with @include color functions (lighten, darken, etc.) selector inheritance (@extend)  = is no longer necessary for declaring properties with variable values
  • 36. Sass 3 variables with the $ prefix instead of ! (bang) mixins are declared with @mixin and included with @include color functions (lighten, darken, etc.) selector inheritance (@extend)  = is no longer necessary for declaring properties with variable values strings without quotes were deprecated