SlideShare una empresa de Scribd logo
1 de 25
Nikhil Kumar | Software Consultant
KnÓldus Software LLP
Nikhil Kumar | Software Consultant
KnÓldus Software LLP
●
Sass
●
Sass Syntaxes: code example
●
Benefits of using Sass
●
Sass Vs Css : code example
●
Variables
●
Nested Syntax
●
Mixins [ @include ]
●
Inheritance : @extends
●
Functions
●
Looping
●
Joining Files
●
_Partials
●
Interactive Shell Interaction
●
Output styles: 4
Sass (syntactically awesome style-sheets) is a style sheet language initially
designed by Hampton Catlin and developed by Natalie.
Sass (syntactically awesome style-sheets) is a style sheet language initially
designed by Hampton Catlin and developed by Natalie.
Sass
Sass is a scripting language that is interpreted into Cascading Style Sheets
(CSS). Sass-script is the scripting language itself.
Sass-Script
Sass is a scripting language that is interpreted into Cascading Style Sheets
(CSS). Sass-script is the scripting language itself.
Sass-Script
Some Theory
The official implementation of Sass is open-source and coded in Ruby;
however, other implementations exist, including PHP, and a high-performance
implementation in C called libSass. There's also a Java implementation called
Jsass, there are much more. here
Some Theory
The official implementation of Sass is open-source and coded in Ruby;
however, other implementations exist, including PHP, and a high-performance
implementation in C called libSass. There's also a Java implementation called
Jsass, there are much more. here
Syntax- typesSyntax- types
Sass consists of two syntaxes
The original syntax, called "the indented syntax", uses a syntax similar to Haml & Jade etc,
another one is like traditional .css syntax.
Type
s
.sass .scss
A valid CSS is valid SCSS with the same semantics.
Scss vs SassScss vs Sass
• HAML-style indentation
• No brackets or semi-
colons, based on
indentation
• Less characters to type
• Enforced
conventions/neatness
• Semi-colon and bracket
syntax
• Superset of normal CSS
• Normal CSS is also valid
SCSS
• Newer and recommended
SCSS SASS
Damn!! Is it really magical ??
Syntax Example
Sass Scss
$txt-size: 10px
$txt-color: blue
$link-color: red
#main
font-size: $txt-size
color: $txt-color
a
color: $link-color
$txt-size: 10px;
$txt-color: blue;
$link-color: red;
#main{
font-size: $txt-size;
color: $txt-color;
a{
color: $link-color;
}
}
Reasons to go with sass: Benefits & Features
●
Ability to define variables
●
Nested syntax
●
Ability to define mixins
●
Mathematical functions
●
Looping Css: @for, @each and @while,
●
Operational functions (such as “lighten” and “darken”)
●
Joining of multiple files
SassScript provides the following mechanisms: variables, nesting, mixins, and selector
inheritance.
Variables- $
Types of Variables in Sass
●
Numbers
●
String
●
Boolean
●
Color
●
lists of values, separated by spaces or commas (e.g. 1.5em 1em 0 2em,
Helvetica, Arial, sans-serif)
●
maps from one value to another (e.g. (key1: value1, key2: value2))
Variable names can use hyphens and underscores interchangeably.
$main-width, you can access it as $main_width, and vice versa.
Variables
$primary-color: #3bbfce;
$margin: 16px;
.content-navigation {
border-color: $primary-color;
color: darken($primary-color, 10%);
}
.border {
padding: $margin / 2;
margin: $margin / 2;
border-color: $primary-color;
}
Scss Compiled Css
.content-navigation {
border-color: #3bbfce;
color: #2b9eab;
}
.border {
padding: 8px;
margin: 8px;
border-color: #3bbfce;
}
Global Variable: $width: 5em !global;
Nested Syntax
table.hl {
margin: 2em 0;
td.ln {
text-align: right;
}
}
li {
font: {
family: serif;
weight: bold;
size: 1.3em;
}
}
Scss Compiled Css
table.hl {
margin: 2em 0;
}
table.hl td.ln {
text-align: right;
}
li {
font-family: serif;
font-weight: bold;
font-size: 1.3em;
}
Nested Syntax: Referencing Parent Selectors: &
#main {
color: black;
a {
font-weight: bold;
&:hover { color: red; }
}
}
Scss Compiled Css
#main {
color: black;
}
#main a {
font-weight: bold;
}
#main a:hover {
color: red;
}
You might want to have special styles for when that selector is hovered over or for when the
body element has a certain class. In these cases, you can explicitly specify where the parent
selector should be inserted using the & character.
Nested Syntax: Properties
.funky {
font: {
family: fantasy;
size: 30em;
weight: bold;
}
}
Scss Compiled Css
.funky {
font-family: fantasy;
font-size: 30em;
font-weight: bold;
}
In Css: If you want to set a bunch of properties in the same name-space, you have to type it
out each time.
Mixins: @mixin, @include
@mixin large-text {
font: {
family: Arial;
size: 20px;
weight: bold;
}
color: #ff0000;
}
Create mixin
.page-title {
@include large-text;
padding: 4px;
margin-top: 10px;
}
Mixins allow you to define styles that can be re-used throughout the style-sheet.
They can even take arguments which allows you to produce a wide variety of
styles with very few mixins.
Using created mixin
.page-title {
font-family: Arial;
font-size: 20px;
font-weight: bold;
color: #ff0000;
padding: 4px;
margin-top: 10px; }
Compiled to
Mixins: Arguments
@mixin sexy-border($color, $width)
{
border: {
color: $color;
width: $width;
style: dashed;
}
}
p {
border-color: blue;
border-width: 1in;
border-style: dashed; }
Mixins can take SassScript values as arguments, When defining a mixin, the arguments are
written as variable names separated by commas, all in parentheses after the name.
Create p { @include sexy-border(blue, 1in); }Usage
Compiled to
Default values for their arguments @mixin sexy-border($color, $width: 1px) {
Mixins: Variable Arguments
@mixin box-shadow($shadows...)
{
-moz-box-shadow: $shadows;
-webkit-box-shadow: $shadows;
box-shadow: $shadows;
}
.shadows {
-moz-box-shadow: 0px 4px 5px #666, 2px 6px 10px #999;
-webkit-box-shadow: 0px 4px 5px #666, 2px 6px 10px
#999;
box-shadow: 0px 4px 5px #666, 2px 6px 10px #999;
}
Sometimes it makes sense for a mixin or function to take an unknown number of arguments.
For example: box-shadow
Create
.shadows {
@include box-shadow(0px 4px 5px #666,
2px 6px 10px #999);
}
Usage
Compiled to
Looping Css: @while
$i: 6;
@while $i > 0 {
.item-#{$i} { width: 2em * $i; }
$i: $i - 2;
}
Sass allows for iterating over variables using @for, @each and @while, which can be used
to apply different styles to elements with similar classes or ids.
Create
.item-6 {
width: 12em; }
.item-4 {
width: 8em; }
.item-2 {
width: 4em; }
Compiled to
Looping Css: @each
@each $animal in puma, sea-slug, egret, salamander {
.#{$animal}-icon {
background-image: url('/images/#{$animal}.png');
}
}
The @each directive usually has the form @each $var in <list or map>. $var can be any
variable name, like $length or $name, and <list or map> is a SassScript expression that
returns a list or a map.
Create
Compiled To
.puma-icon {
background-image: url('/images/puma.png'); }
.sea-slug-icon {
background-image: url('/images/sea-slug.png'); }
.egret-icon {
background-image: url('/images/egret.png'); }
.salamander-icon {
background-image: url('/images/salamander.png'); }
Looping Css: @if - @else
$type: monster;
p {
@if $type == ocean {
color: blue;
} @else if $type == matador {
color: red;
} @else if $type == monster {
color: green;
} @else {
color: black;
}
}
The @if directive takes a SassScript expression and uses the styles nested beneath it if the
expression returns anything other than false or null:
Create
Compiled To
p {
color: green; }
Looping Css: @for
@for $i from 1 through 3 {
.item-#{$i} { width: 2em *
$i; }
}
The @for directive repeatedly outputs a set of styles. For each repetition, a counter variable is
used to adjust the output. The directive has two forms: @for $var from <start> through <end>
and @for $var from <start> to <end>.
Create
Compiled To
.item-1 {
width: 2em;
}
.item-2 {
width: 4em;
}
.item-3 {
width: 6em;
}
_Partials
For example, you might have _colors.scss. Then no _colors.css file would be
created, and you can do
@import "colors";
If you have a SCSS or Sass file that you want to import but don’t want to compile to a CSS file,
you can add an underscore to the beginning of the filename. This will tell Sass not to compile
it to a normal CSS file. You can then import these files without using the underscore.
_Partials
For example, you might have _colors.scss. Then no _colors.css file would be
created, and you can do
@import "colors";
//other css goes here
If you have a SCSS or Sass file that you want to import but don’t want to compile to a CSS file,
you can add an underscore to the beginning of the filename. This will tell Sass not to compile
it to a normal CSS file. You can then import these files without using the underscore.
Output Style
Although the default CSS style that Sass outputs is very nice and reflects the structure of the
document, tastes and needs vary and so Sass supports several other styles.
● Nested
● Expanded
● Compact
● Compressed
Nested
#main {
color: #fff;
background-color: #000; }
#main p {
width: 10em; }
Expanded
#main {
color: #fff;
background-color: #000;
}
#main p {
width: 10em;
}
Nested
#main {
color: #fff;
background-color: #000; }
#main p {
width: 10em; }
Compact
#main { color: #fff; background-color: #000; }
#main p { width: 10em; }
#main{color:#fff;background-color:#000}#main p{width:10em}Compressed
References
Sass-lang : Official Site
Sass-lang : Github
Presenter
nikhil@knoldus.com
Presenter
nikhil@knoldus.com
Organizer
@Knolspeak
http://www.knoldus.com
http://blog.knoldus.com
Organizer
@Knolspeak
http://www.knoldus.com
http://blog.knoldus.com
Thanks

