SlideShare a Scribd company logo
“Syntactically Awesome StyleSheets”
Cubet Seminar
Presented by “Ajith”
“We help build and architect IT solutions”
About Cubet
Founded in 2007, Cubet Techno Labs
is an end-to-end SMAC (social,
mobile, analytics and cloud) consulting
company with offices at Kochi, India
and London, UK. With expertise in
insightful product strategy, well-crafted
design and proficient development for
high-end web and mobile application
technologies.
Where we stand
Visit – www.cubettech.com
What is Sass ?
Visit – www.cubettech.com
 Sass is an extension of CSS that adds power and elegance to the
basic language.
 It allows you to use variables, nested rules, mixins, inline imports,
and more, all with a fully CSS-compatible syntax
Features
Visit – www.cubettech.com
 Fully CSS3-compatible
 Language extensions such as variables, nesting, and
mixins
 Many useful functions for manipulating colors and
other values
 Advanced features like control directives for libraries
 Well-formatted, customizable output
Syntax
Visit – www.cubettech.com
•There are two syntaxes available for Sass.
•The first, known as SCSS (Sassy CSS). is an extension of the syntax of CSS3.
•This means that every valid CSS3 stylesheet is a valid SCSS file with the same
meaning.
•In addition, SCSS understands most CSS hacks and vendor-specific syntax.
•Files using this syntax have the .scss extension.
•The second and older syntax, known as the indented syntax (or just “Sass”),
provides a more concise way of writing CSS.
•It uses indentation rather than brackets to indicate nesting of selectors, and
newlines rather than semicolons to separate properties.
•Files using this syntax have the .sass extension.
Installation
Visit – www.cubettech.com
• To install 'sass' we need to install the ruby gems first.
sudo apt-get install ruby-full rubygems1.8
• To install sass
sudo gem install sass
Using Sass
Visit – www.cubettech.com
•To run Sass from the command line, just use
sass input.scss output.css
•You can also tell Sass to watch the file and update the CSS every
time the Sass file changes:
sass --watch input.scss:output.css
•If you have a directory with many Sass files, you can also tell Sass to
watch the entire directory:
sass --watch app/sass:public/stylesheets
Css Extension
Visit – www.cubettech.com
•Nested Rules
•Referencing Parent Selectors: &
•Nested Properties
Nested Rules
Visit – www.cubettech.com
 Sass allows CSS rules to be nested within one another.
 The inner rule then only applies within the outer rule’s selector.
For example
#main p {
color: #00ff00;
width: 97%;
.redbox {
background-
color: #ff0000;
color: #000000;
}}
is compiled to:
#main p {
color: #00ff00;
width: 97%;
}
#main p .redbox {
background-color: #ff0000;
color: #000000;
}
Referencing Parent Selectors: &
Visit – www.cubettech.com
 & will be replaced with the parent
selector as it appears in the CSS.
 This means that if you have a
