Why CSS Was Invented (Håkon Wium Lie)

futureinsights 1,140 views 81 slides May 26, 2015
Slide 1
Slide 1 of 81
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81

About This Presentation

Taken from Future of Web Design (#FOWD), London 2015 Conference. http://futureofwebdesign.com/london-2015

In the beginning, web pages didn't say anything about fonts, colours or layout. Cascading Style Sheets (CSS) was invented to change this, and today all web pages use CSS. How did this come ...


Slide Content

Why CSS was invented
Håkon Wium Lie
[email protected]

HTML
<h1>Headline</h1>
•simple structure
•universal semantics
•media-independent
•open standard

CSS
h1 {
font-size: 14px;
color: red;
}
•simple
•presentational
•media-dependent
•open standard

HTML & CSS
<h1>Headline</h1>
h1 {
font-size: 14px;
color: red;
}
•simple
•open standards

CSS properties

Some text

font-size: 40px
font-size

font-style: italic
font-style

font-family: serif
font-family

background: #fe7
background

border: 0.1em solid black
border

border: 0.1em solid #486
border-color

border: 0.1em dotted #486
border-style

border: 0.3em inset #46F
border-width

border: 0.5em outset #F46
border-width

text-shadow: 10px 10px black
text-shadow

text-shadow: 5px 5px 5px #F79
text-shadow

text-shadow: 0px 0px 20px orange; color:
white
text-shadow

CSS3

border-radius: 40px
border-radius

border-radius: 40px
border-radius

border-radius: 150px / 50px
border-radius

border-radius: 60px 0 / 60px 0;
border-radius

CSS3 transitions

<img src=coat-of-arm.svg>
img { transition: 1s }
img:hover { transform: rotate(-360deg) }

Webfonts

Microsoft's Core fonts
Andale MonoArial
Comic Sans MS
Courier NewGeorgia
ImpactTimes New Roman
Trebuchet MSVerdana

@import url(http://www.princexml.com/fonts/steffmann/
index.css);
font-family: Angel
Angel

font-family: Becker Inline
Becker Inline

font-family: Broadcast Titling
Broadcast
Titling

font-family: Cardiff
Cardiff

font-family: Direction
Direction

From: "Siebrand Mazeland (WMF)" <[email protected]>
Date: Wed, 14 Dec 2011 18:49:19 +0100
Sender: [email protected]
To: [email protected], [email protected]
Subject: [Wikitech-l] Report on WebFonts deployment
On Monday December 12 at 18:00 UTC we deployed the extension
WebFonts[1] to 40 wikis in 11 Indic languages and Wikimedia Incubator
-- all wikis in Assamese, Bengali, Gujarati, Hindi, Kannada, Marathi,
Nepali, Oriya, (Eastern) Punjabi, Sankrit and Telugu have WebFonts
now. WebFonts was not deployed on Malayalam and Tamil projects. The
reason for this was that community members had requested us not to. We
are confident that in time, the communities will request that WebFonts
is enabled on their projects.

Testing

Opera

Apps

Multicolumn layout

Books

body {
font: 14pt / 1.4 "Adobe Caslon Pro", serif;
font-variant: opentype(dlig, onum);
hyphens: auto;
text-replace:
"s" "\017F" /* replace s with long s, which looks like f */
"\017Ff" "sf" /* revert change where s appears before f */
"\017Fi" "si" /* revert change where s appears before i */
"\017F\20" "s\20" /* revert change at end of word */
"\017F\0A" "s\20" /* revert change at end of word, where newline follows */
"\017F\200B" "s\20" /* revert change at end of word, where zero width space follows */
"\017F," "s," /* revert change at end of word, where comma follows */
"\017F;" "s;" /* revert change at end of word, where semicolon follow */
"\017F:" "s:" /* revert change at end of word, where colon follows */
"\017F." "s." /* revert change at end of word, where period follows */
":" "\2008:"; /* add punctuation space before colon */
}

How long will the web last?

500 years!