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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
要はバランスからの卒業 #yumemi_grow
kajitack
0
200
初めてのRubyKaigiはこう見えた
jellyfish700
0
290
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
450
デフォルト運用のCodeRabbit、1年で何が変わったか / How CodeRabbit Changed Our Code Review in 1 Year
bake0937
1
110
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
240
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
6
1.3k
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
780
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.3k
さぁV100、メモリをお食べ・・・
nilpe
0
110
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.4k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
210
Oxcを導入して開発体験が向上した話
yug1224
4
240
Featured
See All Featured
Optimizing for Happiness
mojombo
378
71k
Scaling GitHub
holman
464
140k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
190
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
44k
The Language of Interfaces
destraynor
162
26k
A Tale of Four Properties
chriscoyier
163
24k
Believing is Seeing
oripsolob
1
130
Speed Design
sergeychernyshev
33
1.8k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
410
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
The Limits of Empathy - UXLibs8
cassininazir
1
340
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