SlideShare une entreprise Scribd logo
1  sur  7
Télécharger pour lire hors ligne
Sass - Syntactically
          Awesome
        Stylesheets




Guilherme Cavalcanti
Purpose



• Sass makes CSS fun again. Sass is an
  extension of CSS3, adding nested
  rules, variables, mixins, selector
  inheritance, and more. It’s
  translated to well-formatted,
  standard CSS using the command
  line tool or a web-framework plugin.
Purpose




• CSS superset
 • Every valid CSS file is a valid SCSS
 • The other way is not true
Nesting


                                      1   /* line 1, ../sass/corners.scss   */
                                      2   #navbar {
                                      3     width: 80%;
                                      4     height: 23px;
 1 #navbar {
                                      5   }
 2   width: 80%;
                                      6   /* line 5, ../sass/corners.scss   */
 3   height: 23px;
                                      7   #navbar ul {
 4
                                      8     list-style-type: none;
 5   ul { list-style-type: none; }
                                      9   }
 6   li {
                                     10   /* line 6, ../sass/corners.scss   */
 7     float: left;
                                     11   #navbar li {
 8     a { font-weight: bold; }
                                     12     float: left;
 9   }
                                     13   }
10 }
                                     14   /* line 8, ../sass/corners.scss   */
                                     15   #navbar li a {
                                     16     font-weight: bold;
                                     17   }
Mixins



 1   /* line 7, ../sass/corners.scss */
 2   #navbar li {
 3     border-top-radius: 10px;           1 @mixin rounded($side, $radius: 10px) {
 4     -moz-border-radius-top: 10px;      2   border-#{$side}-radius: $radius;
 5     -webkit-border-top-radius: 10px;   3   -moz-border-radius-#{$side}: $radius;
 6   }                                    4   -webkit-border-#{$side}-radius: $radius;
 7                                        5 }
 8   /* line 8, ../sass/corners.scss */   6
 9   #navbar2 li {                        7 #navbar li { @include rounded(top); }
10     border-top-radius: 10px;
11     -moz-border-radius-top: 10px;
12     -webkit-border-top-radius: 10px;
13   }
Variables



                           1   /* line 7, ../sass/corners.scss */
1 $main-color: #ce4dd6;    2   #navbar li {
2                          3     border-top-radius: 10px;
3 a {                      4     -moz-border-radius-top: 10px;
4   color: $main-color;    5     -webkit-border-top-radius: 10px;
5 }                        6   }
                           7
                           8   /* line 8, ../sass/corners.scss */
                           9   #navbar2 li {
                          10     border-top-radius: 10px;
                          11     -moz-border-radius-top: 10px;
                          12     -webkit-border-top-radius: 10px;
                          13   }
Compass

1 @import "compass/css3/border-radius";
2
3 .simple { @include border-radius(4px, 4px); }


1 /* line 3, ../sass/corners.scss */
2 .simple {
3   -webkit-border-radius: 4px 4px;
4   -moz-border-radius: 4px / 4px;
5   -o-border-radius: 4px / 4px;
6   -ms-border-radius: 4px / 4px;
7   -khtml-border-radius: 4px / 4px;
8   border-radius: 4px / 4px;
9 }

Contenu connexe

Similaire à 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 tryingJames Cryer
 
Sass - Making CSS fun again.
Sass - Making CSS fun again.Sass - Making CSS fun again.
Sass - Making CSS fun again.Gabriel Neutzling
 
Using Sass - Building on CSS
Using Sass - Building on CSSUsing Sass - Building on CSS
Using Sass - Building on CSSSayanee Basu
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with SassRob Friesel
 
Curso CSS3 com Sass e Compass - Aula 01 - Introducão
Curso CSS3 com Sass e Compass - Aula 01 - IntroducãoCurso CSS3 com Sass e Compass - Aula 01 - Introducão
Curso CSS3 com Sass e Compass - Aula 01 - IntroducãoLoiane Groner
 
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 CompassClaudina Sarahe
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsKaelig Deloumeau-Prigent
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageKatsunori Tanaka
 
