SlideShare a Scribd company logo
WARSZAWA 2017.11.30
BACKENDOWCU, 

ZOSTAŃ CSS NINJA!
KIM JESTEM?
BACKENDOWCU, ZOSTAŃ CSS NINJA!
ANNA MATYSIAK
Web Developer
Programista / Web Designer
Frontend Developer
(Python + HTML/CSS/JS)
(PHP+ HTML/CSS/JS)
amatysiak88@gmail.com
O CZYM BĘDZIE PREZENTACJA?
BACKENDOWCU, ZOSTAŃ CSS NINJA!
CSS1: 1996 Håkon Wium Lie oraz Bert Bos publikują specyfikację (68 stron formatu A4)
CSS2: 1998 do autorów dołączają Chris Lilley i Ian Jacobs (480 stron)
PODZIAŁ NA ODDZIELNE SPECYFIKACJE/MODUŁY
‣ LEVEL 3: moduły rozwijające funkcje już istniejące w specyfikacji CSS 2.1

(np Selectors, CSS Text, CSS Color, CSS Values and Units)
‣ LEVEL 1: moduły z całkowicie nowymi koncepcjami

(CSS Transforms, Filter Effects, CSS Flexible Box Layout, CSS Grid Layout)
HISTORIA CSS
BACKENDOWCU, ZOSTAŃ CSS NINJA!
DRY?
DOBRE PRAKTYKI
„Don’t Repeat Yourself (DRY)”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
DOBRE PRAKTYKI
„Don’t Repeat Yourself (DRY)”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
SOLID?
SOLID
BACKENDOWCU, ZOSTAŃ CSS NINJA!
SOLID
S: Single Responsibility Principle
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Klasa powinna mieć tylko jedną odpowiedzialność
SOLID
O: Open/Closed Principle
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Klasa powinna być otwarta na rozszerzenia i zamknięta na modyfikacje
SOLID
L: Liskov Substitution Principle
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Funkcje które używają wskaźników lub referencji do klas bazowych, muszą być 

w stanie używać również obiektów klas dziedziczących po klasach bazowych, bez
dokładnej znajomości tych obiektów
SOLID
L: Liskov Substitution Principle
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Klasa rozszerzająca inną nie powinna zmieniać zachowania klasy bazowej
SOLID
I: Interface Segregation Principle
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Wiele dedykowanych interfejsów jest lepsze niż jeden ogólny.
SOLID
I: Interface Segregation Principle
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Wiele dedykowanych klas jest lepsze niż jedna bardzo ogólna
SOLID
D: Dependency Inversion Principle
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Wysokopoziomowe moduły nie powinny zależeć od modułów niskopoziomowych 

- zależności między nimi powinny wynikać z abstrakcji.
SOLID
D: Dependency Inversion Principle
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Zmiany styli klas podrzędnych nie powinny mieć wpływu na style klas nadrzędnych
METODYKI
BACKENDOWCU, ZOSTAŃ CSS NINJA!
METODYKI
METODYKI
OOCSS - Object Oriented CSS
BACKENDOWCU, ZOSTAŃ CSS NINJA!
FORM
INPUT
INPUT
INPUT
BUTTON
‣ Modularny i zorientowany
obiektowo CSS

‣ Najpierw klasy globalne, a
potem bardziej
wyspecjalizowane

‣ Rozdzielone style dla
kontenerów i zawartości
METODYKI
OOCSS - Object Oriented CSS
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Podział styli na 5 grup:
‣ bazowe
‣ layout (prefix l-)
‣ moduły
‣ stan (prefix is-)
‣ temat

METODYKI
SMACSS - Scalable and Modular Architecture for CSS
BACKENDOWCU, ZOSTAŃ CSS NINJA!
‣ Modularny kod CSS
‣ Elementy dzielimy na:
‣ bloki (np formularz)
‣ elementy (np input)
‣ modyfikatory (np input do wpisania hasła)
METODYKI
BEM - Block Element Modifier
BACKENDOWCU, ZOSTAŃ CSS NINJA!
‣ Klasy CSS niezależne od treści i reużywalne

