Suche senden
Hochladen
CSS architecture: How To Write Clean & Scalable Code
•
2 gefällt mir
•
1,443 views
Netguru
Folgen
Slides by Mateusz Czajka from @netguru, originally created for a Frontownia meet-up.
Weniger lesen
Mehr lesen
Technologie
Diashow-Anzeige
Melden
Teilen
Diashow-Anzeige
Melden
Teilen
1 von 25
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Code
Code
Fran Orton
The Ring programming language version 1.8 book - Part 12 of 202
The Ring programming language version 1.8 book - Part 12 of 202
Mahmoud Samir Fayed
The Ring programming language version 1.9 book - Part 14 of 210
The Ring programming language version 1.9 book - Part 14 of 210
Mahmoud Samir Fayed
AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)
James Titcumb
「Frama-Cによるソースコード検証」 (mzp)
「Frama-Cによるソースコード検証」 (mzp)
Hiroki Mizuno
WebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open web
pjcozzi
Funcion matematica
Funcion matematica
Jhonny Wladimir Peñaloza Cabello
Why Would A Programmer Fall In Love With SPA?
Why Would A Programmer Fall In Love With SPA?
Netguru
Empfohlen
Code
Code
Fran Orton
The Ring programming language version 1.8 book - Part 12 of 202
The Ring programming language version 1.8 book - Part 12 of 202
Mahmoud Samir Fayed
The Ring programming language version 1.9 book - Part 14 of 210
The Ring programming language version 1.9 book - Part 14 of 210
Mahmoud Samir Fayed
AST + Better Reflection (PHP Benelux 2016 Unconference)
AST + Better Reflection (PHP Benelux 2016 Unconference)
James Titcumb
「Frama-Cによるソースコード検証」 (mzp)
「Frama-Cによるソースコード検証」 (mzp)
Hiroki Mizuno
WebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open web
pjcozzi
Funcion matematica
Funcion matematica
Jhonny Wladimir Peñaloza Cabello
Why Would A Programmer Fall In Love With SPA?
Why Would A Programmer Fall In Love With SPA?
Netguru
Paradygmaty Programowania: Czy Istnieje Najlepszy?
Paradygmaty Programowania: Czy Istnieje Najlepszy?
Netguru
Why no one is looking for rockstar programmers (updated version)
Why no one is looking for rockstar programmers (updated version)
Wiktor Schmidt
Everyday Rails
Everyday Rails
Netguru
Hidden Gems in Swift
Hidden Gems in Swift
Netguru
Czy Project Manger Musi Być Osobą Techniczną?
Czy Project Manger Musi Być Osobą Techniczną?
Netguru
Agile Retrospectives
Agile Retrospectives
Netguru
Z 50 do 100 w ciągu roku Jak rekrutować w IT?
Z 50 do 100 w ciągu roku Jak rekrutować w IT?
Netguru
KISS Augmented Reality
KISS Augmented Reality
Netguru
Defining DSL (Domain Specific Language) using Ruby
Defining DSL (Domain Specific Language) using Ruby
Netguru
Communication With Clients Throughout The Project
Communication With Clients Throughout The Project
Netguru
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
Biznes 2.0
From Birds To Bugs: Testowanie Z Pasją
From Birds To Bugs: Testowanie Z Pasją
Netguru
Blogi w firmie
Blogi w firmie
Netguru
Ruby Rails Overview
Ruby Rails Overview
Netguru
How To Build Great Relationships With Your Clients
How To Build Great Relationships With Your Clients
Netguru
Payments integration: Stripe & Taxamo
Payments integration: Stripe & Taxamo
Netguru
Bluespec Tutorial Helloworld
Bluespec Tutorial Helloworld
Stanley Ho
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
Rachel Andrew
Aaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security Teams
centralohioissa
Advanced Topics On Sql Injection Protection
Advanced Topics On Sql Injection Protection
amiable_indian
Cipher block modes
Cipher block modes
Joshua Thijssen
Hello, Is That FreeSWITCH? Then We're Coming to Check You!
Hello, Is That FreeSWITCH? Then We're Coming to Check You!
PVS-Studio
Weitere ähnliche Inhalte
Andere mochten auch
Paradygmaty Programowania: Czy Istnieje Najlepszy?
Paradygmaty Programowania: Czy Istnieje Najlepszy?
Netguru
Why no one is looking for rockstar programmers (updated version)
Why no one is looking for rockstar programmers (updated version)
Wiktor Schmidt
Everyday Rails
Everyday Rails
Netguru
Hidden Gems in Swift
Hidden Gems in Swift
Netguru
Czy Project Manger Musi Być Osobą Techniczną?
Czy Project Manger Musi Być Osobą Techniczną?
Netguru
Agile Retrospectives
Agile Retrospectives
Netguru
Z 50 do 100 w ciągu roku Jak rekrutować w IT?
Z 50 do 100 w ciągu roku Jak rekrutować w IT?
Netguru
KISS Augmented Reality
KISS Augmented Reality
Netguru
Defining DSL (Domain Specific Language) using Ruby
Defining DSL (Domain Specific Language) using Ruby
Netguru
Communication With Clients Throughout The Project
Communication With Clients Throughout The Project
Netguru
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
Biznes 2.0
From Birds To Bugs: Testowanie Z Pasją
From Birds To Bugs: Testowanie Z Pasją
Netguru
Blogi w firmie
Blogi w firmie
Netguru
Ruby Rails Overview
Ruby Rails Overview
Netguru
How To Build Great Relationships With Your Clients
How To Build Great Relationships With Your Clients
Netguru
Payments integration: Stripe & Taxamo
Payments integration: Stripe & Taxamo
Netguru
Andere mochten auch
(16)
Paradygmaty Programowania: Czy Istnieje Najlepszy?
Paradygmaty Programowania: Czy Istnieje Najlepszy?
Why no one is looking for rockstar programmers (updated version)
Why no one is looking for rockstar programmers (updated version)
Everyday Rails
Everyday Rails
Hidden Gems in Swift
Hidden Gems in Swift
Czy Project Manger Musi Być Osobą Techniczną?
Czy Project Manger Musi Być Osobą Techniczną?
Agile Retrospectives
Agile Retrospectives
Z 50 do 100 w ciągu roku Jak rekrutować w IT?
Z 50 do 100 w ciągu roku Jak rekrutować w IT?
KISS Augmented Reality
KISS Augmented Reality
Defining DSL (Domain Specific Language) using Ruby
Defining DSL (Domain Specific Language) using Ruby
Communication With Clients Throughout The Project
Communication With Clients Throughout The Project
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
Rozwijanie firmy web developerskiej - Kuba Filipowski, Wiktor Schmidt, Netguru
From Birds To Bugs: Testowanie Z Pasją
From Birds To Bugs: Testowanie Z Pasją
Blogi w firmie
Blogi w firmie
Ruby Rails Overview
Ruby Rails Overview
How To Build Great Relationships With Your Clients
How To Build Great Relationships With Your Clients
Payments integration: Stripe & Taxamo
Payments integration: Stripe & Taxamo
Ähnlich wie CSS architecture: How To Write Clean & Scalable Code
Bluespec Tutorial Helloworld
Bluespec Tutorial Helloworld
Stanley Ho
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
Rachel Andrew
Aaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security Teams
centralohioissa
Advanced Topics On Sql Injection Protection
Advanced Topics On Sql Injection Protection
amiable_indian
Cipher block modes
Cipher block modes
Joshua Thijssen
Hello, Is That FreeSWITCH? Then We're Coming to Check You!
Hello, Is That FreeSWITCH? Then We're Coming to Check You!
PVS-Studio
Building a fast web experience [beta]
Building a fast web experience [beta]
Kirk Yamamoto
Sq lite python tutorial sqlite programming in python
Sq lite python tutorial sqlite programming in python
Martin Soria
фабрика Blockly
фабрика Blockly
Евгений Белов
Dbms lab Manual
Dbms lab Manual
Vivek Kumar Sinha
Cristiano Betta (Betta Works) - Lightweight Libraries with Rollup, Riot and R...
Cristiano Betta (Betta Works) - Lightweight Libraries with Rollup, Riot and R...
Techsylvania
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
Андрей Новиков
vgg.pdf
vgg.pdf
BhautikDaxini1
[CB20] DeClang: Anti-hacking compiler by Mengyuan Wan
[CB20] DeClang: Anti-hacking compiler by Mengyuan Wan
CODE BLUE
Fpga creating counter with external clock
Fpga creating counter with external clock
Politeknik Elektronika Negeri Surabaya
Writing Metasploit Plugins
Writing Metasploit Plugins
amiable_indian
Checking the Cross-Platform Framework Cocos2d-x
Checking the Cross-Platform Framework Cocos2d-x
Andrey Karpov
Silicon scanners cambridge report
Silicon scanners cambridge report
Liberteks
cscript_controller.pdf
cscript_controller.pdf
VcTrn1
Star bed 2018.07.19
Star bed 2018.07.19
Ruo Ando
Ähnlich wie CSS architecture: How To Write Clean & Scalable Code
(20)
Bluespec Tutorial Helloworld
Bluespec Tutorial Helloworld
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
Aaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security Teams
Advanced Topics On Sql Injection Protection
Advanced Topics On Sql Injection Protection
Cipher block modes
Cipher block modes
Hello, Is That FreeSWITCH? Then We're Coming to Check You!
Hello, Is That FreeSWITCH? Then We're Coming to Check You!
Building a fast web experience [beta]
Building a fast web experience [beta]
Sq lite python tutorial sqlite programming in python
Sq lite python tutorial sqlite programming in python
фабрика Blockly
фабрика Blockly
Dbms lab Manual
Dbms lab Manual
Cristiano Betta (Betta Works) - Lightweight Libraries with Rollup, Riot and R...
Cristiano Betta (Betta Works) - Lightweight Libraries with Rollup, Riot and R...
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
vgg.pdf
vgg.pdf
[CB20] DeClang: Anti-hacking compiler by Mengyuan Wan
[CB20] DeClang: Anti-hacking compiler by Mengyuan Wan
Fpga creating counter with external clock
Fpga creating counter with external clock
Writing Metasploit Plugins
Writing Metasploit Plugins
Checking the Cross-Platform Framework Cocos2d-x
Checking the Cross-Platform Framework Cocos2d-x
Silicon scanners cambridge report
Silicon scanners cambridge report
cscript_controller.pdf
cscript_controller.pdf
Star bed 2018.07.19
Star bed 2018.07.19
Mehr von Netguru
Estimation myths debunked
Estimation myths debunked
Netguru
Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?
Netguru
Ruby On Rails Intro
Ruby On Rails Intro
Netguru
Perfect Project Read Me (in a few steps)
Perfect Project Read Me (in a few steps)
Netguru
The Git Basics
The Git Basics
Netguru
From nil to guru: intro to Ruby on Rails
From nil to guru: intro to Ruby on Rails
Netguru
Working With Teams Across The Borders
Working With Teams Across The Borders
Netguru
Front-End Dev Tools
Front-End Dev Tools
Netguru
OOScss Architecture For Rails Apps
OOScss Architecture For Rails Apps
Netguru
Coffeescript presentation DublinJS
Coffeescript presentation DublinJS
Netguru
Developing a webdevelopment company
Developing a webdevelopment company
Netguru
Barcamps in Europe
Barcamps in Europe
Netguru
Wiktor Schmidt, RuPy 2008, Caching in Rails
Wiktor Schmidt, RuPy 2008, Caching in Rails
Netguru
Barcamp #5 - API
Barcamp #5 - API
Netguru
Barcamp #5 - Mikrocelebryci
Barcamp #5 - Mikrocelebryci
Netguru
Mehr von Netguru
(15)
Estimation myths debunked
Estimation myths debunked
Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?
Ruby On Rails Intro
Ruby On Rails Intro
Perfect Project Read Me (in a few steps)
Perfect Project Read Me (in a few steps)
The Git Basics
The Git Basics
From nil to guru: intro to Ruby on Rails
From nil to guru: intro to Ruby on Rails
Working With Teams Across The Borders
Working With Teams Across The Borders
Front-End Dev Tools
Front-End Dev Tools
OOScss Architecture For Rails Apps
OOScss Architecture For Rails Apps
Coffeescript presentation DublinJS
Coffeescript presentation DublinJS
Developing a webdevelopment company
Developing a webdevelopment company
Barcamps in Europe
Barcamps in Europe
Wiktor Schmidt, RuPy 2008, Caching in Rails
Wiktor Schmidt, RuPy 2008, Caching in Rails
Barcamp #5 - API
Barcamp #5 - API
Barcamp #5 - Mikrocelebryci
Barcamp #5 - Mikrocelebryci
Kürzlich hochgeladen
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
The Digital Insurer
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Evaluating the top large language models.pdf
Evaluating the top large language models.pdf
ChristopherTHyatt
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
Kürzlich hochgeladen
(20)
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Evaluating the top large language models.pdf
Evaluating the top large language models.pdf
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
CSS architecture: How To Write Clean & Scalable Code
1.
HOWTOWRITECLEAN&SCALABLECODE CSSARCHITECTURE .mat.czajka@gmail.com /czajkovsky MateuszCzajka-seniordev@netguru.co
2.
IT’SCSSWITHSUPERPOWERS USEPREPROCESSORS 0.
3.
ANDBECONSISTENTABOUTIT DEFINEASTYLEGUIDE 1.
4.
DEFINEASTYLEGUIDESCSSLINT .pill-box { &__icon{ display: block; border:
1px solid $primary-color; } } .pill-box { &__icon{ display: block; border: 1px solid $primary-color; } } 2 of 5 errors: SpaceBeforeBrace: Opening curly `{` should be preceded by one space, Line 38, Column 8
5.
DEFINEASTYLEGUIDEHOUND + =SCSSLINT
6.
THATYOUNEEDTOSUPPORT DETERMINEBROWSERS 2.
7.
DETERMINEBROWSERSAUTOPREFIXER // in code a
{ display: flex; } // output a { display: -webkit-box; display: -webkit-flex; display: -moz-box; display: -ms-flexbox; display: flex }
8.
INTOSMALLPIECES DIVIDEYOURCODE 3.
9.
ASMANYASITMAKESSENSE USEVARIABLES 4.
10.
USEVARIABLESBASICS // colors $primary-color: #4391d7; //
font-sizes $fs-1: 12px; $fs-2: 14px; // font-families $ff-open-sans:$ff-open-sans: 'Open Sans', sans-serif; // font-weights $fw-bold: 700;
11.
USEVARIABLESZINDEXES // view/component .settings-modal { //
... z-index: $z-index-settings-modal; } .avatar-popover { // ... z-index: $z-index-avatar-popover; }
12.
USEVARIABLESZINDEXES // _z-index-variables.scss $z-index-1: 1000; $z-index-2:
2000; // ... $z-index-9: 9000; // ... $z-index-settings-modal:$z-index-settings-modal: $z-index-5; $z-index-avatar-popover: $z-index-6;
13.
ITREALLYHELPSTOKEEPYOURCODEDRY USEMIXINS&EXTENDS 5.
14.
USEMIXINS&EXTENDSMIXINS // Sass .box { @include
absolute(top 5px left 10px); @include sizing(100% 50px); } // CSS .box.box { position: absolute; top: 5px; left: 10px; width: 100%; height: 50px; }
15.
USEMIXINS&EXTENDSEXTENDS // Sass %error { background:
$error-color; } .error { @extend %error; border-width: 1px; &--important { @extend %error; border-width: 3px; } } // CSS .error, .error--important { background: #f00; } .error { border-width: 1px; } .error--important { border-width: 3px; }
16.
THINKABOUTRETINAUSERS USEVECTORS 6.
17.
BUTUSEITTHESMARTWAY USEAFRAMEWORK 7.
18.
USEAFRAMEWORKSTRUCTURE framework ├── _components.scss ├── _overrides.scss ├──
_variables.scss └── overrides └── _framework-overrides-go-here.scss
19.
USEAFRAMEWORKCOMPONENTS // framework/_components.scss // Core
CSS @import "bootstrap/scaffolding"; @import "bootstrap/type"; // @import "bootstrap/code"; @import "bootstrap/grid"; // @import "bootstrap/tables";// @import "bootstrap/tables"; @import "bootstrap/forms"; // @import "bootstrap/buttons"; // ...
20.
USEFRAMEWORKVARIABLES // variables from
package/GEM $gray-base: #eee !default; $gray-darker: darken($gray-base, 10%) !default; // etc... // framework/_variables.scss (overrides) // $gray-base: #eee !default; $gray-darker:$gray-darker: darken($gray-base, 20%); // etc...
21.
USEAFRAMEWORKOVERRIDES // framework/_overrides.scss // Core
CSS // @import "overrides/scaffolding"; // @import "overrides/type"; // @import "overrides/code"; @import "overrides/grid"; // @import "overrides/tables";// @import "overrides/tables"; @import "overrides/forms"; // @import "overrides/buttons"; // ...
22.
STRUCTUREANDORDER THERESULT
23.
THERESULTSTRUCTURE ├── application.scss ├── components │
└── _your-custom-components-go-here.scss ├── views │ └── _your-view-based-styles-go-here.scss ├── framework │ ├──│ ├── _components.scss │ ├── _overrides.scss │ ├── _variables.scss │ └── overrides │ └── _framework-overrides-go-here.scss ├── settings │ ├── _z-index-variables.scss │ ├──│ ├── _breakpoint-variables.scss │ └── _custom-variables.scss └── utilities ├── _functions.scss ├── _mixins.scss ├── _shared.scss └── _typography.scss
24.
THERESULTSTRUCTURE @import 'settings/z-index-variables'; @import 'settings/variables'; @import
'framework/variables'; @import 'framework/components'; @import 'settings/breakpoint-variables'; @import 'utilities/functions'; @import@import 'utilities/mixins'; @import 'utilities/shared'; @import 'utilities/typography'; @import 'framework/overrides'; @import 'components/first-component'; // more components @import 'views/home'; // more views// more views
25.
Q&A THANKYOU .mat.czajka@gmail.com /czajkovsky MateuszCzajka-seniordev@netguru.co
Jetzt herunterladen