Organizing & Simplifying CSS [with Sass]
Organizing & Simplifying CSS [with Sass]Organizing & Simplifying CSS [with Sass]
Organizing & Simplifying CSS [with Sass]Matt Puchlerz
 
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)Adam Darowski
 
CSS with LESS for #jd13nl
CSS with LESS for #jd13nlCSS with LESS for #jd13nl
CSS with LESS for #jd13nlHans Kuijpers
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction SassZeeshan Ahmed
 
Joomla 3 templates and rtl
Joomla 3 templates and rtlJoomla 3 templates and rtl
Joomla 3 templates and rtlyairl
 

Similaire à Sass (20)

Css frameworks
Css frameworksCss frameworks
Css frameworks
 
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
 
Sass - Making CSS fun again.
Sass - Making CSS fun again.Sass - Making CSS fun again.
Sass - Making CSS fun again.
 
Theming and Sass
Theming and SassTheming and Sass
Theming and Sass
 
Using Sass - Building on CSS
Using Sass - Building on CSSUsing Sass - Building on CSS
Using Sass - Building on CSS
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
 
Curso CSS3 com Sass e Compass - Aula 01 - Introducão
Curso CSS3 com Sass e Compass - Aula 01 - IntroducãoCurso CSS3 com Sass e Compass - Aula 01 - Introducão
Curso CSS3 com Sass e Compass - Aula 01 - Introducão
 
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
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet language
 
FCIP SASS Talk
FCIP SASS TalkFCIP SASS Talk
FCIP SASS Talk
 
CSS Extenders
CSS ExtendersCSS Extenders
CSS Extenders
 
Sencha Touch
Sencha TouchSencha Touch
Sencha Touch
 
Organizing & Simplifying CSS [with Sass]
Organizing & Simplifying CSS [with Sass]Organizing & Simplifying CSS [with Sass]
Organizing & Simplifying CSS [with Sass]
 
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
 
Less css
Less cssLess css
Less css
 
CSS with LESS for #jd13nl
CSS with LESS for #jd13nlCSS with LESS for #jd13nl
CSS with LESS for #jd13nl
 
Sass compass
Sass compassSass compass
Sass compass
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction Sass
 
Joomla 3 templates and rtl
Joomla 3 templates and rtlJoomla 3 templates and rtl
Joomla 3 templates and rtl
 

Plus de Guilherme

Where Does the Fat Goes? Utilizando Form Objects Para Simplificar seu Código
Where Does the Fat Goes? Utilizando Form Objects Para Simplificar seu CódigoWhere Does the Fat Goes? Utilizando Form Objects Para Simplificar seu Código
Where Does the Fat Goes? Utilizando Form Objects Para Simplificar seu CódigoGuilherme
 
Descobrindo APIs REST
Descobrindo APIs RESTDescobrindo APIs REST
Descobrindo APIs RESTGuilherme
 
Redu walled garden
Redu walled gardenRedu walled garden
Redu walled gardenGuilherme
 
Desafio de crescer
Desafio de crescerDesafio de crescer
Desafio de crescerGuilherme
 
Consumindo APIs REST com Ruby
Consumindo APIs REST com RubyConsumindo APIs REST com Ruby
Consumindo APIs REST com RubyGuilherme
 
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com RailsAplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com RailsGuilherme
 
Aplicações sociais usando a plataforma Redu
Aplicações sociais usando a plataforma ReduAplicações sociais usando a plataforma Redu
Aplicações sociais usando a plataforma ReduGuilherme
 
Introdução aos aplicativos tipo canvas
Introdução aos aplicativos tipo canvasIntrodução aos aplicativos tipo canvas
Introdução aos aplicativos tipo canvasGuilherme
 
FLOSS and Startups
FLOSS and StartupsFLOSS and Startups
FLOSS and StartupsGuilherme
 