deeply nested rule, the parent
selector will be fully resolved
before the & is replaced
•For example
#main {
color: black;
a {
font-weight: bold;
&:hover {
color: red;
} }}
•is compiled to:
#main {
color: black;
}
#main a {
font-weight: bold;
}
#main a:hover {
color: red;
}
Nested Properties
Visit – www.cubettech.com
CSS has quite a few properties that are in
“namespaces;” for instance, font-family, font-
size, and font-weight are all in
the font namespace.
Sass provides a shortcut for this: just write the
namespace once, then nest each of the sub-
properties within it.
•For example
.funky {
font: 20px/24px
fantasy {
weight: bold;
}}
•is compiled to:
.funky {
font: 20px/24px
fantasy;
font-weight:
bold;
}
SassScript
Visit – www.cubettech.com
In addition to the plain CSS property syntax, Sass supports a small set
of extensions called SassScript.
SassScript allows properties such as
•Variables: $
•Data Types
•Operations
•Functions
•Keyword Arguments
Variables: $
Visit – www.cubettech.com
Variables begin with dollar
signs, and are set like CSS
properties:
Variables are only available
within the level of nested
selectors where they’re defined.
If they’re defined outside of any
nested selectors, they’re
available everywhere.
They can also be defined with
the
!global flag, in which case
they’re also available
everywhere.
#main {
$width: 5em !global;
width: $width; }
#sidebar {
width: $width; }
is compiled to:
#main {
width: 5em; }
#sidebar {
width: 5em; }
Data Type
Visit – www.cubettech.com
•SassScript supports seven main data types:
–numbers (e.g. 1.2, 13, 10px)
–strings of text, with and without quotes (e.g. "foo", 'bar', baz)
–colors (e.g. blue, #04a3f9, rgba(255, 0, 0, 0.5))
–booleans (e.g. true, false)
–nulls (e.g. null)
–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))
•SassScript also supports all other types of CSS property value, such as Unicode
ranges and !important declarations.
Operations
Visit – www.cubettech.com
•All types support equality operations (== and !=). In addition, each
type has its own operations that it has special support for.
Different Operations
Number Operations (addition +, subtraction -, multiplication *,
division /, and modulo %)
Color Operations (All number operations supported)
String Operations (The + operation can be used to concatenate
strings)
Boolean Operations ( and, or, and not )
List Operations (Not support operators, uses list functions such
as length(),nth(),join() etc)
@-Rules and Directives
Visit – www.cubettech.com
•Sass supports all CSS3 @-rules, as well as some additional Sass-specific ones
known as “directives.”
@import
•Sass extends the CSS @import rule to allow it to import SCSS and Sass files.
All imported SCSS and Sass files will be merged together into a single CSS
output file.
•For example,
@import "foo.scss";
Controls Directive & Expressions
Visit – www.cubettech.com
• SassScript supports basic control directives and expressions for including
styles only under some conditions or including the same style several
times with variations.
@if
• The @if directive takes a SassScript expression and uses the styles nested
beneath it if the expression returns anything other than false or null:
• For example:
p {
@if 1 + 1 == 2 { border: 1px solid; }
@if 5 < 3 { border: 2px dotted; }
@if null { border: 3px double; }
}
is compiled to:
p { border: 1px solid; }
@if - @else
Visit – www.cubettech.com
$type: monster;
p {
@if $type == ocean {
color: blue;
} @else if $type == matador {
color: red;
} @else if $type == monster {
color: green;
} @else {
color: black;
}
}
is compiled to:
p {
color: green; }
Visit – www.cubettech.com
@for
•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>.
Through
@for $i from 1 through 3 {
.item-#{$i} {
width: 2em * $i; }}
is compiled to:
.item-1 { width: 2em; }
.item-2 { width: 4em; }
.item-3 { width: 6em; }
To
@for $i from 1 to 3 {
.item-#{$i} {
width: 2em * $i; }}
is compiled to:
.item-1 { width: 2em; }
.item-2 { width: 4em; }
Visit – www.cubettech.com
@while
•The @while directive takes a SassScript expression and repeatedly
outputs the nested styles until the statement evaluates to false.
•For example:
$i: 6;
@while $i > 0 {
.item-#{$i} { width: 2em * $i; }
$i: $i – 2;}
is compiled to:
.item-6 { width: 12em; }
.item-4 { width: 8em; }
.item-2 { width: 4em; }
Mixin Directives
Visit – www.cubettech.com
•Mixins allow you to define styles that can be re-used throughout the
stylesheet
Defining a Mixin: @mixin
•Mixins are defined with the @mixin directive.
•It’s followed by the name of the mixin and optionally the arguments, and a
block containing the contents of the mixin.
•Mixins are included in the document with the @include directive.
•This takes the name of a mixin and optionally arguments to pass to it, and
includes the styles defined by that mixin into the current rule.
Visit – www.cubettech.com
For example,
the large-text mixin is defined as follows:
@mixin large-text {
font: { family: Arial; size: 20px; weight: bold; }
color: #ff0000; }
Including a Mixin: @include
.page-title {
@include large-text;
padding: 4px;
margin-top: 10px;}
is compiled to:
.page-title {
font-family: Arial;
font-size: 20px;
font-weight: bold;
color: #ff0000;
padding: 4px;
margin-top: 10px; }
Our Technologies Stack:
Server Side Application JavaScript Frameworks
Mobile App Development
Database System and Cloud
Visit – www.cubettech.com
THANKS!
ANY QUESTIONS? PLEASE GET IN TOUCH!
www.cubettech.com
Email : info@cubettech.com
Skype : cubet.se
Phone: +91 484 405 4324
Contact us:
Kemp House
160 City Road
London- EC1V2NX,
UK.info@cubettech.com
+44 2071938618
Carnival Info Park,
Unit IX-C, 9th floor PhaseIV,
Kochi, Kerala, India
info@cubettech.com
+91 484 4054324

More Related Content

What's hot

Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
Rob Friesel
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y trying
James Cryer
 
Dallas Drupal Days 2012 - Introduction to less sass-compass
Dallas Drupal Days 2012  - Introduction to less sass-compassDallas Drupal Days 2012  - Introduction to less sass-compass
Dallas Drupal Days 2012 - Introduction to less sass-compass
Chris Lee
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Claudina Sarahe
 
CSS preprocessor: why and how
CSS preprocessor: why and howCSS preprocessor: why and how
CSS preprocessor: why and how
mirahman
 
Sass presentation
Sass presentationSass presentation
Sass presentation
Davin Abraham
 
Intro to SASS CSS
Intro to SASS CSSIntro to SASS CSS
Intro to SASS CSS
Kianosh Pourian
 
Css to-scss
Css to-scssCss to-scss
Css to-scss
frontendne
 
CSS3
CSS3CSS3
Introduction to SASS
Introduction to SASSIntroduction to SASS
Introduction to SASS
Jon Dean
 
HTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventionsHTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventions
Knoldus Inc.
 
Sass
SassSass
Intro to css & sass
Intro to css & sassIntro to css & sass
Intro to css & sass
Sean Wolfe
 
SASS - CSS with Superpower
SASS - CSS with SuperpowerSASS - CSS with Superpower
SASS - CSS with Superpower
Kanchha kaji Prajapati
 
SASS Preprocessor
SASS PreprocessorSASS Preprocessor
SASS Preprocessor
Webkul Software Pvt. Ltd.
 
Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Sass - Getting Started with Sass!
Sass - Getting Started with Sass!
Eric Sembrat
 
Css 3
Css 3Css 3
Css 3
poollar
 
Css 3
Css 3Css 3
Css 3
poollar
 
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
 
SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESS
Itai Koren
 

What's hot (20)

Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y trying
 
Dallas Drupal Days 2012 - Introduction to less sass-compass
Dallas Drupal Days 2012  - Introduction to less sass-compassDallas Drupal Days 2012  - Introduction to less sass-compass
Dallas Drupal Days 2012 - Introduction to less sass-compass
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
 
CSS preprocessor: why and how
CSS preprocessor: why and howCSS preprocessor: why and how
CSS preprocessor: why and how
 
Sass presentation
Sass presentationSass presentation
Sass presentation
 
Intro to SASS CSS
Intro to SASS CSSIntro to SASS CSS
Intro to SASS CSS
 
Css to-scss
Css to-scssCss to-scss
Css to-scss
 
CSS3
CSS3CSS3
CSS3
 
Introduction to SASS
Introduction to SASSIntroduction to SASS
Introduction to SASS
 
HTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventionsHTML5, CSS, JavaScript Style guide and coding conventions
HTML5, CSS, JavaScript Style guide and coding conventions
 
Sass
SassSass
Sass
 
Intro to css & sass
Intro to css & sassIntro to css & sass
Intro to css & sass
 
SASS - CSS with Superpower
SASS - CSS with SuperpowerSASS - CSS with Superpower
SASS - CSS with Superpower
 
SASS Preprocessor
SASS PreprocessorSASS Preprocessor
SASS Preprocessor
 
Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Sass - Getting Started with Sass!
Sass - Getting Started with Sass!
 
Css 3
Css 3Css 3
Css 3
 
Css 3
Css 3Css 3
Css 3
 
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)
 
SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESS
 

Similar to Sass_Cubet seminar

UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
kavi806657
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
Marco Pinheiro
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
Amey Parab
 
Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01
Anam Hossain
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by Shafeeq
DignitasDigital1
 
Advanced sass
Advanced sassAdvanced sass
Advanced sass
Kianosh Pourian
 
Sass - basic to advance
Sass  - basic to advanceSass  - basic to advance
Sass - basic to advance
Vinita Swamy
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
JoeSeckelman
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction Sass
Zeeshan Ahmed
 
sass_part2
sass_part2sass_part2
Getting Sassy with CSS
Getting Sassy with CSSGetting Sassy with CSS
Getting Sassy with CSS
Julie Cameron
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
Yatendra Bhardwaj
 
Preprocessor CSS: SASS
Preprocessor CSS: SASSPreprocessor CSS: SASS
Preprocessor CSS: SASS
Geoffroy Baylaender
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
Irfan Maulana
 
Introducing grunt, npm and sass
Introducing grunt, npm and sassIntroducing grunt, npm and sass
Introducing grunt, npm and sass
priyanka1452
 
Compass n Sass
Compass n SassCompass n Sass
Compass n Sass
Pradeep Saraswathi
 
LESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionLESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introduction
rushi7567
 
Less(CSS Pre Processor) Introduction
Less(CSS Pre Processor) IntroductionLess(CSS Pre Processor) Introduction
Less(CSS Pre Processor) Introduction
rushi7567
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet language
Katsunori Tanaka
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress Developers
Suzette Franck
 

