SlideShare uma empresa Scribd logo
1 de 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}
}

Mais conteúdo relacionado

Mais procurados

Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017
Amazon Web Services Korea
 

Mais procurados (20)

Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Sass - Getting Started with Sass!
Sass - Getting Started with Sass!
 
Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into 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)
 
Intro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyIntro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS Property
 
Airbnb's Journey from Self-Managed Redis to ElastiCache for Redis (DAT319) - ...
Airbnb's Journey from Self-Managed Redis to ElastiCache for Redis (DAT319) - ...Airbnb's Journey from Self-Managed Redis to ElastiCache for Redis (DAT319) - ...
Airbnb's Journey from Self-Managed Redis to ElastiCache for Redis (DAT319) - ...
 
Less presentation
Less presentationLess presentation
Less presentation
 
A Comparison of EDB Postgres to Self-Supported PostgreSQL
A Comparison of EDB Postgres to Self-Supported PostgreSQLA Comparison of EDB Postgres to Self-Supported PostgreSQL
A Comparison of EDB Postgres to Self-Supported PostgreSQL
 
Deploy, Manage, and Scale your Apps with AWS Elastic Beanstalk
Deploy, Manage, and Scale your Apps with AWS Elastic BeanstalkDeploy, Manage, and Scale your Apps with AWS Elastic Beanstalk
Deploy, Manage, and Scale your Apps with AWS Elastic Beanstalk
 
CSS For Backend Developers
CSS For Backend DevelopersCSS For Backend Developers
CSS For Backend Developers
 
Flexbox
FlexboxFlexbox
Flexbox
 
AWS Outposts Update
AWS Outposts UpdateAWS Outposts Update
AWS Outposts Update
 
Bootstrap ppt
Bootstrap pptBootstrap ppt
Bootstrap ppt
 
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017
 
AWS 클라우드 데이터 이전을 위한 6가지 전략 (윤석찬) :: AWS 8월 월간 웨비나
AWS 클라우드 데이터 이전을 위한 6가지 전략 (윤석찬) :: AWS 8월 월간 웨비나 AWS 클라우드 데이터 이전을 위한 6가지 전략 (윤석찬) :: AWS 8월 월간 웨비나
AWS 클라우드 데이터 이전을 위한 6가지 전략 (윤석찬) :: AWS 8월 월간 웨비나
 
Introduction to redis
Introduction to redisIntroduction to redis
Introduction to redis
 
Optimize Your SQL Server Licenses on Amazon Web Services (DAT210) - AWS re:In...
Optimize Your SQL Server Licenses on Amazon Web Services (DAT210) - AWS re:In...Optimize Your SQL Server Licenses on Amazon Web Services (DAT210) - AWS re:In...
Optimize Your SQL Server Licenses on Amazon Web Services (DAT210) - AWS re:In...
 
Building Serverless ETL Pipelines with AWS Glue - AWS Summit Sydney 2018
Building Serverless ETL Pipelines with AWS Glue - AWS Summit Sydney 2018Building Serverless ETL Pipelines with AWS Glue - AWS Summit Sydney 2018
Building Serverless ETL Pipelines with AWS Glue - AWS Summit Sydney 2018
 
Bootstrap 5 basic
Bootstrap 5 basicBootstrap 5 basic
Bootstrap 5 basic
 
Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)
 
Slides - Tailwind CSS.pdf
Slides - Tailwind CSS.pdfSlides - Tailwind CSS.pdf
Slides - Tailwind CSS.pdf
 

Destaque

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

Destaque (20)

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
 
Less vs sass
Less vs sassLess vs sass
Less vs sass
 
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
 

Semelhante a 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
 

Semelhante a 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!
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

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} }