SlideShare una empresa de Scribd logo
1 de 12
Compass-n-Sass
   -- Pradeep S
CSS
Css is a stylesheet language used for
describing presentation semantics

The style sheet with the highest priority controls
the content display. Declarations not set in the
highest priority source are passed on to a
source of lower priority, such as the user agent
style. This process is called cascading.
CSS & CSS3
Rule:

Selector (#id)
{
  style declaration
  (border-radius:4px;)
  vendor specific style declaration (-moz-border-
radius:4px;)
}
Best practices in CSS
1)Global reset style sheet usage

2)Typography (95% of web design )

3)Sprites

4)Table Striping (Zebra Stripes) .. etc
Limitations
Css has following drawbacks:

1)Variables and functions cannot be declared
to reduce the redundancy in declarations
2)Need a standard compression mechanism
3)Need to depend on web designers for sprite
images and setting the position of images

Compass n Sass helps us in solving the above
drawbacks
Sass

Sass is a language,It is an extension of CSS3
to create better stylesheets with less effort

All Sass files end with extension *.scss



                    Sass
     *.scss         Engine           *.css
Sass features
1)Nesting (Code link)

2)Variables ,Interpolations, Operators and
Functions (Code link)

3)Mixins, Arguments (Code link)

4)Imports (Code link)

5)Partials
Compass
Compass is a framework. Its a framework of
patterns and best practices written in Sass to
solve common stylesheet problems


                    Compass


  *.scss                                  *.css


                   Sass Engine
Installing Compass n Sass

1)Install Ruby.
2) "gem install sass" to install sass
3) "gem install compass" to install compass
4) "compass create" to create web
development directory
5)"compass watch" to create the css files
dynamically with changes made in the scss
files
Compass features
1)Inbuilt CSS reset stylesheet
2)Inbuilt CSS3 Mixins
3)Inbuilt Typography Mixin and much more like
table helpers
4)Sprite mixins (code link)
5)Built in CSS Compression
Compass prerequisite
No need to be a Ruby Dev, knowledge of
configuring config.rb file should is must.

Tips on config.rb file:
1)sass_dir -- directory of sass files
2)images_dir -- directory of images
3)css_dir -- directory of the css files
4)output_style -- style for the compiled css files
Scout App http://mhs.github.com/scout-app/
provides UI for configuring the directories
References
1)http://sass-lang.com/tutorial.html

2)http://compass-style.org/

3)http://mhs.github.com/scout-app/

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Why are we using Sass to create Grid Frameworks?
Why are we using Sass to create Grid Frameworks?Why are we using Sass to create Grid Frameworks?
Why are we using Sass to create Grid Frameworks?
 
Beautifying senc
Beautifying sencBeautifying senc
Beautifying senc
 
Sass installation
Sass installationSass installation
Sass installation
 
Sass and Compass short presentation
Sass and Compass short presentationSass and Compass short presentation
Sass and Compass short presentation
 
Create SASSy web parts in SPFx
Create SASSy web parts in SPFxCreate SASSy web parts in SPFx
Create SASSy web parts in SPFx
 
Sass - basic to advance
Sass  - basic to advanceSass  - basic to advance
Sass - basic to advance
 
Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Sass - Getting Started with Sass!
Sass - Getting Started with Sass!
 
Sass and compass workshop
Sass and compass workshopSass and compass workshop
Sass and compass workshop
 
Journey To The Front End World - Part2 - The Cosmetic
Journey To The Front End World - Part2 - The  CosmeticJourney To The Front End World - Part2 - The  Cosmetic
Journey To The Front End World - Part2 - The Cosmetic
 
Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.
 
Tech talk on Tailwind CSS
Tech talk on Tailwind CSSTech talk on Tailwind CSS
Tech talk on Tailwind CSS
 
Stop your sharepoint css becoming a disasster today spsbe2015
Stop your sharepoint css becoming a disasster today spsbe2015Stop your sharepoint css becoming a disasster today spsbe2015
Stop your sharepoint css becoming a disasster today spsbe2015
 