Similar to Sass_Cubet seminar (20)

UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by Shafeeq
 
Advanced sass
Advanced sassAdvanced sass
Advanced sass
 
Sass - basic to advance
Sass  - basic to advanceSass  - basic to advance
Sass - basic to advance
 
Joes sass presentation
Joes sass presentationJoes sass presentation
Joes sass presentation
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction Sass
 
sass_part2
sass_part2sass_part2
sass_part2
 
Getting Sassy with CSS
Getting Sassy with CSSGetting Sassy with CSS
Getting Sassy with CSS
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
 
Preprocessor CSS: SASS
Preprocessor CSS: SASSPreprocessor CSS: SASS
Preprocessor CSS: SASS
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
 
Introducing grunt, npm and sass
Introducing grunt, npm and sassIntroducing grunt, npm and sass
Introducing grunt, npm and sass
 
Compass n Sass
Compass n SassCompass n Sass
Compass n Sass
 
LESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionLESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introduction
 
Less(CSS Pre Processor) Introduction
Less(CSS Pre Processor) IntroductionLess(CSS Pre Processor) Introduction
Less(CSS Pre Processor) Introduction
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet language
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress Developers
 

More from Cubet Techno Labs

Drupal_cubet seminar
Drupal_cubet seminarDrupal_cubet seminar
Drupal_cubet seminar
Cubet Techno Labs
 
Let's start with REDUX
Let's start with REDUXLet's start with REDUX
Let's start with REDUX
Cubet Techno Labs
 
JMeter_ Cubet Seminar ppt
JMeter_ Cubet Seminar pptJMeter_ Cubet Seminar ppt
JMeter_ Cubet Seminar ppt
Cubet Techno Labs
 
Fabricjs ppt
Fabricjs pptFabricjs ppt
Fabricjs ppt
Cubet Techno Labs
 
An Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using ProtractorAn Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using Protractor
Cubet Techno Labs
 
Angularjs 2
Angularjs 2 Angularjs 2
Angularjs 2
Cubet Techno Labs
 

More from Cubet Techno Labs (6)

Drupal_cubet seminar
Drupal_cubet seminarDrupal_cubet seminar
Drupal_cubet seminar
 
Let's start with REDUX
Let's start with REDUXLet's start with REDUX
Let's start with REDUX
 
JMeter_ Cubet Seminar ppt
JMeter_ Cubet Seminar pptJMeter_ Cubet Seminar ppt
JMeter_ Cubet Seminar ppt
 
Fabricjs ppt
Fabricjs pptFabricjs ppt
Fabricjs ppt
 
An Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using ProtractorAn Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using Protractor
 
Angularjs 2
Angularjs 2 Angularjs 2
Angularjs 2
 

Recently uploaded

Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 

Recently uploaded (20)

Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 

