SlideShare una empresa de Scribd logo
1 de 22
Sass's SCSS syntax is a superset of CSS.
SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor which helps to
reduce repetition with CSS and saves time. It is more stable and powerful CSS
extension language that describes style of document cleanly and structurally.
Sass has two syntaxes. The most commonly used syntax is known as “SCSS” (for
“Sassy CSS”), and is a superset of CSS3’s syntax. This means that every valid CSS3
stylesheet is valid SCSS as well. SCSS files use the extension .scss.
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. Instead of brackets and semicolons, it uses the indentation of lines to
specify blocks. Files in the indented syntax use the extension .sass
SASS
 HAML-style indentation
 No brackets or semicolons,
 based on indentation
 Less characters to type
 Enforced
conventions/neatness
SCSS
 Semi-colon and bracket syntax
 Superset of normal CSS
 Normal CSS is also valid
SCSS
 Newer and recommended
Sass allows you to write reusable methods and use logic statements, e., loops, and
conditionals.
Sass user can access Compass library and use some awesome features like dynamic sprite
map generation, legacy browser hacks and cross-browser support for CSS3 features.
Compass also allows you to add an external framework like Blueprint, Foundation or
Bootstrap on top.
In LESS, you can write a basic logic statement using a ‘guarded mixin’, which is equivalent
to Sass if statements.
In LESS, you can loop through numeric values using recursive functions while Sass allows
you to iterate any kind of data In Sass, you can write your own handy functions.
 Scss need a compiler to make scss to normal css.
There are a couple of ways to start using Sass.
1. APPLICATIONS
2. COMMAND LINE
We are using command line to watch live changes of the development of frontend.
Command line approach can be done various ways.
1. npm
2. Chocolatey
3. Homebrew (OsX)
We are using npm (Node Package Manager) to compile the scss to css.
 Gulp is a toolkit for automating development workflow.
 Gulp is a nodejs package and install with npm and npm is a package manager
ships with nodejs. So before installing gulp you need to install following things.
 Install nodejs to your system.
 Install gulp, follow the gulp document.
 Create a project directory.
 Initialize npm to the directory by npm init command.
 Then write npm install gulp
 After that you have to create gulpfile.js to the root of project directory.
Rest of the things will explain in the demo.
 npm install gulp
 npm install gulp-sass gulp-concat gulp-uglify gulp-minify-css gutil gulp-changed gulp-
imagemin
 bower install <packages> (dependencies js and css & update)
 gulp watch (watching task on)
@import "menu.scss";
In SCSS folder file should be save with “ _” under score sign
_menu.scss
SASS
$txt-size: 12px
$txt-color: #333
$link-color: #999
#main
font-size: $txt-size
color: $txt-color
a
color: $link-color
SCSS
$txt-size: 12px;
$txt-color: #333;
$link-color: #999;
#main{
font-size: $txt-size;
color: $txt-color;
a{
color: $link-color;
}
}
• Both syntaxes have the same functionality
• Both of the previous examples compile to:
#main{
font-size: 12px;
color: #333333;
}
#main a{
color: #999999;
}
• Already demonstrated basic variable usage and nesting
• Note: Some examples compile using different formatting, I changed them for the slides for readability
 $width767: 767px;
 $width600: 600px;
 $width500: 500px;
 $width1200: 1200px;
 $width991: 991px;
 $red: #ff0000;
 $whiteTransparent: rgba(255,255,255,0.5) ;
