metro4
Version:
The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style
124 lines (109 loc) • 5.24 kB
text/less
@import (once) "include/vars";
@import (once) "include/mixins";
@ordersCount: 24;
.generate-order(@ordersCount);
.generate-order(@j) when (@j > 0){
.order-@{j} {
order: @j;
}
.generate-order(@j - 1);
}
.flex-equal-items {
& > * {
flex: 1;
}
}
.flex-nowrap {flex-wrap: nowrap ;}
.flex-wrap {flex-wrap: wrap ;}
.flex-wrap-r {flex-wrap: wrap-reverse ;}
.flex-column {flex-direction: column ;}
.flex-column-r {flex-direction: column-reverse ;}
.flex-row {flex-direction: row ;}
.flex-row-r {flex-direction: row-reverse ;}
.flex-align-start {align-items: flex-start ;}
.flex-align-end {align-items: flex-end ;}
.flex-align-center {align-items: center ;}
.flex-align-stretch {align-items: stretch ;}
.flex-align-baseline {align-items: baseline ;}
.flex-self-start {align-self: flex-start ;}
.flex-self-end {align-self: flex-end ;}
.flex-self-center {align-self: center ;}
.flex-self-stretch {align-self: stretch ;}
.flex-self-baseline {align-self: baseline ;}
.flex-justify-start {justify-content: flex-start ;}
.flex-justify-end {justify-content: flex-end ;}
.flex-justify-center {justify-content: center ;}
.flex-justify-between {justify-content: space-between ;}
.flex-justify-around {justify-content: space-around ;}
.flex-content-start {align-content: flex-start ;}
.flex-content-end {align-content: flex-end ;}
.flex-content-center {align-content: center ;}
.flex-content-between {align-content: space-between ;}
.flex-content-around {align-content: space-around ;}
.flex-content-stretch {align-content: stretch ;}
.flex-no-shrink > * {flex-shrink: 0;}
.flex-shrink > * {flex-shrink: 1;}
.flex-no-grow > * {flex-grow: 0;}
.flex-grow > * {flex-grow: 1;}
.flex-no-shrink-self {flex-shrink: 0;}
.flex-shrink-self {flex-shrink: 1;}
.flex-no-grow-self {flex-grow: 0;}
.flex-grow-self {flex-grow: 1;}
.flex-right {margin-left: auto;}
.flex-left {margin-right: auto;}
.flex-top {margin-bottom: auto;}
.flex-bottom {margin-top: auto;}
.generate-flex-media-options(@mediaBreakpointListMobileLength);
.generate-flex-media-options(@name, @i: 1) when (@i <= @mediaBreakpointListMobileLength) {
@m: extract(@mediaBreakpointListMobile, @i);
@media screen and (min-width: @@m) {
.flex-nowrap-@{m} {flex-wrap: nowrap ;}
.flex-wrap-@{m} {flex-wrap: wrap ;}
.flex-wrap-r-@{m} {flex-wrap: wrap-reverse ;}
.flex-column-@{m} {flex-direction: column ;}
.flex-column-r-@{m} {flex-direction: column-reverse ;}
.flex-row-@{m} {flex-direction: row ;}
.flex-row-r-@{m} {flex-direction: row-reverse ;}
.flex-align-start-@{m} {align-items: flex-start ;}
.flex-align-end-@{m} {align-items: flex-end ;}
.flex-align-center-@{m} {align-items: center ;}
.flex-align-stretch-@{m} {align-items: stretch ;}
.flex-align-baseline-@{m} {align-items: baseline ;}
.flex-self-start-@{m} {align-self: flex-start ;}
.flex-self-end-@{m} {align-self: flex-end ;}
.flex-self-center-@{m} {align-self: center ;}
.flex-self-stretch-@{m} {align-self: stretch ;}
.flex-self-baseline-@{m} {align-self: baseline ;}
.flex-justify-start-@{m} {justify-content: flex-start ;}
.flex-justify-end-@{m} {justify-content: flex-end ;}
.flex-justify-center-@{m} {justify-content: center ;}
.flex-justify-between-@{m} {justify-content: space-between ;}
.flex-justify-around-@{m} {justify-content: space-around ;}
.flex-content-start-@{m} {align-content: flex-start ;}
.flex-content-end-@{m} {align-content: flex-end ;}
.flex-content-center-@{m} {align-content: center ;}
.flex-content-between-@{m} {align-content: space-between ;}
.flex-content-around-@{m} {align-content: space-around ;}
.flex-content-stretch-@{m} {align-content: stretch ;}
.flex-no-shrink-@{m} > * {flex-shrink: 0;}
.flex-shrink-@{m} > * {flex-shrink: 1;}
.flex-no-grow-@{m} > * {flex-grow: 0;}
.flex-grow-@{m} > * {flex-grow: 1;}
.flex-no-shrink-self-@{m} {flex-shrink: 0;}
.flex-shrink-self-@{m} {flex-shrink: 1;}
.flex-no-grow-self-@{m} {flex-grow: 0;}
.flex-grow-self-@{m} {flex-grow: 1;}
.flex-right-@{m} {margin-left: auto;}
.flex-left-@{m} {margin-right: auto;}
.flex-top-@{m} {margin-bottom: auto;}
.flex-bottom-@{m} {margin-top: auto;}
.generate-order(@ordersCount);
.generate-order(@j) when (@j > 0){
.order-@{m}-@{j} {
order: @j;
}
.generate-order(@j - 1);
}
}
.generate-flex-media-options(@name, @i + 1);
}