‣ Najczęściej jednolinijkowe, odpowiadające tylko za jedno ustawienie



METODYKI
ACSS - Atomic CSS
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY
PREPROCESORY
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY: SASS
ZAGNIEŻDŻANIE
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY: SASS
DZIEDZICZENIE
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY: SASS
DZIEDZICZENIE
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY: SASS
MIXINY
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY: SASS
ZMIENNE
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY: SASS
PĘTLE
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY: SASS
I WIELE WIĘCEJ :)
http://sass-lang.com/
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY: SASS
Czy stosować preprocesory?
BACKENDOWCU, ZOSTAŃ CSS NINJA!
PREPROCESORY: SASS
Czy stosować preprocesory?
BACKENDOWCU, ZOSTAŃ CSS NINJA!
TO ZALEŻY :)
CO SIĘ ZMIENIŁO?
https://icomoon.io
CO SIĘ ZMIENIŁO?
„Grafiki dodawaj jako font”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Kształty dodawane jako style a nie grafiki 

https://css-tricks.com/examples/ShapesOfCSS/
DOBRE PRAKTYKI
„Kształty dodawaj jako style a nie grafiki”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
CO SIĘ ZMIENIŁO?
Gradienty dodawane jako style a nie grafiki

http://www.colorzilla.com/gradient-editor/
DOBRE PRAKTYKI
„Gradienty dodawaj jako style a nie grafiki”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
CO SIĘ ZMIENIŁO?
DOBRE PRAKTYKI
„Uważnie używaj prefixów”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
CO SIĘ ZMIENIŁO?
https://github.com/airbnb/css
DOBRE PRAKTYKI
„Stosuj Style Guide”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
https://google.github.io/styleguide/htmlcssguide.html
https://github.com/necolas/idiomatic-css
CO SIĘ ZMIENIŁO?
DOBRE PRAKTYKI
„Stosuj funkcje z CSS”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
CO SIĘ ZMIENIŁO?
DOBRE PRAKTYKI
„Stosuj zmienne z CSS”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
CO SIĘ ZMIENIŁO?
DOBRE PRAKTYKI
„Niech Twój kod będzie RWD”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Stosuj jednostki względne, np vh, vw
Stosuj max-width, zamiast width
Stosuj rozsądnie media query
Stosuj podejście mobile first
CO SIĘ ZMIENIŁO?
DOBRE PRAKTYKI
„Wykorzystuj Flexbox/Grid”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
https://codepen.io/justd/pen/yydezN
http://the-echoplex.net/flexyboxes
CO SIĘ ZMIENIŁO?
DOBRE PRAKTYKI
„Wykorzystuj Flexbox/Grid”
BACKENDOWCU, ZOSTAŃ CSS NINJA!
CO SIĘ ZMIENIŁO?
CSS: MOŻLIWOŚCI
BACKENDOWCU, ZOSTAŃ CSS NINJA!
CO SIĘ ZMIENIŁO?
https://codepen.io/fbrz/pen/vlrnd
FRAMEWORKI
BACKENDOWCU, ZOSTAŃ CSS NINJA!
FRAMEWORKI
JAK POSZERZAĆ SWOJĄ 

WIEDZĘ Z CSS?
JAK SIĘ UCZYĆ CSS?
Konferencje/meetupy
BACKENDOWCU, ZOSTAŃ CSS NINJA!
Książki/artykuły/blogi
BACKENDOWCU, ZOSTAŃ CSS NINJA!
JAK SIĘ UCZYĆ CSS?
Książki/artykuły/blogi
BACKENDOWCU, ZOSTAŃ CSS NINJA!
JAK SIĘ UCZYĆ CSS?
https://developer.mozilla.org/en-US/docs/Web/CSS
https://css-tricks.com
Pair programming
BACKENDOWCU, ZOSTAŃ CSS NINJA!
JAK SIĘ UCZYĆ CSS?
Koduj, koduj, koduj :)
BACKENDOWCU, ZOSTAŃ CSS NINJA!
JAK SIĘ UCZYĆ CSS?
DZIĘKI ZA UWAGĘ :)
PYTANIA?
DZIĘKI ZA UWAGĘ :)
https://cdn-live.warthunder.com/uploads/04/341aac6c8d96869ea77ff05462846571176a90_lq/shuriken_decal_43fd5e27c058385b1802252e85de3a94.png