SPS Belgium - Stop your SharePoint CSS becoming a di-SASS-ter today!
SPS Belgium - Stop your SharePoint CSS becoming a di-SASS-ter today!SPS Belgium - Stop your SharePoint CSS becoming a di-SASS-ter today!
SPS Belgium - Stop your SharePoint CSS becoming a di-SASS-ter today!
 
Css sprite
Css spriteCss sprite
Css sprite
 
League of extraordinary front end dev tools
League of extraordinary front end dev toolsLeague of extraordinary front end dev tools
League of extraordinary front end dev tools
 
Meet the grids - Web design using Grids
Meet the grids - Web design using GridsMeet the grids - Web design using Grids
Meet the grids - Web design using Grids
 
Class15
Class15Class15
Class15
 
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
 
Compass/Sass
Compass/SassCompass/Sass
Compass/Sass
 
Peggy sass vs scss
Peggy  sass vs scssPeggy  sass vs scss
Peggy sass vs scss
 

Destacado

Physicprojectof211
Physicprojectof211Physicprojectof211
Physicprojectof211
anran chen
 
Simulacro de examen para docentes postulantes a la carrera publica magisterial
Simulacro de examen para docentes postulantes a la carrera publica magisterialSimulacro de examen para docentes postulantes a la carrera publica magisterial
Simulacro de examen para docentes postulantes a la carrera publica magisterial
Willy Hernandez
 
AMB_Urban Land 2008 07
AMB_Urban Land 2008 07AMB_Urban Land 2008 07
AMB_Urban Land 2008 07
Rachel Bennett
 

Destacado (15)

Diagrama de gantt
Diagrama de ganttDiagrama de gantt
Diagrama de gantt
 
Bosnian War
Bosnian WarBosnian War
Bosnian War
 
Physicprojectof211
Physicprojectof211Physicprojectof211
Physicprojectof211
 
Mobile User Engagement Tips and Creating Mobile Moments
Mobile User Engagement Tips and Creating Mobile MomentsMobile User Engagement Tips and Creating Mobile Moments
Mobile User Engagement Tips and Creating Mobile Moments
 
Presentación1
Presentación1Presentación1
Presentación1
 
Vocab session 14
Vocab session   14Vocab session   14
Vocab session 14
 
Simulacro de examen para docentes postulantes a la carrera publica magisterial
Simulacro de examen para docentes postulantes a la carrera publica magisterialSimulacro de examen para docentes postulantes a la carrera publica magisterial
Simulacro de examen para docentes postulantes a la carrera publica magisterial
 
AMB_Urban Land 2008 07
AMB_Urban Land 2008 07AMB_Urban Land 2008 07
AMB_Urban Land 2008 07
 
CleverTap Mobile App Startup Program - Calling All Entrepreneurs
CleverTap Mobile App Startup Program - Calling All EntrepreneursCleverTap Mobile App Startup Program - Calling All Entrepreneurs
CleverTap Mobile App Startup Program - Calling All Entrepreneurs
 
cat result score card
cat result score cardcat result score card
cat result score card
 
What makes a good magazine
What makes a good magazineWhat makes a good magazine
What makes a good magazine
 
WECPOSTER5 crop
WECPOSTER5 cropWECPOSTER5 crop
WECPOSTER5 crop
 
Tenerife
TenerifeTenerife
Tenerife
 
Women and The 2014 Ukraine Crisis
Women and The 2014 Ukraine CrisisWomen and The 2014 Ukraine Crisis
Women and The 2014 Ukraine Crisis
 
Absceso periodontal
Absceso periodontalAbsceso periodontal
Absceso periodontal
 

Similar a Compass n Sass

CSS Methodology
CSS MethodologyCSS Methodology
CSS Methodology
Zohar Arad
 

Similar a Compass n Sass (20)

UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by ShafeeqSass:-Syntactically Awesome Stylesheet by Shafeeq
Sass:-Syntactically Awesome Stylesheet by Shafeeq
 
Authoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & SassAuthoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & Sass
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass TopicsAtlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
 
