SlideShare a Scribd company logo
SASS
BY - Neha Sharma (nehha255@gmail.com)
Syntactically Awesome Style Sheets
AGENDA
Part One – Introduction
• What is SASS
• Why we need SASS
• SASS vs SCSS
• Let’s meet the SASS
Part Two – Syntax
• Nesting
• Variables and Scope
• !default
• !global
• Data Types
• @extend and @extend only
• Mixins
• &
• Interpolation #{}
• @at-root
We love CSS
It’s a question not a statement.
CSS and Issues
• Lot of CSS3 Vendor Prefixes
• Repeated code
• Changing value in single file is nightmare
• Big team working on same and big css file is issue
• No logic base styling
What you want to change?
Cleaner code, Logical Code, non-repeated code, less pain to write
and maintain and much more…
Why SASS?
What is SASS?
• Scripting language
• Syntactically Awesome stylesheet
• CSS Pre- Processor – Compile the SASS/SCSS files to CSS
• Developed in 2007
• Full css3 compatible
• Helps in writing clean, DRY-approach CSS
Advantages of SASS
• DRY – Don’t Repeat Yourself
• Modules
• Lots of features
• Mathematical calculations
• Conditional statements
• Functions and much more
SASS and Ruby
• Ruby is required ONLY to install SASS.
SASS on Production?
• You need SASS only for your local development.
• SASS is not required to be configured on the SERVER
SASS and IE/Error handling
It works on IE and code will only lead to broken css on your page
.sass vs .scss
.sass
o came first
o different from the CSS syntax
o Forget the semicolons and parenthesis
.scss
o superset of CSS
o Syntax is same but with new features of SASS
o Semicolons and Parenthesis are required
Let’s Meet the SASS
Nesting {}
• SASS use the nested code.
• Nested code helps in making the code cleaner and
easier to read and maintain
• It helps in achieving DRY
Variables
• Container of the value
Scopes in Variables
• As any other language SASS also comes with the
scopes.
• Global and Local
Scopes in Variables
Local
!global
!default
• You can assign to variables if they aren’t already
assigned by adding the !default flag to the end of the
value. This means that if the variable has already
been assigned to, it won’t be re-assigned, but if it
doesn’t have a value yet, it will be given one.
Data types
• Numbers
• Strings
• Colors
• Boolean
• Null
• List
• Maps
@extend
• @extend helps in the inheritance of styling and helps
us in the repeating the code.
@extend Only (%)
• When you don’t want to repeat the css.
mixin
• Mixin are the most useful and powerful feature of the SASS
[Define, Include , arguments]
• It helps in making the repeated code declared once and use it
n number of times.
• You can have the mixin with arguments too, Defaults,
Varibales, maps, content, to mixin
mixin
Pros and Cons of Mixin
Pros:
o DRY approach
o Maintains the quality and consistency of the code
o Lot of complexity can be handle through the mixin
CONS:
o With each include of mixin new css is generated which leads to the lot of
duplicity of the code
o Could become little hard to maintain
& Operator
& in SASS refers to the current parent selector
#{} Interpolation
You can use variables in selectors & property names using #{}
@at-root
The @at-root directive causes one or more rules to be emitted at
the root of the document, rather than being nested beneath
their parent selectors
Best Practice
o Make a single file to create your variables
o Make a single file to create your mixin
o Make a single file to create Overloading of the libraries and 3rd party
plugin
o Make a single file to handle the structure of the website/Application
o Break the files into modules, pages etc
Other Frameworks
• LESS
• Stylus
References
o http://sass-lang.com/documentation

More Related Content

What's hot

HTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventionsHTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventions
Knoldus Inc.
 
Sass
SassSass
CSS Mastigado
CSS MastigadoCSS Mastigado
CSS Mastigado
MelquisedequeBenvind1
 
Tailwind: The Future of CSS is Here!
Tailwind: The Future of CSS is Here!Tailwind: The Future of CSS is Here!
Tailwind: The Future of CSS is Here!
Abdullah Al Mahi
 
Session1-Introduce Http-HTTP Security headers
Session1-Introduce Http-HTTP Security headers Session1-Introduce Http-HTTP Security headers
Session1-Introduce Http-HTTP Security headers
zakieh alizadeh
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
Swati Sharma
 
