ryanve / flexboxes

CSS flexbox framework with pure flexbox grid ability
https://ryanve.github.io/flexboxes
BSD Zero Clause License
31 stars 4 forks source link
css flex flexbox functional-css grid grid-system grids layout layouts

flexboxes

flexboxes is a functional flexbox library and pure flexbox grid system designed for prototyping and production.

setup

Download flexboxes.css and load stylesheet

<link rel="stylesheet" href="https://github.com/ryanve/flexboxes/blob/master/flexboxes.css">

classes

display

flex-flow

flex-direction

flex-wrap

margin

Distribute free space via auto margins

order

align-items

align-self

justify-content

align-content

flex

Shorthand classes supply common presets

Compose with grow shrink basis

flex-grow

flex-shrink

flex-basis

area

Some flexbugs are solvable via min or max width or height

Consider area.css for more

@media

Responsive orientation classes are available for flex-flow and display classes. Append @portrait or @landscape to these classes to limit them to that orientation. This affords layouts that flow or wrap differently based on viewport orientation or layouts that only flex in one orientation. Try the #fitting example in both portrait and landscape to see how it adapts. You can do this on a phone by rotating the phone or on a computer by resizing the browser window.

class="flex-block flow-west@portrait flow-north@landscape"

portrait

landscape

examples

ryanve.github.io/flexboxes