SlideShare uma empresa Scribd logo
1 de 15
Sass
• Syntactically Awesome Stylesheet
• Sass is a CSS pre-processor
• Look like CSS
• Sass is completely compatible with all versions of CSS
• Sass reduces repetition of CSS and therefore saves time
• Sass was designed by Hampton Catlin and developed by Natalie Weizenbaum in 2006
Why Use Sass?
• Stylesheets are getting larger, more complex, and harder to
maintain. This is where a CSS pre-processor can help.
• Sass lets you use features that do not exist in CSS, like variables,
nested rules, mixins, imports, inheritance, built-in functions, and
other stuff.
CodeKit (Paid) Mac
Compass.app (Paid, Open Source) Mac Windows Linux
Ghostlab (Paid) Mac Windows
Hammer (Paid) Mac
Koala (Open Source) Mac Windows Linux
LiveReload (Paid, Open Source) Mac Windows
Prepros (Paid) Mac Windows Linux
Scout-App (Free, Open Source) Windows Linux Mac
When you install Sass on the command line, you'll
be able to run the sass executable to compile .sass
and .scss files to .css files. For example:
Applications Command Line
How to Use/install Sass?
How Does Sass Work?
A browser does not understand Sass code. Therefore, you
will need a Sass pre-processor to convert Sass code into
standard CSS.
A Simple Example
Let's say we have a website with three main colors:
So, many times we type those HEX values.
Instead of typing the above values a lot of times, we can use Sass and write this:
So, when using Sass, and the primary color changes, you only need to change it in one place.
Variables
Variables as a way to store information that you want to reuse throughout your
stylesheet.
Nesting
When writing HTML you've probably noticed that it has a clear nested and visual hierarchy.
Sass will let you nest your CSS selectors in a way that follows the same visual hierarchy of your HTML.
Partials
You can create partial Sass files that contain little snippets of CSS
that you can include in other Sass files. This is a great way to
modularize your CSS and help keep things easier to maintain. A
partial is a Sass file named with a leading underscore. You might
name it something like _partial.scss. The underscore lets Sass know
that the file is only a partial file and that it should not be generated
into a CSS file. Sass partials are used with the @use rule.
Modules
You don't have to write all your Sass in a single file. You can split it up however you want with the @use rule. This
rule loads another Sass file as a moduleUsing a file will also include the CSS it generates in your compiled output!
Notice we're using @use 'base'; in the styles.scss file. When you use a file you don't need to include
the file extension. Sass is smart and will figure it out.
Mixins
Some things in CSS are a bit tedious to write, especially with CSS3 and the many vendor prefixes that exist. A
mixin lets you make groups of CSS declarations that you want to reuse throughout your site. You can even pass
in values to make your mixin more flexible. A good use of a mixin is for vendor prefixes. Here's an example for
transform.
Extend/Inheritance
This is one of the most useful features of Sass. Using @extend lets you share a set of CSS properties from one
selector to another.
Operators
Doing math in your CSS is very helpful. Sass has a handful of standard math operators like +, -, *, /, and %.
SASS AND MEDIA QUERIES
SASS
section.main {
float: left;
width: 65%;
font-size: 16px;
Line-height: 1.4;
@media screen and (max-width: 800px) {
float: none;
width: auto;
}
@media screen and (max-width: 500px) {
font-size: 12px;
line-height: 1.4;
}
}
CSS
section.main {
float: left;
width: 65%;
font-size: 16px;
line-height: 1.4;
}
@media screen and (max-width: 800px) {
section.main {
float: none;
width: auto;
}
}
@media screen and (max-width: 500px) {
section.main {
font-size: 12px;
line-height: 1.4;
}
}
THANK YOU!

Mais conteúdo relacionado

Mais procurados

Forms as Structured Content
Forms as Structured Content Forms as Structured Content
Forms as Structured Content dotCMS
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAPJeanie Arnoco
 
Wordpress Custom Post Types
Wordpress Custom Post TypesWordpress Custom Post Types
Wordpress Custom Post TypesBrent Williams
 
Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentJosé Maia
 
Drupal Multi-Site Setup
Drupal Multi-Site SetupDrupal Multi-Site Setup
Drupal Multi-Site Setupylynfatt
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module developmentRachit Gupta
 
Web programming
Web programmingWeb programming
Web programmingIshucs
 
Going Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMSGoing Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMSdotCMS
 

Mais procurados (12)

Forms as Structured Content
Forms as Structured Content Forms as Structured Content
Forms as Structured Content
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAP
 
Wordpress Custom Post Types
Wordpress Custom Post TypesWordpress Custom Post Types
Wordpress Custom Post Types
 
Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent Deployment
 
Framework
FrameworkFramework
Framework
 
Drupal Multi-Site Setup
Drupal Multi-Site SetupDrupal Multi-Site Setup
Drupal Multi-Site Setup
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module development
 
Asp folders and web configurations
Asp folders and web configurationsAsp folders and web configurations
Asp folders and web configurations
 