Tech talk on Tailwind CSS
Tech talk on Tailwind CSSTech talk on Tailwind CSS
Tech talk on Tailwind CSS
Squareboat
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
Sanjeev Kumar
 
Css to-scss
Css to-scssCss to-scss
Css to-scss
frontendne
 
Css Basics
Css BasicsCss Basics
Css Basics
Jay Patel
 
Introduction to WordPress for Beginners
Introduction to WordPress for BeginnersIntroduction to WordPress for Beginners
Introduction to WordPress for Beginners
R-Cubed Design Forge
 
Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3
Devang Garach
 
Web Components Everywhere
Web Components EverywhereWeb Components Everywhere
Web Components Everywhere
Ilia Idakiev
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
Amit Tyagi
 
Unsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST APIUnsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST API
Mikhail Egorov
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
Zoe Gillenwater
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser Caching
Andrew Khoury
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
Eliran Eliassy
 
Preventing XSS with Content Security Policy
Preventing XSS with Content Security PolicyPreventing XSS with Content Security Policy
Preventing XSS with Content Security Policy
Ksenia Peguero
 
CSS For Backend Developers
CSS For Backend DevelopersCSS For Backend Developers
CSS For Backend Developers
10Clouds
 

What's hot (20)

HTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventionsHTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventions
 
Sass
SassSass
Sass
 
CSS Mastigado
CSS MastigadoCSS Mastigado
CSS Mastigado
 
Tailwind: The Future of CSS is Here!
Tailwind: The Future of CSS is Here!Tailwind: The Future of CSS is Here!
Tailwind: The Future of CSS is Here!
 
Session1-Introduce Http-HTTP Security headers
Session1-Introduce Http-HTTP Security headers Session1-Introduce Http-HTTP Security headers
Session1-Introduce Http-HTTP Security headers
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 
Tech talk on Tailwind CSS
Tech talk on Tailwind CSSTech talk on Tailwind CSS
Tech talk on Tailwind CSS
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Css to-scss
Css to-scssCss to-scss
Css to-scss
 
Css Basics
Css BasicsCss Basics
Css Basics
 
Introduction to WordPress for Beginners
Introduction to WordPress for BeginnersIntroduction to WordPress for Beginners
Introduction to WordPress for Beginners
 
Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3
 
Web Components Everywhere
Web Components EverywhereWeb Components Everywhere
Web Components Everywhere
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Unsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST APIUnsafe JAX-RS: Breaking REST API
Unsafe JAX-RS: Breaking REST API
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser Caching
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
Preventing XSS with Content Security Policy
Preventing XSS with Content Security PolicyPreventing XSS with Content Security Policy
Preventing XSS with Content Security Policy
 
CSS For Backend Developers
CSS For Backend DevelopersCSS For Backend Developers
CSS For Backend Developers
 

Viewers also liked

Intro to SASS CSS
Intro to SASS CSSIntro to SASS CSS
Intro to SASS CSS
Kianosh Pourian
 
CSS3 Flex Layout
CSS3 Flex LayoutCSS3 Flex Layout
CSS3 Flex Layout
Neha Sharma
 
Responsive Web design
Responsive Web designResponsive Web design
Responsive Web design
Neha Sharma
 
Introduction to Webcomponents
Introduction to WebcomponentsIntroduction to Webcomponents
Introduction to Webcomponents
Neha Sharma
 
CSS Best Practices
CSS Best PracticesCSS Best Practices
CSS Best Practices
nolly00
 
Using scss-at-noisestreet
Using scss-at-noisestreetUsing scss-at-noisestreet
Using scss-at-noisestreet
Wei Pin Teo
 
Getting Started With Sass | WC Philly 2015
Getting Started With Sass | WC Philly 2015Getting Started With Sass | WC Philly 2015
Getting Started With Sass | WC Philly 2015
Maura Teal
 
Getting SASSy with front end development
Getting SASSy with front end developmentGetting SASSy with front end development
Getting SASSy with front end development
Matthew Carleton
 
Sass: Introduction
Sass: IntroductionSass: Introduction
Sass: Introduction
BalaKrishna Kolliboina
 
Post css - Getting start with PostCSS
Post css - Getting start with PostCSSPost css - Getting start with PostCSS
Post css - Getting start with PostCSS
Neha Sharma
 
Progressive web apps
 Progressive web apps Progressive web apps