Más contenido relacionado

La actualidad más candente

Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpcasestudyhelp
 
Media queries A to Z
Media queries A to ZMedia queries A to Z
Media queries A to ZShameem Reza
 
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)Folio3 Software
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout Rachel Andrew
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designersSingsys Pte Ltd
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)Harshita Yadav
 
CSS Dasar #3 : Penempatan CSS
CSS Dasar #3 : Penempatan CSSCSS Dasar #3 : Penempatan CSS
CSS Dasar #3 : Penempatan CSSSandhika Galih
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheetMichael Jhon
 
CSS3 2D/3D transform
CSS3 2D/3D transformCSS3 2D/3D transform
CSS3 2D/3D transformKenny Lee
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation joilrahat
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media QueriesRuss Weakley
 

La actualidad más candente (20)

Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
Media queries A to Z
Media queries A to ZMedia queries A to Z
Media queries A to Z
 
Css ppt
Css pptCss ppt
Css ppt
 
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)
 
Less vs sass
Less vs sassLess vs sass
Less vs sass
 
CSS.ppt
CSS.pptCSS.ppt
CSS.ppt
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Css
CssCss
Css
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
Less presentation
Less presentationLess presentation
Less presentation
 
CSS Dasar #3 : Penempatan CSS
CSS Dasar #3 : Penempatan CSSCSS Dasar #3 : Penempatan CSS
CSS Dasar #3 : Penempatan CSS
 
