Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Flexbox all the things
Search
Kristian Andersen
October 28, 2015
Programming
170
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
52
Static Websites with Gulp & AWS
ksmandersen
0
140
Practical MVVM
ksmandersen
0
230
Practical Swift
ksmandersen
1
220
Introduction to CocoaLumberjack
ksmandersen
0
120
Other Decks in Programming
See All in Programming
Java 27新機能 / Java 27 new features
kishida
2
140
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
220
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
490
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
170
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
370
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
320
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
550
App Intentsのビルドプロセスを支える技術
kntkymt
0
370
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
110
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
170
アクセシビリティから考える情報設計
high_g_engineer
0
380
XHTMLが残したもの
yosuke_furukawa
PRO
2
800
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Color Theory Basics | Prateek | Gurzu
gurzu
1
470
Technical Leadership for Architectural Decision Making
baasie
3
570
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
Producing Creativity
orderedlist
PRO
348
41k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Done Done
chrislema
186
16k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Building AI with AI
inesmontani
PRO
1
1.2k
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