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
Flexbox all the things
Search
Kristian Andersen
October 28, 2015
Programming
160
2
Share
Flexbox all the things
Kristian Andersen
October 28, 2015
More Decks by Kristian Andersen
See All by Kristian Andersen
Isomorphic Web Apps with React
ksmandersen
0
45
Static Websites with Gulp & AWS
ksmandersen
0
130
Practical MVVM
ksmandersen
0
220
Practical Swift
ksmandersen
1
210
Introduction to CocoaLumberjack
ksmandersen
0
120
Other Decks in Programming
See All in Programming
Oxcを導入して開発体験が向上した話
yug1224
4
240
Inside Stream API
skrb
1
250
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.3k
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.2k
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
160
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
210
誰も頼んでない機能を出荷した話
zekutax
0
150
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1.6k
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
1.5k
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
380
New "Type" system on PicoRuby
pocke
1
310
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
3.7k
Featured
See All Featured
A Soul's Torment
seathinner
6
2.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
280
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
200
Designing for humans not robots
tammielis
254
26k
Evolving SEO for Evolving Search Engines
ryanjones
0
210
Building a Scalable Design System with Sketch
lauravandoore
463
34k
エンジニアに許された特別な時間の終わり
watany
107
240k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
710
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Transcript
FLEXBOX ALL THE THINGS
Clearfix <div class="items"> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div
class="clearfix"></div> </div>
Clearfix v2 .clearfix:after { content: ""; display: table; clear: both;
}
Q: Why did the web designer drown? A: She didn’t
know if she should float:left or float:right.
display: flex;
W3C CSS Flexible Box Layout Module Level 1 3rd rev,
September 2012
None
Gracefull degeration & Fallbacks → Polyfill with Flexie (Flexie, still
old syntax) → New Polyfill in the works (Reflexie) → Fallback to float's
Let's get started
Concepts → Flex Containers → Flex Items
Flex Containers display: flex; display: inline-flex;
Flex Lines Items are positioned along a line inside a
flex container
Container Properties
Flex Direction flex-direction: row;
Flex Direction flex-direction: row-reverse;
Flex Direction flex-direction: column;
Flex Wrap flex-wrap: nowrap; flex-wrap: wrap;
Justify content Align items in the main axis
Justify content justify-content: flex-start; justify-content: flex-end;
Justify content justify-content: center;
Justify content justify-content: space-between; justify-content: space-around;
Align items Aligning items in the cross axis
Align items align-items: stretch; align-items: center;
Align items align-items: flex-start; align-items: flex-end;
Align items align-items: baseline;
Align content Align lines within a flex container
Align content
Align content
Align content
Item Properties
Flex Grow
Flex Shrink
Align self
Flex shorthand flex: none | auto | [ <flex-grow> <flex-shrink>?
|| <flex-basis> ];
Let's try it out!
None