SlideShare a Scribd company logo
1 of 55
SASS
S Y N TA C T I C A L LY AW E S O M E S T Y L E S H E E T
AGENDA
a) What is Sass? b) Difference Between SASS and SCSS?
c) How to use comments in SASS and SCSS? d) General Guidelines for Proper Syntax.
e) How to Compile Sass Files f) Variables
g) Nesting h) Interpolation
i) Data Types j) Operations
k) Sass Directives l) Useful Links
WHAT IS A SASS ?
• SASS stand for Syntactically Awesome Style Sheets.
• SASS is a CSS Preprocessor.
• SASS can be written in either the sass or scss syntax.
• SASS files compile into CSS files.
WHAT IS A PREPROCESSOR
Now the question arises WHAT IS A PREPROCESSOR ?
A Preprocessor is a program that takes one type of data and converts it to
another type of data. In the case of HTML and CSS, some of the more popular
preprocessor languages include Haml and Sass .
Haml is processed into HTML and Sass is processed into CSS.
INSTALLATION
There are a couple of ways to start using Sass:​
1. Application (Third party apps)​
2. Command line
1. APPLICATION (THIRD PARTY)
There are good many applications that will get you up and running with Sass in a
few minutes for Mac, Windows, and Linux.​
 Codekit (Paid)​
 Compass.app (Paid, Open Source)​
 LiveReload (Paid, Open Source)​
 Koala (Open Source)​
 Scout (Open Source)​
 Prepros (Paid)​