October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101
 
CSS Meetup at The Hive in Rock Hill, SC - 2014
CSS Meetup at The Hive in Rock Hill, SC - 2014CSS Meetup at The Hive in Rock Hill, SC - 2014
CSS Meetup at The Hive in Rock Hill, SC - 2014
 
CSS3
CSS3CSS3
CSS3
 
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_Cubet seminar
Sass_Cubet seminarSass_Cubet seminar
Sass_Cubet seminar
 
slides-students-C04.pdf
slides-students-C04.pdfslides-students-C04.pdf
slides-students-C04.pdf
 
Yahoo7 Tech Night - SASS
Yahoo7 Tech Night - SASSYahoo7 Tech Night - SASS
Yahoo7 Tech Night - SASS
 
Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan Create SASSY Web Parts - SPSMilan
Create SASSY Web Parts - SPSMilan
 
Beautifying Sencha Touch
Beautifying Sencha TouchBeautifying Sencha Touch
Beautifying Sencha Touch
 
An Introduction to CSS Frameworks
An Introduction to CSS FrameworksAn Introduction to CSS Frameworks
An Introduction to CSS Frameworks
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
 
[Bauer] SASSy web parts with SPFX
[Bauer] SASSy web parts with SPFX[Bauer] SASSy web parts with SPFX
[Bauer] SASSy web parts with SPFX
 
CSS Methodology
CSS MethodologyCSS Methodology
CSS Methodology
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress Developers
 
Stop your share point css become a di-sass-ter today - SPS Munich
Stop your share point css become a di-sass-ter today - SPS MunichStop your share point css become a di-sass-ter today - SPS Munich
Stop your share point css become a di-sass-ter today - SPS Munich
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Compass n Sass

  • 1. Compass-n-Sass -- Pradeep S
  • 2. CSS Css is a stylesheet language used for describing presentation semantics The style sheet with the highest priority controls the content display. Declarations not set in the highest priority source are passed on to a source of lower priority, such as the user agent style. This process is called cascading.
  • 3. CSS & CSS3 Rule: Selector (#id) { style declaration (border-radius:4px;) vendor specific style declaration (-moz-border- radius:4px;) }
  • 4. Best practices in CSS 1)Global reset style sheet usage 2)Typography (95% of web design ) 3)Sprites 4)Table Striping (Zebra Stripes) .. etc
  • 5. Limitations Css has following drawbacks: 1)Variables and functions cannot be declared to reduce the redundancy in declarations 2)Need a standard compression mechanism 3)Need to depend on web designers for sprite images and setting the position of images Compass n Sass helps us in solving the above drawbacks
  • 6. Sass Sass is a language,It is an extension of CSS3 to create better stylesheets with less effort All Sass files end with extension *.scss Sass *.scss Engine *.css
  • 7. Sass features 1)Nesting (Code link) 2)Variables ,Interpolations, Operators and Functions (Code link) 3)Mixins, Arguments (Code link) 4)Imports (Code link) 5)Partials
  • 8. Compass Compass is a framework. Its a framework of patterns and best practices written in Sass to solve common stylesheet problems Compass *.scss *.css Sass Engine
  • 9. Installing Compass n Sass 1)Install Ruby. 2) "gem install sass" to install sass 3) "gem install compass" to install compass 4) "compass create" to create web development directory 5)"compass watch" to create the css files dynamically with changes made in the scss files
  • 10. Compass features 1)Inbuilt CSS reset stylesheet 2)Inbuilt CSS3 Mixins 3)Inbuilt Typography Mixin and much more like table helpers 4)Sprite mixins (code link) 5)Built in CSS Compression
  • 11. Compass prerequisite No need to be a Ruby Dev, knowledge of configuring config.rb file should is must. Tips on config.rb file: 1)sass_dir -- directory of sass files 2)images_dir -- directory of images 3)css_dir -- directory of the css files 4)output_style -- style for the compiled css files Scout App http://mhs.github.com/scout-app/ provides UI for configuring the directories