Html & CSS
Html & CSSHtml & CSS
Html & CSS
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
CSS3 2D/3D transform
CSS3 2D/3D transformCSS3 2D/3D transform
CSS3 2D/3D transform
 
Lab#9 graphic and color
Lab#9 graphic and colorLab#9 graphic and color
Lab#9 graphic and color
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
 
Introducing CSS Grid
Introducing CSS GridIntroducing CSS Grid
Introducing CSS Grid
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 

Destacado

Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDDKnoldus Inc.
 
Functional programming in Javascript
Functional programming in JavascriptFunctional programming in Javascript
Functional programming in JavascriptKnoldus Inc.
 
Akka Finite State Machine
Akka Finite State MachineAkka Finite State Machine
Akka Finite State MachineKnoldus Inc.
 
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 conventionsKnoldus Inc.
 
Unit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJSUnit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJSKnoldus Inc.
 
Cassandra - Tips And Techniques
Cassandra - Tips And TechniquesCassandra - Tips And Techniques
Cassandra - Tips And TechniquesKnoldus Inc.
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introductionNir Kaufman
 
Introduction to AWS IAM
Introduction to AWS IAMIntroduction to AWS IAM
Introduction to AWS IAMKnoldus Inc.
 
Mandrill Templates
Mandrill TemplatesMandrill Templates
Mandrill TemplatesKnoldus Inc.
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application developmentKnoldus Inc.
 
Fast dataarchitecture
Fast dataarchitectureFast dataarchitecture
Fast dataarchitectureKnoldus Inc.
 
Introduction to Knockout Js
Introduction to Knockout JsIntroduction to Knockout Js
Introduction to Knockout JsKnoldus Inc.
 
