SlideShare a Scribd company logo
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

Beautifying senc
Beautifying sencBeautifying senc
Beautifying senc
Rachana Upadhyay
 
Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.
Eugene Nor
 
Wp Tech
Wp TechWp Tech
Revamp Your Stylesheet
Revamp Your StylesheetRevamp Your Stylesheet
Revamp Your Stylesheet
Gary Homidas
 
Less presentation
Less presentationLess presentation
Less presentation
Todd Shelton
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
Vijay Shukla
 
MongoDB London PHP
MongoDB London PHPMongoDB London PHP
MongoDB London PHP
Mike 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 trying
James Cryer
 
LESS CSS
LESS CSSLESS CSS
LESS CSS
Man Math
 
LESS CSS
LESS CSSLESS CSS

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

UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
kavi806657
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome Stylesheet
Neha Sharma
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by Shafeeq
DignitasDigital1
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
Irfan Maulana
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
Amey Parab
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
JoeSeckelman
 
Less
LessLess
Compass n Sass
Compass n SassCompass n Sass
Compass n Sass
Pradeep Saraswathi
 
Web technologies-course 05.pptx
Web technologies-course 05.pptxWeb technologies-course 05.pptx
Web technologies-course 05.pptx
Stefan Oprea
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
Yatendra Bhardwaj
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
Nick Cooley
 
LESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionLESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introduction
rushi7567
 
Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01
Anam Hossain
 
CSS preprocessor: why and how
CSS preprocessor: why and howCSS preprocessor: why and how
CSS preprocessor: why and how
mirahman
 
Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sass
Knoldus 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 Developers
Suzette Franck
 
Preprocessor CSS: SASS
Preprocessor CSS: SASSPreprocessor CSS: SASS
Preprocessor CSS: SASS
Geoffroy Baylaender
 
Advanced sass
Advanced sassAdvanced sass
Advanced sass
Kianosh Pourian
 
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

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 

Recently uploaded (20)

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 

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