http://www.samirai.io/static/ninja2.png

http://w3widgets.com/responsive-slider/img/css3.png

https://cdn0.froala.com/assets/editor/docs/server/meta-social/php-e8c6425acd65e1cbc012639ad25598c7.png

https://media2.pl/g/0/17390.jpg

https://p6.zdassets.com/hc/settings_assets/45204/200010643/XsnskCu4omD9TaZfWipACQ-u98p2aVReMjBDAxUc7JwfQ-logo.png

https://qph.ec.quoracdn.net/main-qimg-70e6c274d3f17c8c2d196e06f510a64b

http://www.commitstrip.com/wp-content/uploads/2014/12/Strip-Vengeance-de-codeur-650-finalenglish.jpg

http://www.jogospintar.com.br/cb/files/pi/nt/pinteninjaverdelego-5526660228c0b.png

https://www.tenstickers.co.uk/wall-stickers/img/preview/mr-miyagi-karate-kid-movie-decal-5458.png

https://sites.google.com/site/unclebobconsultingllc/_/rsrc/1506631763576/home/Screen%20Shot%202017-09-28%20at%203.44.41%20PM.jpg

https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Achtung.svg/180px-Achtung.svg.png

https://ilikekillnerds.com/wp-content/uploads/2015/11/css-structure.jpg

http://gianfreda.net/wp-content/uploads/2016/04/5-lego-ninja-character-coloring-pages.png

https://d30y9cdsu7xlg0.cloudfront.net/png/104228-200.png

http://www.jogospintar.com.br/cb/files/pi/nt/pinteotartaruganinjaleonardo-5411acbd23aeb.png

http://www.jogospintar.com.br/cb/files/pi/nt/pinteastartarugasninja-56cda2cc17a7d.png

https://i.pinimg.com/originals/f8/f2/1b/f8f21ba6fb65bed7e71871431cc566bf.png

https://mdn.mozillademos.org/files/3739/flex_terms.png

https://academy.hsoub.com/uploads/monthly_2017_09/06_subitems.png.cad66c5dca58cd53d252ae7d3d4eba78.png

http://www.jogospintar.com.br/cb/files/pi/nt/pinteatartaruganinjarafael-5411b30d0846b.png

http://holdgold.biz/img/js-ninja.png

https://2017.cssconf.eu/assets/images/open-graph-image.png

https://d1ll4kxfi4ofbm.cloudfront.net/file/event/155540/logo/logo3_155540_20170619160255.png

https://secure.meetupstatic.com/photos/event/a/e/a/b/600_464144715.jpeg

https://secure.meetupstatic.com/photos/event/3/f/a/2/600_460396290.jpeg

https://static01.helion.com.pl/global/okladki/326x466/1e6dfd9f70dc3a8ca4a2422b3cd83030,scss47.jpg

https://upload.wikimedia.org/wikipedia/commons/6/69/Pair_Programming_3.jpg

http://www.map2app.com/wp-content/uploads/2013/09/code-ninja.png

https://www.appsshoppy.com/images/ninja-why-us.png

https://inquiryninja.files.wordpress.com/2015/05/inquiry-ninja.png
BIBLIOGRAFIA
https://www.nafrontendzie.pl/metodyki-css-1-oocss 

https://www.nafrontendzie.pl/metodyki-css-2-bem 

https://www.nafrontendzie.pl/metodyki-css-3-smacss 

https://www.nafrontendzie.pl/metodyki-css-5-atomic-css-acss 

http://blog.millermedeiros.com/solid-css/

https://pl.wikipedia.org/wiki/SOLID_(programowanie_obiektowe)

http://ferrante.pl/books/html/

CSS bez tajemnic. 47 sekretów kreatywnego projektanta - Lea Verou
GRAFIKI

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Backendowcu, zostań CSS ninja - czyli jak odnaleźć się w świecie nowoczesnego kodu CSS