Lambda Architecture with Spark
Lambda Architecture with SparkLambda Architecture with Spark
Lambda Architecture with SparkKnoldus Inc.
 
Introduction to Apache Cassandra
Introduction to Apache Cassandra Introduction to Apache Cassandra
Introduction to Apache Cassandra Knoldus Inc.
 
Introduction to Quasiquotes
Introduction to QuasiquotesIntroduction to Quasiquotes
Introduction to QuasiquotesKnoldus Inc.
 
Getting started with typescript and angular 2
Getting started with typescript  and angular 2Getting started with typescript  and angular 2
Getting started with typescript and angular 2Knoldus Inc.
 
Unit testing of spark applications
Unit testing of spark applicationsUnit testing of spark applications
Unit testing of spark applicationsKnoldus Inc.
 
Introduction to Structured Streaming
Introduction to Structured StreamingIntroduction to Structured Streaming
Introduction to Structured StreamingKnoldus Inc.
 
Petex 2016 Future Working Zone
Petex 2016 Future Working ZonePetex 2016 Future Working Zone
Petex 2016 Future Working ZoneAndrew Zolnai
 

Destacado (20)

Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDD
 
Functional programming in Javascript
Functional programming in JavascriptFunctional programming in Javascript
Functional programming in Javascript
 
Akka Finite State Machine
Akka Finite State MachineAkka Finite State Machine
Akka Finite State Machine
 
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
 
Unit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJSUnit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJS
 
Cassandra - Tips And Techniques
Cassandra - Tips And TechniquesCassandra - Tips And Techniques
Cassandra - Tips And Techniques
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introduction
 
Introduction to AWS IAM
Introduction to AWS IAMIntroduction to AWS IAM
Introduction to AWS IAM
 
Mandrill Templates
Mandrill TemplatesMandrill Templates
Mandrill Templates
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 
Fast dataarchitecture
Fast dataarchitectureFast dataarchitecture
Fast dataarchitecture
 
Introduction to Knockout Js
Introduction to Knockout JsIntroduction to Knockout Js
Introduction to Knockout Js
 
Lambda Architecture with Spark
Lambda Architecture with SparkLambda Architecture with Spark
Lambda Architecture with Spark
 
Introduction to Apache Cassandra
Introduction to Apache Cassandra Introduction to Apache Cassandra
Introduction to Apache Cassandra
 
Introduction to Quasiquotes
Introduction to QuasiquotesIntroduction to Quasiquotes
Introduction to Quasiquotes
 
Getting started with typescript and angular 2
Getting started with typescript  and angular 2Getting started with typescript  and angular 2
Getting started with typescript and angular 2
 
Unit testing of spark applications
Unit testing of spark applicationsUnit testing of spark applications
Unit testing of spark applications
 
Introduction to Structured Streaming
Introduction to Structured StreamingIntroduction to Structured Streaming
Introduction to Structured Streaming
 
Petex 2016 Future Working Zone
Petex 2016 Future Working ZonePetex 2016 Future Working Zone
Petex 2016 Future Working Zone
 
How the web was won
How the web was wonHow the web was won
How the web was won
 

Similar a Deep dive into sass

Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction SassZeeshan Ahmed
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentationJoeSeckelman
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS ImplementationAmey Parab
 
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 SoftwareRitwik Das
 
Sass that CSS
Sass that CSSSass that CSS
Sass that CSSTrish Ang
 
Sass and Compass - Getting Started
Sass and Compass - Getting StartedSass and Compass - Getting Started
Sass and Compass - Getting Startededgincvg
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockMarco Pinheiro
 
Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationDaniel Yuschick
 
CSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & CompassCSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & CompassLucien Lee
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compassNick Cooley
 
Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01Anam Hossain
 
CSS preprocessor: why and how
CSS preprocessor: why and howCSS preprocessor: why and how
CSS preprocessor: why and howmirahman
 
Pacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASSPacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASSSteve Krueger
 

Similar a Deep dive into sass (20)

Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction Sass
 
Sass_Cubet seminar
Sass_Cubet seminarSass_Cubet seminar
Sass_Cubet seminar
 
Advanced sass
Advanced sassAdvanced sass
Advanced sass
 
Intro to SASS CSS
Intro to SASS CSSIntro to SASS CSS
Intro to SASS CSS
 
CSS3
CSS3CSS3
CSS3
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
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
 
Sass that CSS
Sass that CSSSass that CSS
Sass that CSS
 
