Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CSS3: Layouts for the Multi-screen World
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Peter Gasston
November 28, 2012
Programming
1.1k
9
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CSS3: Layouts for the Multi-screen World
Talk given at Future of Web Design, Prague, 28 Nov 2012. #fowa #fowd
Peter Gasston
November 28, 2012
More Decks by Peter Gasston
See All by Peter Gasston
People Don’t Change
stopsatgreen
0
210
Your Reality Here
stopsatgreen
0
130
Growing Up, Getting Serious - #SotB6
stopsatgreen
1
390
Growing Up, Getting Serious
stopsatgreen
0
120
Surveying the Landscape — November 2016
stopsatgreen
1
210
Surveying the Landscape - Fronteers
stopsatgreen
2
530
The Web vs. The Browser
stopsatgreen
0
230
Surveying the Landscape Sept. 2016
stopsatgreen
1
470
Surveying the Landscape
stopsatgreen
4
920
Other Decks in Programming
See All in Programming
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
620
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
170
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
3Dシーンの圧縮
fadis
1
770
net-httpのHTTP/2対応について
naruse
0
480
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
110
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
140
AIで効率化できた業務・日常
ochtum
0
130
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
250
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
4.5k
Contextとはなにか
chiroruxx
1
320
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
250
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Embracing the Ebb and Flow
colly
88
5.1k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
How to build a perfect <img>
jonoalderson
1
5.6k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Designing for Timeless Needs
cassininazir
1
250
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
430
What's in a price? How to price your products and services
michaelherold
247
13k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Transcript
CSS3: Layouts for the Multi-screen World
Peter Gasston @stopsatgreen
1. The web has changed 2. Our tools are outdated
What is CSS3 going to do about it?
The web has changed
None
By Anna Debenham: http://www.flickr.com/photos/anna_debenham/8190771122/
http://www.thinkwithgoogle.com/insights/featured/new-multi-screen-world-insight/
None
1633 320x480 768x1024
Device-centric development
Media Queries
@media screen {} @media screen and (min-width: 800px) {} @media
(orientation: portrait) {} Media Queries
width device-width orientation aspect-ratio device-aspect-ratio Media Queries
@media (min-resolution: 1.5dppx) {} Media Queries
@media (max-width: 480px) { ... @media (orientation: portrait) { ...
} } Media Queries
script pointer hover luminosity (Possible) Media Queries
<meta name="viewport" content="width=500, initial-scale=1, maximum-scale=2"> Device Adaptation
Device Adaptation @viewport { initial-scale: 1; maximum-scale: 2; width: 500px;
}
Device Adaptation @viewport { width: device-width; } @media (max-device-width: 420px)
{ @viewport { width: 500px; } }
Our tools are outdated
None
None
• <table> • float: left HTML & CSS1
• position: absolute • display: inline-block • display: table CSS2
None
The Three Stages of RWD
New layout methods
Multi-columns article { column-count: 3; } article { column-width: 20em;
}
None
None
A B .b { flow-from: 'foo'; } foo Regions .a
{ flow-into: 'foo'; }
B C D .b, .c, .d { flow-from: 'foo'; }
foo Regions
Flexbox
Flexbox .parent { display: flex; } .child { width: 30%;
} .child { flex: 1; }
Flexbox A B .a { flex: 2; } .b {
flex: 1; } A B .parent { flex-direction: column; } .a { flex: 2; } .b { flex: 1; }
Flexbox .parent { align-items: center; justify-content: center; } .parent {
flex-direction: column; } .a { order: 2; } .b { order: 1; } A B
Sod this, let's live code!
None
Grid Layout .parent { display: grid; grid-definition-columns: 1fr 1fr 2fr;
} .parent { grid-definition-columns: 1fr 1fr 2fr; grid-definition-rows: 10em auto 40px; }
Grid Layout A B .child { grid-column-position: 2; grid-row-position: 2;
} .a { grid-column: 2 2; } .b { grid-row-span: 3; }
None
.child { position: absolute; wrap-flow: both; } Exclusions
None
.child { shape-outside: circle(50%,50%,400px); } Shaped Exclusions
None
.child { shape-inside: circle(50%,50%,400px); } Shaped Exclusions
Conclusion
1. The web is everywhere
2. Web design is constrained by the tools we have
3. Better tools are on the way
4. Let's make beautiful websites that work everywhere
Konec. * Some of the CSS properties shown in this
talk are experimental and subject to change. Always check http://caniuse.com and http://html5please.com for latest implementation status.