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
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
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
370
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.6k
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.6k
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.4k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
210
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
160
Ruby x Terminal
a_matsuda
7
580
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
170
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
200
CSC307 Lecture 14
javiergs
PRO
0
450
Fundamentals of Software Engineering In the Age of AI
therealdanvega
0
160
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
230
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
A better future with KSS
kneath
240
18k
The Language of Interfaces
destraynor
162
26k
Side Projects
sachag
455
43k
The browser strikes back
jonoalderson
0
760
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
How to make the Groovebox
asonas
2
2k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
The SEO Collaboration Effect
kristinabergwall1
0
380
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
200
GraphQLとの向き合い方2022年版
quramy
50
14k
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