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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kristian Andersen
October 28, 2015
Programming
2
160
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
40
Static Websites with Gulp & AWS
ksmandersen
0
130
Practical MVVM
ksmandersen
0
220
Practical Swift
ksmandersen
1
210
Introduction to CocoaLumberjack
ksmandersen
0
110
Other Decks in Programming
See All in Programming
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
520
SourceGeneratorのマーカー属性問題について
htkym
0
140
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
190
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
130
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
550
TipKitTips
ktcryomm
0
150
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
320
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
200
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
2
180
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
150
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
200
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
150
Featured
See All Featured
Deep Space Network (abreviated)
tonyrice
0
86
The Cult of Friendly URLs
andyhume
79
6.8k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
110
A Soul's Torment
seathinner
5
2.4k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
660
Large-scale JavaScript Application Architecture
addyosmani
515
110k
[SF Ruby Conf 2025] Rails X
palkan
2
810
Typedesign – Prime Four
hannesfritz
42
3k
Visualization
eitanlees
150
17k
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