Sass_Cubet seminar

  • 1. “Syntactically Awesome StyleSheets” Cubet Seminar Presented by “Ajith” “We help build and architect IT solutions”
  • 2. About Cubet Founded in 2007, Cubet Techno Labs is an end-to-end SMAC (social, mobile, analytics and cloud) consulting company with offices at Kochi, India and London, UK. With expertise in insightful product strategy, well-crafted design and proficient development for high-end web and mobile application technologies. Where we stand Visit – www.cubettech.com
  • 3. What is Sass ? Visit – www.cubettech.com  Sass is an extension of CSS that adds power and elegance to the basic language.  It allows you to use variables, nested rules, mixins, inline imports, and more, all with a fully CSS-compatible syntax
  • 4. Features Visit – www.cubettech.com  Fully CSS3-compatible  Language extensions such as variables, nesting, and mixins  Many useful functions for manipulating colors and other values  Advanced features like control directives for libraries  Well-formatted, customizable output
  • 5. Syntax Visit – www.cubettech.com •There are two syntaxes available for Sass. •The first, known as SCSS (Sassy CSS). is an extension of the syntax of CSS3. •This means that every valid CSS3 stylesheet is a valid SCSS file with the same meaning. •In addition, SCSS understands most CSS hacks and vendor-specific syntax. •Files using this syntax have the .scss extension. •The second and older syntax, known as the indented syntax (or just “Sass”), provides a more concise way of writing CSS. •It uses indentation rather than brackets to indicate nesting of selectors, and newlines rather than semicolons to separate properties. •Files using this syntax have the .sass extension.
  • 6. Installation Visit – www.cubettech.com • To install 'sass' we need to install the ruby gems first. sudo apt-get install ruby-full rubygems1.8 • To install sass sudo gem install sass
  • 7. Using Sass Visit – www.cubettech.com •To run Sass from the command line, just use sass input.scss output.css •You can also tell Sass to watch the file and update the CSS every time the Sass file changes: sass --watch input.scss:output.css •If you have a directory with many Sass files, you can also tell Sass to watch the entire directory: sass --watch app/sass:public/stylesheets
  • 8. Css Extension Visit – www.cubettech.com •Nested Rules •Referencing Parent Selectors: & •Nested Properties
  • 9. Nested Rules Visit – www.cubettech.com  Sass allows CSS rules to be nested within one another.  The inner rule then only applies within the outer rule’s selector. For example #main p { color: #00ff00; width: 97%; .redbox { background- color: #ff0000; color: #000000; }} is compiled to: #main p { color: #00ff00; width: 97%; } #main p .redbox { background-color: #ff0000; color: #000000; }
  • 10. Referencing Parent Selectors: & Visit – www.cubettech.com  & will be replaced with the parent selector as it appears in the CSS.  This means that if you have a deeply nested rule, the parent selector will be fully resolved before the & is replaced •For example #main { color: black; a { font-weight: bold; &:hover { color: red; } }} •is compiled to: #main { color: black; } #main a { font-weight: bold; } #main a:hover { color: red; }
  • 11. Nested Properties Visit – www.cubettech.com CSS has quite a few properties that are in “namespaces;” for instance, font-family, font- size, and font-weight are all in the font namespace. Sass provides a shortcut for this: just write the namespace once, then nest each of the sub- properties within it. •For example .funky { font: 20px/24px fantasy { weight: bold; }} •is compiled to: .funky { font: 20px/24px fantasy; font-weight: bold; }
  • 12. SassScript Visit – www.cubettech.com In addition to the plain CSS property syntax, Sass supports a small set of extensions called SassScript. SassScript allows properties such as •Variables: $ •Data Types •Operations •Functions •Keyword Arguments
  • 13. Variables: $ Visit – www.cubettech.com Variables begin with dollar signs, and are set like CSS properties: Variables are only available within the level of nested selectors where they’re defined. If they’re defined outside of any nested selectors, they’re available everywhere. They can also be defined with the !global flag, in which case they’re also available everywhere. #main { $width: 5em !global; width: $width; } #sidebar { width: $width; } is compiled to: #main { width: 5em; } #sidebar { width: 5em; }
  • 14. Data Type Visit – www.cubettech.com •SassScript supports seven main data types: –numbers (e.g. 1.2, 13, 10px) –strings of text, with and without quotes (e.g. "foo", 'bar', baz) –colors (e.g. blue, #04a3f9, rgba(255, 0, 0, 0.5)) –booleans (e.g. true, false) –nulls (e.g. null) –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)) •SassScript also supports all other types of CSS property value, such as Unicode ranges and !important declarations.
  • 15. Operations Visit – www.cubettech.com •All types support equality operations (== and !=). In addition, each type has its own operations that it has special support for. Different Operations Number Operations (addition +, subtraction -, multiplication *, division /, and modulo %) Color Operations (All number operations supported) String Operations (The + operation can be used to concatenate strings) Boolean Operations ( and, or, and not ) List Operations (Not support operators, uses list functions such as length(),nth(),join() etc)
  • 16. @-Rules and Directives Visit – www.cubettech.com •Sass supports all CSS3 @-rules, as well as some additional Sass-specific ones known as “directives.” @import •Sass extends the CSS @import rule to allow it to import SCSS and Sass files. All imported SCSS and Sass files will be merged together into a single CSS output file. •For example, @import "foo.scss";
  • 17. Controls Directive & Expressions Visit – www.cubettech.com • SassScript supports basic control directives and expressions for including styles only under some conditions or including the same style several times with variations. @if • The @if directive takes a SassScript expression and uses the styles nested beneath it if the expression returns anything other than false or null: • For example: p { @if 1 + 1 == 2 { border: 1px solid; } @if 5 < 3 { border: 2px dotted; } @if null { border: 3px double; } } is compiled to: p { border: 1px solid; }
  • 18. @if - @else Visit – www.cubettech.com $type: monster; p { @if $type == ocean { color: blue; } @else if $type == matador { color: red; } @else if $type == monster { color: green; } @else { color: black; } } is compiled to: p { color: green; }
  • 19. Visit – www.cubettech.com @for •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>. Through @for $i from 1 through 3 { .item-#{$i} { width: 2em * $i; }} is compiled to: .item-1 { width: 2em; } .item-2 { width: 4em; } .item-3 { width: 6em; } To @for $i from 1 to 3 { .item-#{$i} { width: 2em * $i; }} is compiled to: .item-1 { width: 2em; } .item-2 { width: 4em; }
  • 20. Visit – www.cubettech.com @while •The @while directive takes a SassScript expression and repeatedly outputs the nested styles until the statement evaluates to false. •For example: $i: 6; @while $i > 0 { .item-#{$i} { width: 2em * $i; } $i: $i – 2;} is compiled to: .item-6 { width: 12em; } .item-4 { width: 8em; } .item-2 { width: 4em; }
  • 21. Mixin Directives Visit – www.cubettech.com •Mixins allow you to define styles that can be re-used throughout the stylesheet Defining a Mixin: @mixin •Mixins are defined with the @mixin directive. •It’s followed by the name of the mixin and optionally the arguments, and a block containing the contents of the mixin. •Mixins are included in the document with the @include directive. •This takes the name of a mixin and optionally arguments to pass to it, and includes the styles defined by that mixin into the current rule.
  • 22. Visit – www.cubettech.com For example, the large-text mixin is defined as follows: @mixin large-text { font: { family: Arial; size: 20px; weight: bold; } color: #ff0000; } Including a Mixin: @include .page-title { @include large-text; padding: 4px; margin-top: 10px;} is compiled to: .page-title { font-family: Arial; font-size: 20px; font-weight: bold; color: #ff0000; padding: 4px; margin-top: 10px; }
  • 23. Our Technologies Stack: Server Side Application JavaScript Frameworks Mobile App Development Database System and Cloud Visit – www.cubettech.com
  • 24. THANKS! ANY QUESTIONS? PLEASE GET IN TOUCH! www.cubettech.com Email : info@cubettech.com Skype : cubet.se Phone: +91 484 405 4324
  • 25. Contact us: Kemp House 160 City Road London- EC1V2NX, UK.info@cubettech.com +44 2071938618 Carnival Info Park, Unit IX-C, 9th floor PhaseIV, Kochi, Kerala, India info@cubettech.com +91 484 4054324