Sass and Compass - Getting Started
Sass and Compass - Getting StartedSass and Compass - Getting Started
Sass and Compass - Getting Started
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass Presentation
 
CSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & CompassCSS 開發加速指南-Sass & Compass
CSS 開發加速指南-Sass & Compass
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
sass_part2
sass_part2sass_part2
sass_part2
 
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
 
Pacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASSPacific Northwest Drupal Summit: Basic & SASS
Pacific Northwest Drupal Summit: Basic & SASS
 
CSS
CSSCSS
CSS
 

Más de Knoldus Inc.

Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxKnoldus Inc.
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingKnoldus Inc.
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionKnoldus Inc.
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxKnoldus Inc.
 
Introduction to Redis and its features.pptx
Introduction to Redis and its features.pptxIntroduction to Redis and its features.pptx
Introduction to Redis and its features.pptxKnoldus Inc.
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfKnoldus Inc.
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxKnoldus Inc.
 
Data Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingData Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingKnoldus Inc.
 
K8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesK8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesKnoldus Inc.
 
Introduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxIntroduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxKnoldus Inc.
 
Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxKnoldus Inc.
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxKnoldus Inc.
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxKnoldus Inc.
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxKnoldus Inc.
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationKnoldus Inc.
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationKnoldus Inc.
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIsKnoldus Inc.
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II PresentationKnoldus Inc.
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAKnoldus Inc.
 

Más de Knoldus Inc. (20)

Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 
Introduction to Redis and its features.pptx
Introduction to Redis and its features.pptxIntroduction to Redis and its features.pptx
Introduction to Redis and its features.pptx
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdf
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptx
 
Data Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingData Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable Testing
 
K8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesK8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose Kubernetes
 
Introduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxIntroduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptx
 
Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics Presentation
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II Presentation
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRA
 

Último

Hire 💕 8617697112 Meerut Call Girls Service Call Girls Agency
Hire 💕 8617697112 Meerut Call Girls Service Call Girls AgencyHire 💕 8617697112 Meerut Call Girls Service Call Girls Agency
Hire 💕 8617697112 Meerut Call Girls Service Call Girls AgencyNitya salvi
 
Hingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRL
Hingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRLHingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRL
Hingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRLNitya salvi
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...Pooja Nehwal
 
Vip Mumbai Call Girls Borivali Call On 9920725232 With Body to body massage w...
Vip Mumbai Call Girls Borivali Call On 9920725232 With Body to body massage w...Vip Mumbai Call Girls Borivali Call On 9920725232 With Body to body massage w...
Vip Mumbai Call Girls Borivali Call On 9920725232 With Body to body massage w...amitlee9823
 
Call Girls Jalgaon Just Call 8617370543Top Class Call Girl Service Available
Call Girls Jalgaon Just Call 8617370543Top Class Call Girl Service AvailableCall Girls Jalgaon Just Call 8617370543Top Class Call Girl Service Available
Call Girls Jalgaon Just Call 8617370543Top Class Call Girl Service AvailableNitya salvi
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...SUHANI PANDEY
 
The hottest UI and UX Design Trends 2024
The hottest UI and UX Design Trends 2024The hottest UI and UX Design Trends 2024
The hottest UI and UX Design Trends 2024Ilham Brata
 
❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.
❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.
❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.Nitya salvi
 
Lecture 01 Introduction To Multimedia.pptx
Lecture 01 Introduction To Multimedia.pptxLecture 01 Introduction To Multimedia.pptx
Lecture 01 Introduction To Multimedia.pptxShoaibRajper1
 
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...sonalitrivedi431
 
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Just Call Vip call girls diu Escorts ☎️9352988975 Two shot with one girl (diu )
Just Call Vip call girls diu Escorts ☎️9352988975 Two shot with one girl (diu )Just Call Vip call girls diu Escorts ☎️9352988975 Two shot with one girl (diu )
Just Call Vip call girls diu Escorts ☎️9352988975 Two shot with one girl (diu )gajnagarg
 
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Availabledollysharma2066
 
➥🔝 7737669865 🔝▻ Kolkata Call-girls in Women Seeking Men 🔝Kolkata🔝 Escorts...
➥🔝 7737669865 🔝▻ Kolkata Call-girls in Women Seeking Men  🔝Kolkata🔝   Escorts...➥🔝 7737669865 🔝▻ Kolkata Call-girls in Women Seeking Men  🔝Kolkata🔝   Escorts...
➥🔝 7737669865 🔝▻ Kolkata Call-girls in Women Seeking Men 🔝Kolkata🔝 Escorts...amitlee9823
 
Gamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad IbrahimGamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad Ibrahimamgadibrahim92
 
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men 🔝dharamshala🔝 ...
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men  🔝dharamshala🔝  ...➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men  🔝dharamshala🔝  ...
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men 🔝dharamshala🔝 ...amitlee9823
 
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best ServiceHigh Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...amitlee9823
 

Último (20)

Hire 💕 8617697112 Meerut Call Girls Service Call Girls Agency
Hire 💕 8617697112 Meerut Call Girls Service Call Girls AgencyHire 💕 8617697112 Meerut Call Girls Service Call Girls Agency
Hire 💕 8617697112 Meerut Call Girls Service Call Girls Agency
 
Hingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRL
Hingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRLHingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRL
Hingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRL
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
 
Vip Mumbai Call Girls Borivali Call On 9920725232 With Body to body massage w...
Vip Mumbai Call Girls Borivali Call On 9920725232 With Body to body massage w...Vip Mumbai Call Girls Borivali Call On 9920725232 With Body to body massage w...
Vip Mumbai Call Girls Borivali Call On 9920725232 With Body to body massage w...
 
Call Girls Jalgaon Just Call 8617370543Top Class Call Girl Service Available
Call Girls Jalgaon Just Call 8617370543Top Class Call Girl Service AvailableCall Girls Jalgaon Just Call 8617370543Top Class Call Girl Service Available
Call Girls Jalgaon Just Call 8617370543Top Class Call Girl Service Available
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
 
The hottest UI and UX Design Trends 2024
The hottest UI and UX Design Trends 2024The hottest UI and UX Design Trends 2024
The hottest UI and UX Design Trends 2024
 
❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.
❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.
❤Personal Whatsapp Number 8617697112 Samba Call Girls 💦✅.
 
Lecture 01 Introduction To Multimedia.pptx
Lecture 01 Introduction To Multimedia.pptxLecture 01 Introduction To Multimedia.pptx
Lecture 01 Introduction To Multimedia.pptx
 
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
 
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman MuscatAbortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
 
Just Call Vip call girls diu Escorts ☎️9352988975 Two shot with one girl (diu )
Just Call Vip call girls diu Escorts ☎️9352988975 Two shot with one girl (diu )Just Call Vip call girls diu Escorts ☎️9352988975 Two shot with one girl (diu )
Just Call Vip call girls diu Escorts ☎️9352988975 Two shot with one girl (diu )
 
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
 
➥🔝 7737669865 🔝▻ Kolkata Call-girls in Women Seeking Men 🔝Kolkata🔝 Escorts...
➥🔝 7737669865 🔝▻ Kolkata Call-girls in Women Seeking Men  🔝Kolkata🔝   Escorts...➥🔝 7737669865 🔝▻ Kolkata Call-girls in Women Seeking Men  🔝Kolkata🔝   Escorts...
➥🔝 7737669865 🔝▻ Kolkata Call-girls in Women Seeking Men 🔝Kolkata🔝 Escorts...
 
Gamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad IbrahimGamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad Ibrahim
 
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men 🔝dharamshala🔝 ...
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men  🔝dharamshala🔝  ...➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men  🔝dharamshala🔝  ...
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men 🔝dharamshala🔝 ...
 
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best ServiceHigh Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
 
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
 

