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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Peter Gasston
November 28, 2012
Programming
1.1k
9
Share
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
200
Your Reality Here
stopsatgreen
0
130
Growing Up, Getting Serious - #SotB6
stopsatgreen
1
380
Growing Up, Getting Serious
stopsatgreen
0
120
Surveying the Landscape — November 2016
stopsatgreen
1
200
Surveying the Landscape - Fronteers
stopsatgreen
2
520
The Web vs. The Browser
stopsatgreen
0
230
Surveying the Landscape Sept. 2016
stopsatgreen
1
470
Surveying the Landscape
stopsatgreen
4
910
Other Decks in Programming
See All in Programming
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
150
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
590
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1k
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
3
270
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
200
Inside Stream API
skrb
1
160
CSC307 Lecture 17
javiergs
PRO
0
240
3Dシーンの圧縮
fadis
1
210
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1k
LLM Plugin for Node-REDの利用方法と開発について
404background
0
110
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
200
Featured
See All Featured
Visualization
eitanlees
151
17k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
460
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
So, you think you're a good person
axbom
PRO
2
2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
220
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.