Progressive web apps
Neha Sharma
 
CSS3 secrets: 10 things you might not know about CSS3
CSS3 secrets: 10 things you might not know about CSS3CSS3 secrets: 10 things you might not know about CSS3
CSS3 secrets: 10 things you might not know about CSS3
Lea Verou
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
Achmad Solichin
 
Reactjs
Reactjs Reactjs
Reactjs
Neha Sharma
 

Viewers also liked (14)

Intro to SASS CSS
Intro to SASS CSSIntro to SASS CSS
Intro to SASS CSS
 
CSS3 Flex Layout
CSS3 Flex LayoutCSS3 Flex Layout
CSS3 Flex Layout
 
Responsive Web design
Responsive Web designResponsive Web design
Responsive Web design
 
Introduction to Webcomponents
Introduction to WebcomponentsIntroduction to Webcomponents
Introduction to Webcomponents
 
CSS Best Practices
CSS Best PracticesCSS Best Practices
CSS Best Practices
 
Using scss-at-noisestreet
Using scss-at-noisestreetUsing scss-at-noisestreet
Using scss-at-noisestreet
 
Getting Started With Sass | WC Philly 2015
Getting Started With Sass | WC Philly 2015Getting Started With Sass | WC Philly 2015
Getting Started With Sass | WC Philly 2015
 
Getting SASSy with front end development
Getting SASSy with front end developmentGetting SASSy with front end development
Getting SASSy with front end development
 
Sass: Introduction
Sass: IntroductionSass: Introduction
Sass: Introduction
 
Post css - Getting start with PostCSS
Post css - Getting start with PostCSSPost css - Getting start with PostCSS
Post css - Getting start with PostCSS
 
Progressive web apps
 Progressive web apps Progressive web apps
Progressive web apps
 
CSS3 secrets: 10 things you might not know about CSS3
CSS3 secrets: 10 things you might not know about CSS3CSS3 secrets: 10 things you might not know about CSS3
CSS3 secrets: 10 things you might not know about CSS3
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
 
Reactjs
Reactjs Reactjs
Reactjs
 

Similar to 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
DignitasDigital1
 
Sass - basic to advance
Sass  - basic to advanceSass  - basic to advance
Sass - basic to advance
Vinita Swamy
 
What is-sass-by-lucas-castro
What is-sass-by-lucas-castroWhat is-sass-by-lucas-castro
What is-sass-by-lucas-castro
Lucas Castro
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
Amey Parab
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
Irfan Maulana
 
Less
LessLess
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
Yatendra Bhardwaj
 
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
Jer Clarke
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
kavi806657
 
Web technologies-course 05.pptx
Web technologies-course 05.pptxWeb technologies-course 05.pptx
Web technologies-course 05.pptx
Stefan Oprea
 
A forest of designs without subthemes
A forest of designs without subthemesA forest of designs without subthemes
A forest of designs without subthemes
Heather Brooke Drummond
 
European SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint SassyEuropean SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint Sassy
Stefan Bauer
 
WordCamp NYC - DRY CSS
WordCamp NYC - DRY CSSWordCamp NYC - DRY CSS
WordCamp NYC - DRY CSS
Jer Clarke
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1
Jyoti Yadav
 
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
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
Nick Cooley
 
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
Stefan Bauer
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
JoeSeckelman
 
Using Sass in Your WordPress Projects
Using Sass in Your WordPress ProjectsUsing Sass in Your WordPress Projects
Using Sass in Your WordPress Projects
Jeremy Green
 
Universal CSS - Betsy Granger - ebookcraft 2018
Universal CSS - Betsy Granger - ebookcraft 2018Universal CSS - Betsy Granger - ebookcraft 2018
Universal CSS - Betsy Granger - ebookcraft 2018
BookNet Canada
 

Similar to SASS - Syntactically Awesome Stylesheet (20)

Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by Shafeeq
 
Sass - basic to advance
Sass  - basic to advanceSass  - basic to advance
Sass - basic to advance
 
What is-sass-by-lucas-castro
What is-sass-by-lucas-castroWhat is-sass-by-lucas-castro
What is-sass-by-lucas-castro
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
 
Less
LessLess
Less
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
 
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
Web technologies-course 05.pptx
Web technologies-course 05.pptxWeb technologies-course 05.pptx
Web technologies-course 05.pptx
 