‘’ Koala and Scout are Open Source Applications. ’’​
2. COMMAND LINE
1
First, Install Ruby
2
Open comment
line check
whether ruby
installed or not.
3
Type - > gem
install sass
4
If SASS
successfully
installed then
use it
5
Create a folder
and .scss file
and run it by
using
-> sass –-watch
file.scss:file.css
DIFFERENCE BETWEEN SASS AND
SCSS?
• Sass, also known as the indented syntax.
• Scss, a CSS-like syntax.
• Scss uses brackets and semicolons to indent the code.
• In other hand Sass uses spaces and new lines to indent the code.
COMMENTS IN SASS AND SCSS
GENERAL
GUIDELINES
FOR PROPER
SYNTAX
• Syntax Only for .scss
• Add few variables with
dollar ($) sign.
• Declare variable value
• Call into the class and id
• Indent it properly
VARIABLES
SCSS CSS
NESTING
• Nesting allowing authors
to nest selectors within
selectors in order to
create shortcuts.
PARENT SELECTOR
NESTING PROPERTIES
DEFAULT AND GLOBAL FLAGS
DEFINING GLOBAL VARIABLES
INTERPOLATION
• It provides SassScript variables in selectors and property names using
#{ } syntax. You can specify variables or property names within the curly braces.
• Syntax->
#{name}
Where, $name is the name of the variable or property name.
DATA TYPES
Sass supports Seven data types.
1. Numbers (e.g. 1.2, 13, 10px)
2. Strings of text, with and without quotes (e.g. “abc", ‘xyz', abc)
3. Colors (e.g. blue, #04a3f9, rgba(255, 0, 0, 0.5),hsl(), rgb())
4. Booleans (e.g. true, false)
5. Maps from one value to another (e.g. (key1: value1, key2: value2));
6. Lists of values, separated by spaces or commas (e.g. 1.5em 1em 0 2em, Helvetica,
Arial, sans-serif)
7. Nulls (e.g. null)
NUMBERS & STRINGS
COLORS & LISTS
MAPS
• Declare the variables like
this.
• No use of semicolons(;)
only use commas(,)
USE MAPS IN CLASS
OPERATIONS
STRING OPERATIONS
DIRECTIVES
@import
@Partial
@media
@extend
@if and @for
@each and @while
@mixins
@at-root
@debug
@warn
@error
CREATE FOLDER DIRECTORY
HOW TO RUN
THE FOLDER
• First, set your folder
path
• Set your folder
• Run like comment
->sass –watch
master.scss:master.css
@IMPORT
• We can import multiple
files in a single import.
• We can only use files
name without extension.
• Always remember the
files order in import.
• Also import the url
• For example-
@import
url(“href="https://fonts.goo
gleapis.com/css?family=Rob
oto" ”);
@PARTIALS
@MEDIA DIRECTIVE
USING VARIABLE IN MEDIA
@EXTEND
THE @IF DIRECTIVE
THE @FOR DIRECTIVE
USING VARIABLE IN @FOR DIR.
@EACH
USING MAPS WITH @EACH
@WHILE
USING MAPS WITH @WHILE
@MIXINS
@AT-ROOT
@AT-ROOT PROPERTY
@DEBUG
• The @debug directive prints the value of a Sass expression to the standard
error output stream.
For Example:-
@debug 10px + 20px;
• When I save the file the output is written to the output stream of my watch
command.
@WARN
• The @warn directive prints the value of a Sass expression to the standard
error output stream.
$wrn: 20px;
@warn: “#{$wrn}”;
• It will display the value of the expression as well as the line number of the
warning.
@ERROR
• The @error directive gives the value of a Sass expression as an error, again to
the standard error stream.
$test: 1px;
@error “#{$test}”;
• This will display, line number , and value in the standard error stream.
USEFUL LINKS
• http://sass-lang.com/
• http://sass-lang.com/documentation/file.SASS_REFERENCE.html
• https://www.sitepoint.com/8-tips-help-get-best-sass/
• http://www.sassmeister.com/
• https://anotheruiguy.gitbooks.io/sassintherealworld_book-i/handy-tools/default-
flag.html
Sass  - basic to advance

More Related Content

What's hot

Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.Eugene Nor
 
Revamp Your Stylesheet
Revamp Your StylesheetRevamp Your Stylesheet
Revamp Your StylesheetGary Homidas
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4Vijay Shukla
 
MongoDB London PHP
MongoDB London PHPMongoDB London PHP
MongoDB London PHPMike Dirolf
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingJames Cryer
 

What's hot (10)

Beautifying senc
Beautifying sencBeautifying senc
Beautifying senc
 
Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.
 
Wp Tech
Wp TechWp Tech
Wp Tech
 
Revamp Your Stylesheet
Revamp Your StylesheetRevamp Your Stylesheet
Revamp Your Stylesheet
 
Less presentation
Less presentationLess presentation
Less presentation
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
 
MongoDB London PHP
MongoDB London PHPMongoDB London PHP
MongoDB London PHP
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y trying
 
LESS CSS
LESS CSSLESS CSS
LESS CSS
 
LESS CSS
LESS CSSLESS CSS
LESS CSS
 

Similar to Sass - basic to advance

SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetNeha Sharma
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqDignitasDigital1
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionIrfan Maulana
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS ImplementationAmey Parab
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentationJoeSeckelman
 
Web technologies-course 05.pptx
Web technologies-course 05.pptxWeb technologies-course 05.pptx
Web technologies-course 05.pptxStefan Oprea
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajYatendra Bhardwaj
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compassNick Cooley
 
LESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionLESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionrushi7567
 
Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01Anam Hossain
 
CSS preprocessor: why and how
CSS preprocessor: why and howCSS preprocessor: why and how
CSS preprocessor: why and howmirahman
 
Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sassKnoldus Inc.
 
Scss talk CSS Meetup
Scss talk CSS Meetup Scss talk CSS Meetup
Scss talk CSS Meetup Caleb Yang
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersSuzette Franck
 
Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan Stefan Bauer
 

Similar to Sass - basic to advance (20)

UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome Stylesheet
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by Shafeeq
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
 
Less
LessLess
Less
 
Compass n Sass
Compass n SassCompass n Sass
Compass n Sass
 
Web technologies-course 05.pptx
Web technologies-course 05.pptxWeb technologies-course 05.pptx
Web technologies-course 05.pptx
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
LESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionLESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introduction
 
Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01
 
CSS preprocessor: why and how
CSS preprocessor: why and howCSS preprocessor: why and how
CSS preprocessor: why and how
 
Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sass
 
Scss talk CSS Meetup
Scss talk CSS Meetup Scss talk CSS Meetup
Scss talk CSS Meetup
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress Developers
 
Preprocessor CSS: SASS
Preprocessor CSS: SASSPreprocessor CSS: SASS
Preprocessor CSS: SASS
 
Advanced sass
Advanced sassAdvanced sass
Advanced sass
 
Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan
 

Recently uploaded

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Recently uploaded (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Sass - basic to advance

  • 1. SASS S Y N TA C T I C A L LY AW E S O M E S T Y L E S H E E T
  • 2. AGENDA a) What is Sass? b) Difference Between SASS and SCSS? c) How to use comments in SASS and SCSS? d) General Guidelines for Proper Syntax. e) How to Compile Sass Files f) Variables g) Nesting h) Interpolation i) Data Types j) Operations k) Sass Directives l) Useful Links
  • 3. WHAT IS A SASS ? • SASS stand for Syntactically Awesome Style Sheets. • SASS is a CSS Preprocessor. • SASS can be written in either the sass or scss syntax. • SASS files compile into CSS files.
  • 4. WHAT IS A PREPROCESSOR Now the question arises WHAT IS A PREPROCESSOR ? A Preprocessor is a program that takes one type of data and converts it to another type of data. In the case of HTML and CSS, some of the more popular preprocessor languages include Haml and Sass . Haml is processed into HTML and Sass is processed into CSS.
  • 5. INSTALLATION There are a couple of ways to start using Sass:​ 1. Application (Third party apps)​ 2. Command line
  • 6. 1. APPLICATION (THIRD PARTY) There are good many applications that will get you up and running with Sass in a few minutes for Mac, Windows, and Linux.​  Codekit (Paid)​  Compass.app (Paid, Open Source)​  LiveReload (Paid, Open Source)​  Koala (Open Source)​  Scout (Open Source)​  Prepros (Paid)​ ‘’ Koala and Scout are Open Source Applications. ’’​
  • 7. 2. COMMAND LINE 1 First, Install Ruby 2 Open comment line check whether ruby installed or not. 3 Type - > gem install sass 4 If SASS successfully installed then use it 5 Create a folder and .scss file and run it by using -> sass –-watch file.scss:file.css
  • 8. DIFFERENCE BETWEEN SASS AND SCSS? • Sass, also known as the indented syntax. • Scss, a CSS-like syntax. • Scss uses brackets and semicolons to indent the code. • In other hand Sass uses spaces and new lines to indent the code.
  • 9.
  • 10. COMMENTS IN SASS AND SCSS
  • 11. GENERAL GUIDELINES FOR PROPER SYNTAX • Syntax Only for .scss • Add few variables with dollar ($) sign. • Declare variable value • Call into the class and id • Indent it properly
  • 13. NESTING • Nesting allowing authors to nest selectors within selectors in order to create shortcuts.
  • 18. INTERPOLATION • It provides SassScript variables in selectors and property names using #{ } syntax. You can specify variables or property names within the curly braces. • Syntax-> #{name} Where, $name is the name of the variable or property name.
  • 19.
  • 20. DATA TYPES Sass supports Seven data types. 1. Numbers (e.g. 1.2, 13, 10px) 2. Strings of text, with and without quotes (e.g. “abc", ‘xyz', abc) 3. Colors (e.g. blue, #04a3f9, rgba(255, 0, 0, 0.5),hsl(), rgb()) 4. Booleans (e.g. true, false) 5. Maps from one value to another (e.g. (key1: value1, key2: value2)); 6. Lists of values, separated by spaces or commas (e.g. 1.5em 1em 0 2em, Helvetica, Arial, sans-serif) 7. Nulls (e.g. null)
  • 23. MAPS • Declare the variables like this. • No use of semicolons(;) only use commas(,)
  • 24. USE MAPS IN CLASS
  • 27. DIRECTIVES @import @Partial @media @extend @if and @for @each and @while @mixins @at-root @debug @warn @error
  • 29.
  • 30. HOW TO RUN THE FOLDER • First, set your folder path • Set your folder • Run like comment ->sass –watch master.scss:master.css
  • 31. @IMPORT • We can import multiple files in a single import. • We can only use files name without extension. • Always remember the files order in import. • Also import the url • For example- @import url(“href="https://fonts.goo gleapis.com/css?family=Rob oto" ”);
  • 35.
  • 36.
  • 40.
  • 41. USING VARIABLE IN @FOR DIR.
  • 42. @EACH
  • 45. USING MAPS WITH @WHILE
  • 49. @DEBUG • The @debug directive prints the value of a Sass expression to the standard error output stream. For Example:- @debug 10px + 20px; • When I save the file the output is written to the output stream of my watch command.
  • 50.
  • 51. @WARN • The @warn directive prints the value of a Sass expression to the standard error output stream. $wrn: 20px; @warn: “#{$wrn}”; • It will display the value of the expression as well as the line number of the warning.
  • 52.
  • 53. @ERROR • The @error directive gives the value of a Sass expression as an error, again to the standard error stream. $test: 1px; @error “#{$test}”; • This will display, line number , and value in the standard error stream.
  • 54. USEFUL LINKS • http://sass-lang.com/ • http://sass-lang.com/documentation/file.SASS_REFERENCE.html • https://www.sitepoint.com/8-tips-help-get-best-sass/ • http://www.sassmeister.com/ • https://anotheruiguy.gitbooks.io/sassintherealworld_book-i/handy-tools/default- flag.html