Web programming
Web programmingWeb programming
Web programming
 
Going Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMSGoing Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMS
 
Bootstrap 3.1.1
Bootstrap 3.1.1Bootstrap 3.1.1
Bootstrap 3.1.1
 
Bootstrap ppt
Bootstrap pptBootstrap ppt
Bootstrap ppt
 

Semelhante a Sass:-Syntactically Awesome Stylesheet by Shafeeq

Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionIrfan Maulana
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS ImplementationAmey Parab
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajYatendra Bhardwaj
 
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!Stefan Bauer
 
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?sharjeet
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetNeha Sharma
 
Getting Sassy with CSS
Getting Sassy with CSSGetting Sassy with CSS
Getting Sassy with CSSJulie Cameron
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersSuzette Franck
 
Authoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & SassAuthoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & Sasschriseppstein
 
The CSS Handbook
The CSS HandbookThe CSS Handbook
The CSS Handbookjackchenvlo
 
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 - basic to advance
Sass  - basic to advanceSass  - basic to advance
Sass - basic to advanceVinita Swamy
 
European SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint SassyEuropean SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint SassyStefan Bauer
 
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 TopicsEric Sembrat
 

Semelhante a Sass:-Syntactically Awesome Stylesheet by Shafeeq (20)

Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
Sass
SassSass
Sass
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
The sass way - Yatendra Bhardwaj
The sass way - Yatendra BhardwajThe sass way - Yatendra Bhardwaj
The sass way - Yatendra Bhardwaj
 
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
 
Why are we using Sass to create Grid Frameworks?
Why are we using Sass to create Grid Frameworks?Why are we using Sass to create Grid Frameworks?
Why are we using Sass to create Grid Frameworks?
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome Stylesheet
 
CSS3
CSS3CSS3
CSS3
 
Getting Sassy with CSS
Getting Sassy with CSSGetting Sassy with CSS
Getting Sassy with CSS
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress Developers
 
Sass_Cubet seminar
Sass_Cubet seminarSass_Cubet seminar
Sass_Cubet seminar
 
Authoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & SassAuthoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & Sass
 
Compass n Sass
Compass n SassCompass n Sass
Compass n Sass
 
The CSS Handbook
The CSS HandbookThe CSS Handbook
The CSS Handbook
 
Make your CSS beautiful again
Make your CSS beautiful againMake your CSS beautiful again
Make your CSS beautiful again
 
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 - basic to advance
Sass  - basic to advanceSass  - basic to advance
Sass - basic to advance
 
European SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint SassyEuropean SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint Sassy
 
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
 

Mais de DignitasDigital1

Ambush Marketing By Amandeep
Ambush Marketing By AmandeepAmbush Marketing By Amandeep
Ambush Marketing By AmandeepDignitasDigital1
 
Wireframing with balsamiq by Chandeep
Wireframing with balsamiq by ChandeepWireframing with balsamiq by Chandeep
Wireframing with balsamiq by ChandeepDignitasDigital1
 
10 Productive habits for working from home By Shweta
10 Productive habits for working from home By Shweta 10 Productive habits for working from home By Shweta
10 Productive habits for working from home By Shweta DignitasDigital1
 
5 Principles of brand on social media during lockdown By Aman
5 Principles of brand on social media during lockdown By Aman5 Principles of brand on social media during lockdown By Aman
5 Principles of brand on social media during lockdown By AmanDignitasDigital1
 
Drip Marketing by Abhishek
Drip Marketing by AbhishekDrip Marketing by Abhishek
Drip Marketing by AbhishekDignitasDigital1
 
7Cs for communication by Shweta
7Cs for communication by Shweta 7Cs for communication by Shweta
7Cs for communication by Shweta DignitasDigital1
 
Overview of Big Data by Sunny
Overview of Big Data by SunnyOverview of Big Data by Sunny
Overview of Big Data by SunnyDignitasDigital1
 
Blue Ocean strategy by Vinita
Blue Ocean strategy by VinitaBlue Ocean strategy by Vinita
Blue Ocean strategy by VinitaDignitasDigital1
 
Advertising and marketing at zero cost by Jatin
Advertising and marketing at zero cost by JatinAdvertising and marketing at zero cost by Jatin
Advertising and marketing at zero cost by JatinDignitasDigital1
 

Mais de DignitasDigital1 (13)

Ambush Marketing By Amandeep
Ambush Marketing By AmandeepAmbush Marketing By Amandeep
Ambush Marketing By Amandeep
 
Wireframing with balsamiq by Chandeep
Wireframing with balsamiq by ChandeepWireframing with balsamiq by Chandeep
Wireframing with balsamiq by Chandeep
 
10 Productive habits for working from home By Shweta
10 Productive habits for working from home By Shweta 10 Productive habits for working from home By Shweta
10 Productive habits for working from home By Shweta
 
5 Principles of brand on social media during lockdown By Aman
5 Principles of brand on social media during lockdown By Aman5 Principles of brand on social media during lockdown By Aman
5 Principles of brand on social media during lockdown By Aman
 