Ruby 101 && Coding Dojo
Ruby 101 && Coding DojoRuby 101 && Coding Dojo
Ruby 101 && Coding DojoGuilherme
 
Dojo: Sass - Syntactically Awesome Stylesheets
Dojo: Sass - Syntactically Awesome StylesheetsDojo: Sass - Syntactically Awesome Stylesheets
Dojo: Sass - Syntactically Awesome StylesheetsGuilherme
 
CSS first steps
CSS first stepsCSS first steps
CSS first stepsGuilherme
 
How does the Web work?
How does the Web work?How does the Web work?
How does the Web work?Guilherme
 
0 introducao padroes_web
0 introducao padroes_web0 introducao padroes_web
0 introducao padroes_webGuilherme
 
Plano de Pesquisa - Redu Respostas
Plano de Pesquisa - Redu RespostasPlano de Pesquisa - Redu Respostas
Plano de Pesquisa - Redu RespostasGuilherme
 
Desevolvimento Web Client-side - AJAX
Desevolvimento Web Client-side - AJAX Desevolvimento Web Client-side - AJAX
Desevolvimento Web Client-side - AJAX Guilherme
 
Desevolvimento Web Client-side - jQuery
Desevolvimento Web Client-side - jQueryDesevolvimento Web Client-side - jQuery
Desevolvimento Web Client-side - jQueryGuilherme
 
3 padroes-web-intro-javascript
3 padroes-web-intro-javascript3 padroes-web-intro-javascript
3 padroes-web-intro-javascriptGuilherme
 
Desevolvimento Web Client-side - CSS
Desevolvimento Web Client-side - CSSDesevolvimento Web Client-side - CSS
Desevolvimento Web Client-side - CSSGuilherme
 
Desevolvimento Web Client-side - HTML
Desevolvimento Web Client-side - HTMLDesevolvimento Web Client-side - HTML
Desevolvimento Web Client-side - HTMLGuilherme
 

Plus de Guilherme (20)

Where Does the Fat Goes? Utilizando Form Objects Para Simplificar seu Código
Where Does the Fat Goes? Utilizando Form Objects Para Simplificar seu CódigoWhere Does the Fat Goes? Utilizando Form Objects Para Simplificar seu Código
Where Does the Fat Goes? Utilizando Form Objects Para Simplificar seu Código
 
Descobrindo APIs REST
Descobrindo APIs RESTDescobrindo APIs REST
Descobrindo APIs REST
 
Redu walled garden
Redu walled gardenRedu walled garden
Redu walled garden
 
Desafio de crescer
Desafio de crescerDesafio de crescer
Desafio de crescer
 
Consumindo APIs REST com Ruby
Consumindo APIs REST com RubyConsumindo APIs REST com Ruby
Consumindo APIs REST com Ruby
 
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com RailsAplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
 
Aplicações sociais usando a plataforma Redu
Aplicações sociais usando a plataforma ReduAplicações sociais usando a plataforma Redu
Aplicações sociais usando a plataforma Redu
 
Introdução aos aplicativos tipo canvas
Introdução aos aplicativos tipo canvasIntrodução aos aplicativos tipo canvas
Introdução aos aplicativos tipo canvas
 
FLOSS and Startups
FLOSS and StartupsFLOSS and Startups
FLOSS and Startups
 
Ruby 101 && Coding Dojo
Ruby 101 && Coding DojoRuby 101 && Coding Dojo
Ruby 101 && Coding Dojo
 
Dojo: Sass - Syntactically Awesome Stylesheets
Dojo: Sass - Syntactically Awesome StylesheetsDojo: Sass - Syntactically Awesome Stylesheets
Dojo: Sass - Syntactically Awesome Stylesheets
 
CSS first steps
CSS first stepsCSS first steps
CSS first steps
 
How does the Web work?
How does the Web work?How does the Web work?
How does the Web work?
 
0 introducao padroes_web
0 introducao padroes_web0 introducao padroes_web
0 introducao padroes_web
 
