SlideShare una empresa de Scribd logo
1 de 47
Descargar para leer sin conexión
@ROBINPOKORNY
BEAUTY
Future-Ready
into a
Ugly Old
How to Turn Your
CSS
Clean
$ git clone git@ :
Homepage
http://localhost:9001/home
Homepage
http://localhost:9001/home
Developer Tools
base.css:9
float: right;
background-
color: ;
<!DOCTYPE html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Homepage</title>
        <meta name="description" content="Just another demo">
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" href="css/normalize.css">
        <link rel="stylesheet" href="css/base.css">
    </head>
    <body>
        <h1>Hello, this is Robin’s demo site.</h1>
<p>
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
About us
http://localhost:9001/about-us
Blog
http://localhost:9001/blog
Contacts
http://localhost:9001/contacts
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
About us
http://localhost:9001/about-us
Blog
http://localhost:9001/blog
Contacts
http://localhost:9001/contacts
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
About us
http://localhost:9001/about-us
Blog
http://localhost:9001/blog
Contacts
http://localhost:9001/contacts
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
About us
http://localhost:9001/about-us
Blog
http://localhost:9001/blog
Contacts
http://localhost:9001/contacts
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
About us
http://localhost:9001/about-us
Blog
http://localhost:9001/blog
Contacts
http://localhost:9001/contacts
Homepage
http://localhost:9001/home
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap h1 { … }
#layout_content div.maincap h1.beta {
#layout_content .maincap .ghostcap
#box .banner:first-child a {
float: right;
background-color: ;
font-style: bold;
border-radius: 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.css 1,1 0%
About us
http://localhost:9001/about-us
Blog
http://localhost:9001/blog
Contacts
http://localhost:9001/contacts
2013
2005
1996
You do not
write CSS
for
yourself.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
index.html 1,1
HTML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1.css 1,1
CSS 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2.css 1,1
CSS 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
3.css 1,1
CSS 3
.intro div:nth-child(2) p:last-child
.sidebar .wrapper .design nav
paint out
Cascade makes it
a page.
easy
to
1
2
3
4
5
6
7
8
9
10
11
12
13
14
index.html 1,1
CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1.css 1,1
HTML 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2.css 1,1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
3.css 1,1
HTML 2
HTML 3
.sidebar .wrapper .design nav
btn btn-primary btn-lg
<div class="
…
</div>
">
CSS is a
pattern book
not a
crayon set.
OOCSS
@stubbornella
// Includes layout and typography
@import url('layout.less');
@import url('article.less');
@import url('navigation.less');
@import url('buttons.less');
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
base.less 1,1 0%
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap
h1 { … }
#layout_content div.maincap
h1.beta {
#layout_content .maincap
.ghostcap
#box .banner:first-child a {
float: right;
background-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
base.css 1,1
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap
h1 { … }
#layout_content div.maincap
h1.beta {
#layout_content .maincap
.ghostcap
#box .banner:first-child a {
float: right;
background-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
base.css 1,1
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap
h1 { … }
#layout_content div.maincap
h1.beta {
#layout_content .maincap
.ghostcap
#box .banner:first-child a {
float: right;
background-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
base.css 1,1
#header h2.logotype { … }
#header .logotype a { … }
#layout_content maincap { … }
#layout_content div.maincap
h1 { … }
#layout_content div.maincap
h1.beta {
#layout_content .maincap
.ghostcap
#box .banner:first-child a {
float: right;
background-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
base.css 1,1
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
NOW
FUTURE
CODEBASE
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
NOW
FUTURE
CODEBASE
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
NOW
FUTURE
CODEBASE
abcdefghijklmnopqrstuvwxyz IN 1 MIN
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
NOW
FUTURE
CODEBASE
It is OK not to be
perfect.
Criticism
good.is
~ @OliverJAsh
$ exit
User @robinpokorny <robin@medvedi.eu>
is now logged out.
Use utility hand to raise a question.

Más contenido relacionado

La actualidad más candente

Novedades de Front-end 2016 (CSS3, HTML5 y APIs Javascript)
Novedades de Front-end 2016 (CSS3, HTML5 y APIs Javascript)Novedades de Front-end 2016 (CSS3, HTML5 y APIs Javascript)
Novedades de Front-end 2016 (CSS3, HTML5 y APIs Javascript)Román Hernández
 
Middleman 一小時完成你的專案原形
Middleman 一小時完成你的專案原形Middleman 一小時完成你的專案原形
Middleman 一小時完成你的專案原形Even Wu
 
Xml version pakfaizal dot com free download
Xml version pakfaizal dot com free downloadXml version pakfaizal dot com free download
Xml version pakfaizal dot com free downloadFaisal Pak
 
Keynote Les 7
Keynote Les 7Keynote Les 7
Keynote Les 7hba.ict
 

La actualidad más candente (6)

Novedades de Front-end 2016 (CSS3, HTML5 y APIs Javascript)
Novedades de Front-end 2016 (CSS3, HTML5 y APIs Javascript)Novedades de Front-end 2016 (CSS3, HTML5 y APIs Javascript)
Novedades de Front-end 2016 (CSS3, HTML5 y APIs Javascript)
 
Middleman 一小時完成你的專案原形
Middleman 一小時完成你的專案原形Middleman 一小時完成你的專案原形
Middleman 一小時完成你的專案原形
 
thiết kế website bằng blogspot
thiết kế website bằng blogspotthiết kế website bằng blogspot
thiết kế website bằng blogspot
 
Johny see book update
Johny see book updateJohny see book update
Johny see book update
 
Xml version pakfaizal dot com free download
Xml version pakfaizal dot com free downloadXml version pakfaizal dot com free download
Xml version pakfaizal dot com free download
 
Keynote Les 7
Keynote Les 7Keynote Les 7
Keynote Les 7
 

Más de Robin Pokorny

Purifying React (with annotations)
Purifying React (with annotations)Purifying React (with annotations)
Purifying React (with annotations)Robin Pokorny
 
React, když odezní zamilovanost
React, když odezní zamilovanostReact, když odezní zamilovanost
React, když odezní zamilovanostRobin Pokorny
 
React a omyly jazyka CSS
React a omyly jazyka CSSReact a omyly jazyka CSS
React a omyly jazyka CSSRobin Pokorny
 
Co musí umět moderní „HTML kodér“
Co musí umět moderní „HTML kodér“Co musí umět moderní „HTML kodér“
Co musí umět moderní „HTML kodér“Robin Pokorny
 
Pokročilé responzivní obrázky
Pokročilé responzivní obrázkyPokročilé responzivní obrázky
Pokročilé responzivní obrázkyRobin Pokorny
 
O elementu picture v Ostravě
O elementu picture v OstravěO elementu picture v Ostravě
O elementu picture v OstravěRobin Pokorny
 
Jak nám responzivní web rozbil obrázky
Jak nám responzivní web rozbil obrázkyJak nám responzivní web rozbil obrázky
Jak nám responzivní web rozbil obrázkyRobin Pokorny
 
Organizace kódu v týmu
Organizace kódu v týmuOrganizace kódu v týmu
Organizace kódu v týmuRobin Pokorny
 
Thesis defendence presentation
Thesis defendence presentationThesis defendence presentation
Thesis defendence presentationRobin Pokorny
 
Tancuj, tancuj, konverguj
Tancuj, tancuj, konvergujTancuj, tancuj, konverguj
Tancuj, tancuj, konvergujRobin Pokorny
 

Más de Robin Pokorny (13)

15 months of AMP
15 months of AMP15 months of AMP
15 months of AMP
 
Purifying React (with annotations)
Purifying React (with annotations)Purifying React (with annotations)
Purifying React (with annotations)
 
React, když odezní zamilovanost
React, když odezní zamilovanostReact, když odezní zamilovanost
React, když odezní zamilovanost
 
React a omyly jazyka CSS
React a omyly jazyka CSSReact a omyly jazyka CSS
React a omyly jazyka CSS
 
React a CSS
React a CSSReact a CSS
React a CSS
 
Co musí umět moderní „HTML kodér“
Co musí umět moderní „HTML kodér“Co musí umět moderní „HTML kodér“
Co musí umět moderní „HTML kodér“
 
Pokročilé responzivní obrázky
Pokročilé responzivní obrázkyPokročilé responzivní obrázky
Pokročilé responzivní obrázky
 
O elementu picture v Ostravě
O elementu picture v OstravěO elementu picture v Ostravě
O elementu picture v Ostravě
 
Jak nám responzivní web rozbil obrázky
Jak nám responzivní web rozbil obrázkyJak nám responzivní web rozbil obrázky
Jak nám responzivní web rozbil obrázky
 
Organizace kódu v týmu
Organizace kódu v týmuOrganizace kódu v týmu
Organizace kódu v týmu
 
Thesis defendence presentation
Thesis defendence presentationThesis defendence presentation
Thesis defendence presentation
 
Tancuj, tancuj, konverguj
Tancuj, tancuj, konvergujTancuj, tancuj, konverguj
Tancuj, tancuj, konverguj
 
Představení eMAMS
Představení eMAMSPředstavení eMAMS
Představení eMAMS
 

How to Turn Your Ugly Old CSS into a Clean Future-Ready Beauty