Workshop: Flexbox 101

A presentation at DC Digital Experiences Meetup in August 2015 in Washington, DC, USA by Ben Hong

Slide 1

Slide 1

Flexbox 101 Benjamin Hong UX Developer @bencodezen

Slide 2

Slide 2

Tonight’s Agenda ✓ Flex What? ✓ Interactive Tutorial: Flexbox ✓ Final Thoughts ✓ Q&A

Slide 3

Slide 3

Flex what?

Slide 4

Slide 4

Common Layouts • What are common techniques people use to lay out their webpage? • Blocks & Inline-Blocks • Float • Positioning • Media Queries • Tables

Slide 5

Slide 5

Flexbox Flexbox is a “new” flexible and intelligent layout that was created to provide a more efficient way to build designs that can react to the ever growing number of screen sizes.

Slide 6

Slide 6

Key Terminology • flex-container • main-axis • flex-item • cross-axis

Slide 7

Slide 7

Flexbox Anatomy flex-container flex-item main-axis flex-item cross-axis flex-item

Slide 8

Slide 8

Interactive tutorial http://codepen.io/collection/AWvMoQ/

Slide 9

Slide 9

final thoughts

Slide 10

Slide 10

using flexbox Flexbox is simple to learn and use, so the complexities lay in how it is implemented across your designs.

Slide 11

Slide 11

browser support http://caniuse.com/#feat=flexbox

Slide 12

Slide 12

Code prefixing http://pleeease.io/play/

Slide 13

Slide 13

Additional Resources • A Complete Guide to Flexbox by CSS Tricks https://css-tricks.com/snippets/css/a-guide-to-flexbox/ • What the Flexbox? by Wes Bos http://flexbox.io • A Visual Guide to CSS3 Flexbox Properties by Dimitar Stojanov https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties • Laying Out a Flexible Future for Web Design with Flexbox by Ben Gremillion http://www.smashingmagazine.com/2015/08/flexible-future-for-web-designwith-flexbox/

Slide 14

Slide 14

Q&A

Slide 15

Slide 15

Thank You! If you have any additional questions, feel free to reach out to me @bencodezen!