Plano de Pesquisa - Redu Respostas
Plano de Pesquisa - Redu RespostasPlano de Pesquisa - Redu Respostas
Plano de Pesquisa - Redu Respostas
 
Desevolvimento Web Client-side - AJAX
Desevolvimento Web Client-side - AJAX Desevolvimento Web Client-side - AJAX
Desevolvimento Web Client-side - AJAX
 
Desevolvimento Web Client-side - jQuery
Desevolvimento Web Client-side - jQueryDesevolvimento Web Client-side - jQuery
Desevolvimento Web Client-side - jQuery
 
3 padroes-web-intro-javascript
3 padroes-web-intro-javascript3 padroes-web-intro-javascript
3 padroes-web-intro-javascript
 
Desevolvimento Web Client-side - CSS
Desevolvimento Web Client-side - CSSDesevolvimento Web Client-side - CSS
Desevolvimento Web Client-side - CSS
 
Desevolvimento Web Client-side - HTML
Desevolvimento Web Client-side - HTMLDesevolvimento Web Client-side - HTML
Desevolvimento Web Client-side - HTML
 

Dernier

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
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
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 

Dernier (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.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!
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 

Sass

  • 1. Sass - Syntactically Awesome Stylesheets Guilherme Cavalcanti
  • 2. Purpose • Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.
  • 3. Purpose • CSS superset • Every valid CSS file is a valid SCSS • The other way is not true
  • 4. Nesting 1 /* line 1, ../sass/corners.scss */ 2 #navbar { 3 width: 80%; 4 height: 23px; 1 #navbar { 5 } 2 width: 80%; 6 /* line 5, ../sass/corners.scss */ 3 height: 23px; 7 #navbar ul { 4 8 list-style-type: none; 5 ul { list-style-type: none; } 9 } 6 li { 10 /* line 6, ../sass/corners.scss */ 7 float: left; 11 #navbar li { 8 a { font-weight: bold; } 12 float: left; 9 } 13 } 10 } 14 /* line 8, ../sass/corners.scss */ 15 #navbar li a { 16 font-weight: bold; 17 }
  • 5. Mixins 1 /* line 7, ../sass/corners.scss */ 2 #navbar li { 3 border-top-radius: 10px; 1 @mixin rounded($side, $radius: 10px) { 4 -moz-border-radius-top: 10px; 2 border-#{$side}-radius: $radius; 5 -webkit-border-top-radius: 10px; 3 -moz-border-radius-#{$side}: $radius; 6 } 4 -webkit-border-#{$side}-radius: $radius; 7 5 } 8 /* line 8, ../sass/corners.scss */ 6 9 #navbar2 li { 7 #navbar li { @include rounded(top); } 10 border-top-radius: 10px; 11 -moz-border-radius-top: 10px; 12 -webkit-border-top-radius: 10px; 13 }
  • 6. Variables 1 /* line 7, ../sass/corners.scss */ 1 $main-color: #ce4dd6; 2 #navbar li { 2 3 border-top-radius: 10px; 3 a { 4 -moz-border-radius-top: 10px; 4 color: $main-color; 5 -webkit-border-top-radius: 10px; 5 } 6 } 7 8 /* line 8, ../sass/corners.scss */ 9 #navbar2 li { 10 border-top-radius: 10px; 11 -moz-border-radius-top: 10px; 12 -webkit-border-top-radius: 10px; 13 }
  • 7. Compass 1 @import "compass/css3/border-radius"; 2 3 .simple { @include border-radius(4px, 4px); } 1 /* line 3, ../sass/corners.scss */ 2 .simple { 3 -webkit-border-radius: 4px 4px; 4 -moz-border-radius: 4px / 4px; 5 -o-border-radius: 4px / 4px; 6 -ms-border-radius: 4px / 4px; 7 -khtml-border-radius: 4px / 4px; 8 border-radius: 4px / 4px; 9 }