Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flexbox introduction

Flexbox introduction

These are the slides used as support by @snapeuh in our last technical workshop at Reputation VIP.

Reputation VIP

February 23, 2016
Tweet

More Decks by Reputation VIP

Other Decks in Programming

Transcript

  1. My goal in doing Flexbox [...] was to replace all

    the crazy float/table/inline-block/etc hacks that I’d had to master as a webdev. All that crap was (a) stupid, (b) hard to remember, and (c) limited in a million annoying ways, so I wanted to make a few well-done layout modules that solved the same problems in simple, easy-to-use, and complete ways.
  2. .parent { flex-direction: row; /* Other values */ flex-direction: row-reverse;

    flex-direction: column flex-direction: column-reverse; }
  3. .parent { justify-content: flex-start; /* Other values */ justify-content: flex-end;

    justify-content: center; justify-content: space-between; justify-content: space-around; }
  4. .parent { align-items: stretch; /* Other values */ align-items: flex-start;

    align-items: flex-end; align-items: center; align-items: baseline; }
  5. .parent { align-content: stretch; /* Other values */ align-content: flex-start;

    align-content: flex-end; align-content: center; align-content: space-between; align-content: space-around; }
  6. .child { align-self: auto; /* Other values */ align-self: flex-start;

    align-self: flex-end; align-self: center; align-self: baseline; align-self: stretch; }