Deep dive into sass

  • 1. Nikhil Kumar | Software Consultant KnÓldus Software LLP Nikhil Kumar | Software Consultant KnÓldus Software LLP
  • 2. ● Sass ● Sass Syntaxes: code example ● Benefits of using Sass ● Sass Vs Css : code example ● Variables ● Nested Syntax ● Mixins [ @include ] ● Inheritance : @extends ● Functions ● Looping ● Joining Files ● _Partials ● Interactive Shell Interaction ● Output styles: 4
  • 3. Sass (syntactically awesome style-sheets) is a style sheet language initially designed by Hampton Catlin and developed by Natalie. Sass (syntactically awesome style-sheets) is a style sheet language initially designed by Hampton Catlin and developed by Natalie. Sass Sass is a scripting language that is interpreted into Cascading Style Sheets (CSS). Sass-script is the scripting language itself. Sass-Script Sass is a scripting language that is interpreted into Cascading Style Sheets (CSS). Sass-script is the scripting language itself. Sass-Script Some Theory The official implementation of Sass is open-source and coded in Ruby; however, other implementations exist, including PHP, and a high-performance implementation in C called libSass. There's also a Java implementation called Jsass, there are much more. here Some Theory The official implementation of Sass is open-source and coded in Ruby; however, other implementations exist, including PHP, and a high-performance implementation in C called libSass. There's also a Java implementation called Jsass, there are much more. here
  • 4. Syntax- typesSyntax- types Sass consists of two syntaxes The original syntax, called "the indented syntax", uses a syntax similar to Haml & Jade etc, another one is like traditional .css syntax. Type s .sass .scss A valid CSS is valid SCSS with the same semantics.
  • 5. Scss vs SassScss vs Sass • HAML-style indentation • No brackets or semi- colons, based on indentation • Less characters to type • Enforced conventions/neatness • Semi-colon and bracket syntax • Superset of normal CSS • Normal CSS is also valid SCSS • Newer and recommended SCSS SASS
  • 7. Syntax Example Sass Scss $txt-size: 10px $txt-color: blue $link-color: red #main font-size: $txt-size color: $txt-color a color: $link-color $txt-size: 10px; $txt-color: blue; $link-color: red; #main{ font-size: $txt-size; color: $txt-color; a{ color: $link-color; } }
  • 8. Reasons to go with sass: Benefits & Features ● Ability to define variables ● Nested syntax ● Ability to define mixins ● Mathematical functions ● Looping Css: @for, @each and @while, ● Operational functions (such as “lighten” and “darken”) ● Joining of multiple files SassScript provides the following mechanisms: variables, nesting, mixins, and selector inheritance.
  • 9. Variables- $ Types of Variables in Sass ● Numbers ● String ● Boolean ● Color ● lists of values, separated by spaces or commas (e.g. 1.5em 1em 0 2em, Helvetica, Arial, sans-serif) ● maps from one value to another (e.g. (key1: value1, key2: value2)) Variable names can use hyphens and underscores interchangeably. $main-width, you can access it as $main_width, and vice versa.
  • 10. Variables $primary-color: #3bbfce; $margin: 16px; .content-navigation { border-color: $primary-color; color: darken($primary-color, 10%); } .border { padding: $margin / 2; margin: $margin / 2; border-color: $primary-color; } Scss Compiled Css .content-navigation { border-color: #3bbfce; color: #2b9eab; } .border { padding: 8px; margin: 8px; border-color: #3bbfce; } Global Variable: $width: 5em !global;
  • 11. Nested Syntax table.hl { margin: 2em 0; td.ln { text-align: right; } } li { font: { family: serif; weight: bold; size: 1.3em; } } Scss Compiled Css table.hl { margin: 2em 0; } table.hl td.ln { text-align: right; } li { font-family: serif; font-weight: bold; font-size: 1.3em; }
  • 12. Nested Syntax: Referencing Parent Selectors: & #main { color: black; a { font-weight: bold; &:hover { color: red; } } } Scss Compiled Css #main { color: black; } #main a { font-weight: bold; } #main a:hover { color: red; } You might want to have special styles for when that selector is hovered over or for when the body element has a certain class. In these cases, you can explicitly specify where the parent selector should be inserted using the & character.
  • 13. Nested Syntax: Properties .funky { font: { family: fantasy; size: 30em; weight: bold; } } Scss Compiled Css .funky { font-family: fantasy; font-size: 30em; font-weight: bold; } In Css: If you want to set a bunch of properties in the same name-space, you have to type it out each time.
  • 14. Mixins: @mixin, @include @mixin large-text { font: { family: Arial; size: 20px; weight: bold; } color: #ff0000; } Create mixin .page-title { @include large-text; padding: 4px; margin-top: 10px; } Mixins allow you to define styles that can be re-used throughout the style-sheet. They can even take arguments which allows you to produce a wide variety of styles with very few mixins. Using created mixin .page-title { font-family: Arial; font-size: 20px; font-weight: bold; color: #ff0000; padding: 4px; margin-top: 10px; } Compiled to
  • 15. Mixins: Arguments @mixin sexy-border($color, $width) { border: { color: $color; width: $width; style: dashed; } } p { border-color: blue; border-width: 1in; border-style: dashed; } Mixins can take SassScript values as arguments, When defining a mixin, the arguments are written as variable names separated by commas, all in parentheses after the name. Create p { @include sexy-border(blue, 1in); }Usage Compiled to Default values for their arguments @mixin sexy-border($color, $width: 1px) {
  • 16. Mixins: Variable Arguments @mixin box-shadow($shadows...) { -moz-box-shadow: $shadows; -webkit-box-shadow: $shadows; box-shadow: $shadows; } .shadows { -moz-box-shadow: 0px 4px 5px #666, 2px 6px 10px #999; -webkit-box-shadow: 0px 4px 5px #666, 2px 6px 10px #999; box-shadow: 0px 4px 5px #666, 2px 6px 10px #999; } Sometimes it makes sense for a mixin or function to take an unknown number of arguments. For example: box-shadow Create .shadows { @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); } Usage Compiled to
  • 17. Looping Css: @while $i: 6; @while $i > 0 { .item-#{$i} { width: 2em * $i; } $i: $i - 2; } Sass allows for iterating over variables using @for, @each and @while, which can be used to apply different styles to elements with similar classes or ids. Create .item-6 { width: 12em; } .item-4 { width: 8em; } .item-2 { width: 4em; } Compiled to
  • 18. Looping Css: @each @each $animal in puma, sea-slug, egret, salamander { .#{$animal}-icon { background-image: url('/images/#{$animal}.png'); } } The @each directive usually has the form @each $var in <list or map>. $var can be any variable name, like $length or $name, and <list or map> is a SassScript expression that returns a list or a map. Create Compiled To .puma-icon { background-image: url('/images/puma.png'); } .sea-slug-icon { background-image: url('/images/sea-slug.png'); } .egret-icon { background-image: url('/images/egret.png'); } .salamander-icon { background-image: url('/images/salamander.png'); }
  • 19. Looping Css: @if - @else $type: monster; p { @if $type == ocean { color: blue; } @else if $type == matador { color: red; } @else if $type == monster { color: green; } @else { color: black; } } The @if directive takes a SassScript expression and uses the styles nested beneath it if the expression returns anything other than false or null: Create Compiled To p { color: green; }
  • 20. Looping Css: @for @for $i from 1 through 3 { .item-#{$i} { width: 2em * $i; } } The @for directive repeatedly outputs a set of styles. For each repetition, a counter variable is used to adjust the output. The directive has two forms: @for $var from <start> through <end> and @for $var from <start> to <end>. Create Compiled To .item-1 { width: 2em; } .item-2 { width: 4em; } .item-3 { width: 6em; }
  • 21. _Partials For example, you might have _colors.scss. Then no _colors.css file would be created, and you can do @import "colors"; If you have a SCSS or Sass file that you want to import but don’t want to compile to a CSS file, you can add an underscore to the beginning of the filename. This will tell Sass not to compile it to a normal CSS file. You can then import these files without using the underscore.
  • 22. _Partials For example, you might have _colors.scss. Then no _colors.css file would be created, and you can do @import "colors"; //other css goes here If you have a SCSS or Sass file that you want to import but don’t want to compile to a CSS file, you can add an underscore to the beginning of the filename. This will tell Sass not to compile it to a normal CSS file. You can then import these files without using the underscore.
  • 23. Output Style Although the default CSS style that Sass outputs is very nice and reflects the structure of the document, tastes and needs vary and so Sass supports several other styles. ● Nested ● Expanded ● Compact ● Compressed Nested #main { color: #fff; background-color: #000; } #main p { width: 10em; } Expanded #main { color: #fff; background-color: #000; } #main p { width: 10em; } Nested #main { color: #fff; background-color: #000; } #main p { width: 10em; } Compact #main { color: #fff; background-color: #000; } #main p { width: 10em; } #main{color:#fff;background-color:#000}#main p{width:10em}Compressed
  • 24. References Sass-lang : Official Site Sass-lang : Github

Notas del editor

  1. (You can think of the WebView as a chromeless browser window that’s typically configured to run fullscreen.) This enables them to access device capabilities such as the accelerometer, camera, contacts, and more. These are capabilities that are often restricted to access from inside mobile browsers.
  2. Piyush Mishra
  3. Piyush Mishra
  4. Piyush Mishra
  5. Piyush Mishra
  6. Piyush Mishra
  7. Piyush Mishra
  8. Piyush Mishra
  9. Piyush Mishra
  10. Piyush Mishra
  11. Piyush Mishra
  12. Piyush Mishra
  13. Piyush Mishra
  14. Piyush Mishra
  15. Piyush Mishra
  16. Piyush Mishra
  17. Piyush Mishra
  18. Piyush Mishra
  19. Piyush Mishra