SlideShare ist ein Scribd-Unternehmen logo
1 von 11
SASS
Syntactically Awesome Style Sheets
SASS
● Sass is a CSS pre-processor with syntax advancements
● Sass has two syntaxes
● The new main syntax (as of Sass 3) is known as “SCSS”
(for “Sassy CSS”)
● The second, older syntax is known as the indented
syntax (or just “Sass”). Inspired by Haml’s terseness,
it’s intended for people who prefer conciseness over
similarity to CSS
● It doesn’t use { } and ; it uses TAB indentation similar
like Python lang.
SASS
WHAT DO WE NEED TO SET UP SASS?
SASS
1. Install Ruby
2. We use ‘gem’ command from our terminal to install it example : “gem
install sass”
3. Next we will use Compass, and install in the same way
Compass is framework preprcessor for SaSS, and it has it’s own watch system,
custom mixin etc.
SASS
SaSS syntax :
- Nesting
body {
#wrapper {
&.foo-class {
}
}
}
- Using variables
$fooColor : #fff;
$bigMargin:10px;
SASS
- Mixins(this is crucial)
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
-o-border-radius: $radius;
border-radius: $radius;
}
.box { @include border-radius(10px); }
SASS
- Partials & import command
_partial.scss
@import _partial.scss
-Extend and inheritance
We will use @extend
SASS
.message {
border: 1px solid #ccc;
padding: 10px;color: #333;
}.success {
@extend .message;
border-color: green;}.error {
@extend .message;
border-color: red;}
SASS
.message, .success, .error, .warning {
border: 1px solid #cccccc;
padding: 10px;
color: #333;}.success {
border-color: green;}.error {
border-color: red;}
SASS
and finally Operators
+,-,/ …
aside[role="complimentary"] {
float: right;
width: 300px / 960px * 100%;
}
SASS
@if directive
@mixin($border-width){
@if $border-width < 10px{ border-
color:red}
@else {border-color:blue}
}

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Introduction to sass
Introduction to sassIntroduction to sass
Introduction to sass
 
Less vs sass
Less vs sassLess vs sass
Less vs sass
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
CSS INHERITANCE
CSS INHERITANCECSS INHERITANCE
CSS INHERITANCE
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 
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...
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
CSS Best practice
CSS Best practiceCSS Best practice
CSS Best practice
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
Css ppt
Css pptCss ppt
Css ppt
 
CSS Grid
CSS GridCSS Grid
CSS Grid
 
Tailwind CSS - KanpurJS
Tailwind CSS - KanpurJSTailwind CSS - KanpurJS
Tailwind CSS - KanpurJS
 
SVG - Scalable Vector Graphics
SVG - Scalable Vector GraphicsSVG - Scalable Vector Graphics
SVG - Scalable Vector Graphics
 
Bootstrap Framework
Bootstrap Framework Bootstrap Framework
Bootstrap Framework
 
Styled Components & React.js
Styled Components & React.jsStyled Components & React.js
Styled Components & React.js
 
Tailwind CSS.11.pptx
Tailwind CSS.11.pptxTailwind CSS.11.pptx
Tailwind CSS.11.pptx
 
Masterclass Webinar - AWS CloudFormation
Masterclass Webinar - AWS CloudFormationMasterclass Webinar - AWS CloudFormation
Masterclass Webinar - AWS CloudFormation
 
Tech talk on Tailwind CSS
Tech talk on Tailwind CSSTech talk on Tailwind CSS
Tech talk on Tailwind CSS
 

Andere mochten auch

Drupal & CSS Preprocessors
Drupal & CSS PreprocessorsDrupal & CSS Preprocessors
Drupal & CSS Preprocessors
kdmarks
 

Andere mochten auch (19)

Sass presentation
Sass presentationSass presentation
Sass presentation
 
Intro to SASS CSS
Intro to SASS CSSIntro to SASS CSS
Intro to SASS CSS
 
Sass and compass workshop
Sass and compass workshopSass and compass workshop
Sass and compass workshop
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
CSS3 Flex Layout
CSS3 Flex LayoutCSS3 Flex Layout
CSS3 Flex Layout
 
Front end basics - Sass
Front end basics - SassFront end basics - Sass
Front end basics - Sass
 
ES2015 and Beyond
ES2015 and BeyondES2015 and Beyond
ES2015 and Beyond
 
[Cordova] Empezando con Ionic
[Cordova] Empezando con Ionic[Cordova] Empezando con Ionic
[Cordova] Empezando con Ionic
 
Estonian Web CMS Market Overview 2015
Estonian Web CMS Market Overview 2015Estonian Web CMS Market Overview 2015
Estonian Web CMS Market Overview 2015
 
Drupal & CSS Preprocessors
Drupal & CSS PreprocessorsDrupal & CSS Preprocessors
Drupal & CSS Preprocessors
 
Responsive Design Workflow (Breaking Development Conference 2012 Orlando)
Responsive Design Workflow (Breaking Development Conference 2012 Orlando)Responsive Design Workflow (Breaking Development Conference 2012 Orlando)
Responsive Design Workflow (Breaking Development Conference 2012 Orlando)
 
From Deception to Clarity
From Deception to ClarityFrom Deception to Clarity
From Deception to Clarity
 