profile-pic {
float: left;
width: 250px;
@media screen and (max-width: 767px) {
width: 100px;
float: none;
}
$break-small: 320px;
$break-large: 1200px;
profile-pic {
float: left;
width: 250px;
@media screen and (max-width: $break-small) {
width: 100px;
float: none;
}
@media screen and (min-width: $break-large) {
float: right;
}
}
.application-navigation {
& a:last-child{
button{
background: #00a4e2;
}
}
}
 You can reference the parent selector with &
SCSS
#content{
font-size: 12px;
&, a{
color: #333;
}
}
Result in CSS
#content{
font-size: 12px;
}
#content, #content a{
color: #333;
}
.error{
color: red;
}
.seriousError{
@extend .error;
font-weight: bold;
}
You can also extend other CSS declarations with extend
Resulting CSS
.error, .seriousError{
color: red;
}
.seriousError{
font-weight: bold;
}
Mixins are sets of reusable styles, almost like methods in other languages
@mixin awesome-text{
font-size: 24px;
font-weight: bold;
color: blue;
}
p{
@include awesome-text;
}
Resulting CSS
p{
font-size: 24px;
font-weight: bold;
color: blue;
}
Mixins can also take parameters
SCSS
@mixin awesome-text($size){
font-size: $size;
font-weight: bold;
color: blue;
}
p{
@include awesome-text(24px);
}
li{
@include awesome-text(18px);
}
Resulting CSS
p{
font-size: 24px;
font-weight: bold;
color: blue;
}
li{
font-size: 18px;
font-weight: bold;
color: blue;
}
PRESENTED BY
Ashutosh Bhardwaj
Kaushik Das
www.citytechcorp.com

Más contenido relacionado

Similar a Sass's SCSS syntax is a superset of CSS

SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS ImplementationAmey Parab
 
LESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionLESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionrushi7567
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentationJoeSeckelman
 
Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sassKnoldus Inc.
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajYatendra Bhardwaj
 
Scss talk CSS Meetup
Scss talk CSS Meetup Scss talk CSS Meetup
Scss talk CSS Meetup Caleb Yang
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockMarco Pinheiro
 
Post css - Getting start with PostCSS
Post css - Getting start with PostCSSPost css - Getting start with PostCSS
Post css - Getting start with PostCSSNeha Sharma
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqDignitasDigital1
 
Using scss-at-noisestreet
Using scss-at-noisestreetUsing scss-at-noisestreet
Using scss-at-noisestreetWei Pin Teo
 
Beautifying Sencha Touch
Beautifying Sencha TouchBeautifying Sencha Touch
Beautifying Sencha TouchNeha Upadhyay
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionIrfan Maulana
 
CSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & CompassCSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & CompassLucien Lee
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersSuzette Franck
 

Similar a Sass's SCSS syntax is a superset of CSS (20)

SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
LESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionLESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introduction
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
 
Sass: Introduction
Sass: IntroductionSass: Introduction
Sass: Introduction
 
Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sass
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
 
Scss talk CSS Meetup
Scss talk CSS Meetup Scss talk CSS Meetup
Scss talk CSS Meetup
 
SASS Preprocessor
SASS PreprocessorSASS Preprocessor
SASS Preprocessor
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
Post css - Getting start with PostCSS
Post css - Getting start with PostCSSPost css - Getting start with PostCSS
Post css - Getting start with PostCSS
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by Shafeeq
 
Using scss-at-noisestreet
Using scss-at-noisestreetUsing scss-at-noisestreet
Using scss-at-noisestreet
 
Beautifying Sencha Touch
Beautifying Sencha TouchBeautifying Sencha Touch
Beautifying Sencha Touch
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
 
Beautifying senc
Beautifying sencBeautifying senc
Beautifying senc
 
sass_part2
sass_part2sass_part2
sass_part2
 
CSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & CompassCSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & Compass
 
Sass presentation
Sass presentationSass presentation
Sass presentation
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress Developers
 

Último

Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Onlineanilsa9823
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Último (20)

Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 

