
/* Flexible box model classes */
/* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */

/* This file is a compatability layer.  It allows the usage of flexible box 
model layouts accross multiple browsers, including older browsers.  The newest,
universal implementation of the flexible box model is used when available (see
`Modern browsers` comments below).  Browsers that are known to implement this 
new spec completely include:

    Firefox 28.0+
    Chrome 29.0+
    Internet Explorer 11+ 
    Opera 17.0+

Browsers not listed, including Safari, are supported via the styling under the
`Old browsers` comments below.
*/


.hbox() {
    /* Old browsers */
    display: -webkit-box;
    -webkit-box-orient: horizontal;
    -webkit-box-align: stretch;

    display: -moz-box;
    -moz-box-orient: horizontal;
    -moz-box-align: stretch;

    display: box;
    box-orient: horizontal;
    box-align: stretch;

    /* Modern browsers */
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.vbox() {
    /* Old browsers */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-align: stretch;

    display: -moz-box;
    -moz-box-orient: vertical;
    -moz-box-align: stretch;

    display: box;
    box-orient: vertical;
    box-align: stretch;

    /* Modern browsers */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.box-flex0() {
    /* Old browsers */
    -webkit-box-flex: 0;
    -moz-box-flex: 0;
    box-flex: 0;
    
    /* Modern browsers */
    flex: none;
    width: auto;
}

.box-flex1() {
    /* Old browsers */
    -webkit-box-flex: 1;
    -moz-box-flex: 1;
    box-flex: 1;

    /* Modern browsers */
    flex: 1;
}

.box-flex() {
    /* Old browsers */
    .box-flex1();
}

.box-flex2() {
    /* Old browsers */
    -webkit-box-flex: 2;
    -moz-box-flex: 2;
    box-flex: 2;

    /* Modern browsers */
    flex: 2;
}

.align-start() {
    /* Old browsers */
    -webkit-box-align: start;
    -moz-box-align: start;
    box-align: start;
    
    /* Modern browsers */
    align-items: flex-start;
}