How to choose between Joomla, Drupal and Wordpress - Is there a best choice? ...
How to choose between Joomla, Drupal and Wordpress - Is there a best choice? ...How to choose between Joomla, Drupal and Wordpress - Is there a best choice? ...
How to choose between Joomla, Drupal and Wordpress - Is there a best choice? ...
 
Learn Sass and Compass quick
Learn Sass and Compass quickLearn Sass and Compass quick
Learn Sass and Compass quick
 
WordPress vs Joomla vs Drupal
WordPress vs Joomla vs DrupalWordPress vs Joomla vs Drupal
WordPress vs Joomla vs Drupal
 
LESS vs. SASS - CSS Precompiler Showdown
LESS vs. SASS - CSS Precompiler ShowdownLESS vs. SASS - CSS Precompiler Showdown
LESS vs. SASS - CSS Precompiler Showdown
 
7 steps to get beyond excuses
7 steps to get beyond excuses7 steps to get beyond excuses
7 steps to get beyond excuses
 
Front-end Basics for Developers
Front-end Basics for DevelopersFront-end Basics for Developers
Front-end Basics for Developers
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 

Ähnlich wie Sass presentation

The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
Yatendra Bhardwaj
 
Using scss-at-noisestreet
Using scss-at-noisestreetUsing scss-at-noisestreet
Using scss-at-noisestreet
Wei Pin Teo
 

Ähnlich wie Sass presentation (20)

Yahoo7 Tech Night - SASS
Yahoo7 Tech Night - SASSYahoo7 Tech Night - SASS
Yahoo7 Tech Night - SASS
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
 
Syntactically Awesome Stylesheet - A workshop by Citytech Software
Syntactically Awesome Stylesheet - A workshop by Citytech SoftwareSyntactically Awesome Stylesheet - A workshop by Citytech Software
Syntactically Awesome Stylesheet - A workshop by Citytech Software
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
Sass - basic to advance
Sass  - basic to advanceSass  - basic to advance
Sass - basic to advance
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
SASS Preprocessor
SASS PreprocessorSASS Preprocessor
SASS Preprocessor
 
Sass_Cubet seminar
Sass_Cubet seminarSass_Cubet seminar
Sass_Cubet seminar
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by Shafeeq
 
Sass: Introduction
Sass: IntroductionSass: Introduction
Sass: Introduction
 
Compass n Sass
Compass n SassCompass n Sass
Compass n Sass
 
Getting SASSy with front end development
Getting SASSy with front end developmentGetting SASSy with front end development
Getting SASSy with front end development
 
Pacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASSPacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASS
 
Why are we using Sass to create Grid Frameworks?
Why are we using Sass to create Grid Frameworks?Why are we using Sass to create Grid Frameworks?
Why are we using Sass to create Grid Frameworks?
 
Sass that CSS
Sass that CSSSass that CSS
Sass that CSS
 
Using scss-at-noisestreet
Using scss-at-noisestreetUsing scss-at-noisestreet
Using scss-at-noisestreet
 
Big Frontends Made Simple
Big Frontends Made SimpleBig Frontends Made Simple
Big Frontends Made Simple
 
sass_part2
sass_part2sass_part2
sass_part2
 
Sass tooling!
Sass tooling!Sass tooling!
Sass tooling!
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Sass presentation

  • 2. SASS ● Sass is a CSS pre-processor with syntax advancements ● Sass has two syntaxes ● The new main syntax (as of Sass 3) is known as “SCSS” (for “Sassy CSS”) ● The second, older syntax is known as the indented syntax (or just “Sass”). Inspired by Haml’s terseness, it’s intended for people who prefer conciseness over similarity to CSS ● It doesn’t use { } and ; it uses TAB indentation similar like Python lang.
  • 3. SASS WHAT DO WE NEED TO SET UP SASS?
  • 4. SASS 1. Install Ruby 2. We use ‘gem’ command from our terminal to install it example : “gem install sass” 3. Next we will use Compass, and install in the same way Compass is framework preprcessor for SaSS, and it has it’s own watch system, custom mixin etc.
  • 5. SASS SaSS syntax : - Nesting body { #wrapper { &.foo-class { } } } - Using variables $fooColor : #fff; $bigMargin:10px;
  • 6. SASS - Mixins(this is crucial) @mixin border-radius($radius) { -webkit-border-radius: $radius; -moz-border-radius: $radius; -ms-border-radius: $radius; -o-border-radius: $radius; border-radius: $radius; } .box { @include border-radius(10px); }
  • 7. SASS - Partials & import command _partial.scss @import _partial.scss -Extend and inheritance We will use @extend
  • 8. SASS .message { border: 1px solid #ccc; padding: 10px;color: #333; }.success { @extend .message; border-color: green;}.error { @extend .message; border-color: red;}
  • 9. SASS .message, .success, .error, .warning { border: 1px solid #cccccc; padding: 10px; color: #333;}.success { border-color: green;}.error { border-color: red;}
  • 10. SASS and finally Operators +,-,/ … aside[role="complimentary"] { float: right; width: 300px / 960px * 100%; }
  • 11. SASS @if directive @mixin($border-width){ @if $border-width < 10px{ border- color:red} @else {border-color:blue} }