Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
2
150
Flexbox all the things
Kristian Andersen
October 28, 2015
Tweet
Share
More Decks by Kristian Andersen
See All by Kristian Andersen
Isomorphic Web Apps with React
ksmandersen
0
36
Static Websites with Gulp & AWS
ksmandersen
0
130
Practical MVVM
ksmandersen
0
210
Practical Swift
ksmandersen
1
200
Introduction to CocoaLumberjack
ksmandersen
0
110
Other Decks in Programming
See All in Programming
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
7.2k
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
6
2.1k
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.8k
チームをチームにするEM
hitode909
0
330
20 years of Symfony, what's next?
fabpot
2
360
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
110
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
160
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
330
開発に寄りそう自動テストの実現
goyoki
2
960
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
240
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
320
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Navigating Team Friction
lara
191
16k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Become a Pro
speakerdeck
PRO
31
5.7k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Typedesign – Prime Four
hannesfritz
42
2.9k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Mobile First: as difficult as doing things right
swwweet
225
10k
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