A forest of designs without subthemes
A forest of designs without subthemesA forest of designs without subthemes
A forest of designs without subthemes
 
European SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint SassyEuropean SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint Sassy
 
WordCamp NYC - DRY CSS
WordCamp NYC - DRY CSSWordCamp NYC - DRY CSS
WordCamp NYC - DRY CSS
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress Developers
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
 
Using Sass in Your WordPress Projects
Using Sass in Your WordPress ProjectsUsing Sass in Your WordPress Projects
Using Sass in Your WordPress Projects
 
Universal CSS - Betsy Granger - ebookcraft 2018
Universal CSS - Betsy Granger - ebookcraft 2018Universal CSS - Betsy Granger - ebookcraft 2018
Universal CSS - Betsy Granger - ebookcraft 2018
 

Recently uploaded

GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 

Recently uploaded (20)

GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 

SASS - Syntactically Awesome Stylesheet

  • 1. SASS BY - Neha Sharma (nehha255@gmail.com) Syntactically Awesome Style Sheets
  • 2. AGENDA Part One – Introduction • What is SASS • Why we need SASS • SASS vs SCSS • Let’s meet the SASS Part Two – Syntax • Nesting • Variables and Scope • !default • !global • Data Types • @extend and @extend only • Mixins • & • Interpolation #{} • @at-root
  • 3. We love CSS It’s a question not a statement.
  • 4. CSS and Issues • Lot of CSS3 Vendor Prefixes • Repeated code • Changing value in single file is nightmare • Big team working on same and big css file is issue • No logic base styling
  • 5. What you want to change? Cleaner code, Logical Code, non-repeated code, less pain to write and maintain and much more…
  • 7. What is SASS? • Scripting language • Syntactically Awesome stylesheet • CSS Pre- Processor – Compile the SASS/SCSS files to CSS • Developed in 2007 • Full css3 compatible • Helps in writing clean, DRY-approach CSS
  • 8. Advantages of SASS • DRY – Don’t Repeat Yourself • Modules • Lots of features • Mathematical calculations • Conditional statements • Functions and much more
  • 9. SASS and Ruby • Ruby is required ONLY to install SASS.
  • 10. SASS on Production? • You need SASS only for your local development. • SASS is not required to be configured on the SERVER
  • 11. SASS and IE/Error handling It works on IE and code will only lead to broken css on your page
  • 12. .sass vs .scss .sass o came first o different from the CSS syntax o Forget the semicolons and parenthesis .scss o superset of CSS o Syntax is same but with new features of SASS o Semicolons and Parenthesis are required
  • 14. Nesting {} • SASS use the nested code. • Nested code helps in making the code cleaner and easier to read and maintain • It helps in achieving DRY
  • 16. Scopes in Variables • As any other language SASS also comes with the scopes. • Global and Local
  • 19. !default • You can assign to variables if they aren’t already assigned by adding the !default flag to the end of the value. This means that if the variable has already been assigned to, it won’t be re-assigned, but if it doesn’t have a value yet, it will be given one.
  • 20. Data types • Numbers • Strings • Colors • Boolean • Null • List • Maps
  • 21.
  • 22. @extend • @extend helps in the inheritance of styling and helps us in the repeating the code.
  • 23. @extend Only (%) • When you don’t want to repeat the css.
  • 24. mixin • Mixin are the most useful and powerful feature of the SASS [Define, Include , arguments] • It helps in making the repeated code declared once and use it n number of times. • You can have the mixin with arguments too, Defaults, Varibales, maps, content, to mixin
  • 25. mixin
  • 26. Pros and Cons of Mixin Pros: o DRY approach o Maintains the quality and consistency of the code o Lot of complexity can be handle through the mixin CONS: o With each include of mixin new css is generated which leads to the lot of duplicity of the code o Could become little hard to maintain
  • 27. & Operator & in SASS refers to the current parent selector
  • 28. #{} Interpolation You can use variables in selectors & property names using #{}
  • 29. @at-root The @at-root directive causes one or more rules to be emitted at the root of the document, rather than being nested beneath their parent selectors
  • 30. Best Practice o Make a single file to create your variables o Make a single file to create your mixin o Make a single file to create Overloading of the libraries and 3rd party plugin o Make a single file to handle the structure of the website/Application o Break the files into modules, pages etc