Typography By Amit
Typography By AmitTypography By Amit
Typography By Amit
 
Drip Marketing by Abhishek
Drip Marketing by AbhishekDrip Marketing by Abhishek
Drip Marketing by Abhishek
 
7Cs for communication by Shweta
7Cs for communication by Shweta 7Cs for communication by Shweta
7Cs for communication by Shweta
 
Overview of Big Data by Sunny
Overview of Big Data by SunnyOverview of Big Data by Sunny
Overview of Big Data by Sunny
 
Flutter by Shubham
Flutter by ShubhamFlutter by Shubham
Flutter by Shubham
 
Blue Ocean strategy by Vinita
Blue Ocean strategy by VinitaBlue Ocean strategy by Vinita
Blue Ocean strategy by Vinita
 
Advertising and marketing at zero cost by Jatin
Advertising and marketing at zero cost by JatinAdvertising and marketing at zero cost by Jatin
Advertising and marketing at zero cost by Jatin
 
Ui trends 2019 by Amit
Ui trends 2019 by AmitUi trends 2019 by Amit
Ui trends 2019 by Amit
 
Kubernetes by Jai
Kubernetes by JaiKubernetes by Jai
Kubernetes by Jai
 

Último

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Último (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Sass:-Syntactically Awesome Stylesheet by Shafeeq

  • 1. Sass • Syntactically Awesome Stylesheet • Sass is a CSS pre-processor • Look like CSS • Sass is completely compatible with all versions of CSS • Sass reduces repetition of CSS and therefore saves time • Sass was designed by Hampton Catlin and developed by Natalie Weizenbaum in 2006
  • 2. Why Use Sass? • Stylesheets are getting larger, more complex, and harder to maintain. This is where a CSS pre-processor can help. • Sass lets you use features that do not exist in CSS, like variables, nested rules, mixins, imports, inheritance, built-in functions, and other stuff.
  • 3. CodeKit (Paid) Mac Compass.app (Paid, Open Source) Mac Windows Linux Ghostlab (Paid) Mac Windows Hammer (Paid) Mac Koala (Open Source) Mac Windows Linux LiveReload (Paid, Open Source) Mac Windows Prepros (Paid) Mac Windows Linux Scout-App (Free, Open Source) Windows Linux Mac When you install Sass on the command line, you'll be able to run the sass executable to compile .sass and .scss files to .css files. For example: Applications Command Line How to Use/install Sass?
  • 4. How Does Sass Work? A browser does not understand Sass code. Therefore, you will need a Sass pre-processor to convert Sass code into standard CSS.
  • 5. A Simple Example Let's say we have a website with three main colors: So, many times we type those HEX values. Instead of typing the above values a lot of times, we can use Sass and write this:
  • 6. So, when using Sass, and the primary color changes, you only need to change it in one place.
  • 7. Variables Variables as a way to store information that you want to reuse throughout your stylesheet.
  • 8. Nesting When writing HTML you've probably noticed that it has a clear nested and visual hierarchy. Sass will let you nest your CSS selectors in a way that follows the same visual hierarchy of your HTML.
  • 9. Partials You can create partial Sass files that contain little snippets of CSS that you can include in other Sass files. This is a great way to modularize your CSS and help keep things easier to maintain. A partial is a Sass file named with a leading underscore. You might name it something like _partial.scss. The underscore lets Sass know that the file is only a partial file and that it should not be generated into a CSS file. Sass partials are used with the @use rule.
  • 10. Modules You don't have to write all your Sass in a single file. You can split it up however you want with the @use rule. This rule loads another Sass file as a moduleUsing a file will also include the CSS it generates in your compiled output! Notice we're using @use 'base'; in the styles.scss file. When you use a file you don't need to include the file extension. Sass is smart and will figure it out.
  • 11. Mixins Some things in CSS are a bit tedious to write, especially with CSS3 and the many vendor prefixes that exist. A mixin lets you make groups of CSS declarations that you want to reuse throughout your site. You can even pass in values to make your mixin more flexible. A good use of a mixin is for vendor prefixes. Here's an example for transform.
  • 12. Extend/Inheritance This is one of the most useful features of Sass. Using @extend lets you share a set of CSS properties from one selector to another.
  • 13. Operators Doing math in your CSS is very helpful. Sass has a handful of standard math operators like +, -, *, /, and %.
  • 14. SASS AND MEDIA QUERIES SASS section.main { float: left; width: 65%; font-size: 16px; Line-height: 1.4; @media screen and (max-width: 800px) { float: none; width: auto; } @media screen and (max-width: 500px) { font-size: 12px; line-height: 1.4; } } CSS section.main { float: left; width: 65%; font-size: 16px; line-height: 1.4; } @media screen and (max-width: 800px) { section.main { float: none; width: auto; } } @media screen and (max-width: 500px) { section.main { font-size: 12px; line-height: 1.4; } }