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
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
29
Static Websites with Gulp & AWS
ksmandersen
0
120
Practical MVVM
ksmandersen
0
210
Practical Swift
ksmandersen
1
200
Introduction to CocoaLumberjack
ksmandersen
0
100
Other Decks in Programming
See All in Programming
地域ITコミュニティの活性化とAWSに移行してみた話
yuukis
0
230
新しいPHP拡張モジュールインストール方法「PHP Installer for Extensions (PIE)」を使ってみよう!
cocoeyes02
0
340
Being an ethical software engineer
xgouchet
PRO
0
210
Unlock the Potential of Swift Code Generation
rockname
0
240
海外のアプリで見かけたかっこいいTransitionを真似てみる
shogotakasaki
1
160
Making TCPSocket.new "Happy"!
coe401_
1
130
Agentic Applications with Symfony
el_stoffel
2
270
Kamal 2 – Get Out of the Cloud
aleksandrov
1
180
ミリしらMCP勉強会
watany
4
740
小田原でみんなで一句詠みたいな #phpcon_odawara
stefafafan
0
320
Vibe Codingをせずに Clineを使っている
watany
17
6.1k
Chrome Extension Techniques from Hell
moznion
1
160
Featured
See All Featured
Fireside Chat
paigeccino
37
3.4k
Code Reviewing Like a Champion
maltzj
522
39k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
178
53k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
9
740
Embracing the Ebb and Flow
colly
85
4.6k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Navigating Team Friction
lara
184
15k
Writing Fast Ruby
sferik
628
61k
Product Roadmaps are Hard
iamctodd
PRO
52
11k
Facilitating Awesome Meetings
lara
54
6.3k
Designing Experiences People Love
moore
141
24k
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