Sass's SCSS syntax is a superset of CSS

  • 1. Sass's SCSS syntax is a superset of CSS.
  • 2. SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor which helps to reduce repetition with CSS and saves time. It is more stable and powerful CSS extension language that describes style of document cleanly and structurally.
  • 3. Sass has two syntaxes. The most commonly used syntax is known as “SCSS” (for “Sassy CSS”), and is a superset of CSS3’s syntax. This means that every valid CSS3 stylesheet is valid SCSS as well. SCSS files use the extension .scss. 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. Instead of brackets and semicolons, it uses the indentation of lines to specify blocks. Files in the indented syntax use the extension .sass
  • 4. SASS  HAML-style indentation  No brackets or semicolons,  based on indentation  Less characters to type  Enforced conventions/neatness SCSS  Semi-colon and bracket syntax  Superset of normal CSS  Normal CSS is also valid SCSS  Newer and recommended
  • 5. Sass allows you to write reusable methods and use logic statements, e., loops, and conditionals. Sass user can access Compass library and use some awesome features like dynamic sprite map generation, legacy browser hacks and cross-browser support for CSS3 features. Compass also allows you to add an external framework like Blueprint, Foundation or Bootstrap on top. In LESS, you can write a basic logic statement using a ‘guarded mixin’, which is equivalent to Sass if statements. In LESS, you can loop through numeric values using recursive functions while Sass allows you to iterate any kind of data In Sass, you can write your own handy functions.
  • 6.  Scss need a compiler to make scss to normal css. There are a couple of ways to start using Sass. 1. APPLICATIONS 2. COMMAND LINE We are using command line to watch live changes of the development of frontend. Command line approach can be done various ways. 1. npm 2. Chocolatey 3. Homebrew (OsX) We are using npm (Node Package Manager) to compile the scss to css.
  • 7.  Gulp is a toolkit for automating development workflow.
  • 8.  Gulp is a nodejs package and install with npm and npm is a package manager ships with nodejs. So before installing gulp you need to install following things.  Install nodejs to your system.  Install gulp, follow the gulp document.
  • 9.  Create a project directory.  Initialize npm to the directory by npm init command.  Then write npm install gulp  After that you have to create gulpfile.js to the root of project directory. Rest of the things will explain in the demo.
  • 10.  npm install gulp  npm install gulp-sass gulp-concat gulp-uglify gulp-minify-css gutil gulp-changed gulp- imagemin  bower install <packages> (dependencies js and css & update)  gulp watch (watching task on)
  • 11. @import "menu.scss"; In SCSS folder file should be save with “ _” under score sign _menu.scss
  • 12. SASS $txt-size: 12px $txt-color: #333 $link-color: #999 #main font-size: $txt-size color: $txt-color a color: $link-color SCSS $txt-size: 12px; $txt-color: #333; $link-color: #999; #main{ font-size: $txt-size; color: $txt-color; a{ color: $link-color; } }
  • 13. • Both syntaxes have the same functionality • Both of the previous examples compile to: #main{ font-size: 12px; color: #333333; } #main a{ color: #999999; } • Already demonstrated basic variable usage and nesting • Note: Some examples compile using different formatting, I changed them for the slides for readability
  • 14.  $width767: 767px;  $width600: 600px;  $width500: 500px;  $width1200: 1200px;  $width991: 991px;  $red: #ff0000;  $whiteTransparent: rgba(255,255,255,0.5) ;
  • 15. profile-pic { float: left; width: 250px; @media screen and (max-width: 767px) { width: 100px; float: none; }
  • 16. $break-small: 320px; $break-large: 1200px; profile-pic { float: left; width: 250px; @media screen and (max-width: $break-small) { width: 100px; float: none; } @media screen and (min-width: $break-large) { float: right; } }
  • 18.  You can reference the parent selector with & SCSS #content{ font-size: 12px; &, a{ color: #333; } } Result in CSS #content{ font-size: 12px; } #content, #content a{ color: #333; }
  • 19. .error{ color: red; } .seriousError{ @extend .error; font-weight: bold; } You can also extend other CSS declarations with extend Resulting CSS .error, .seriousError{ color: red; } .seriousError{ font-weight: bold; }
  • 20. Mixins are sets of reusable styles, almost like methods in other languages @mixin awesome-text{ font-size: 24px; font-weight: bold; color: blue; } p{ @include awesome-text; } Resulting CSS p{ font-size: 24px; font-weight: bold; color: blue; }
  • 21. Mixins can also take parameters SCSS @mixin awesome-text($size){ font-size: $size; font-weight: bold; color: blue; } p{ @include awesome-text(24px); } li{ @include awesome-text(18px); } Resulting CSS p{ font-size: 24px; font-weight: bold; color: blue; } li{ font-size: 18px; font-weight: bold; color: blue; }
  • 22. PRESENTED BY Ashutosh Bhardwaj Kaushik Das www.citytechcorp.com