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
41 lines (33 loc) • 1.4 kB
text/less
@import (once) "include/vars";
@import (once) "include/mixins";
.w-auto {width: auto;}
.h-auto {height: auto;}
each(@mediaBreakpointListMobile, {
.w-@{value} {width: @@value;}
})
each(@percents, {
.h-vh-@{value} {height: unit(@value, vh);}
.h-vw-@{value} {height: unit(@value, vw);}
.w-vh-@{value} {width: unit(@value, vh);}
.w-vw-@{value} {width: unit(@value, vw);}
.h-@{value} {height: unit(@value, %);}
.w-@{value} {width: unit(@value, %);}
.mh-@{value} {max-height: unit(@value, %);}
.mw-@{value} {max-width: unit(@value, %);}
})
each(@mediaBreakpointListMobile, .(@m) {
@media screen and (min-width: @@m) {
.w-auto-@{m} {width: auto;}
.h-auto-@{m} {width: auto;}
each(@percents, .(@p) {
.h-vh-@{p}-@{m} {height: unit(@p, vh);}
.h-vw-@{p}-@{m} {height: unit(@p, vw);}
.w-vh-@{p}-@{m} {width: unit(@p, vh);}
.w-vw-@{p}-@{m} {width: unit(@p, vw);}
.h-@{p}-@{m} {height: unit(@p, %);}
.w-@{p}-@{m} {width: unit(@p, %);}
.mh-@{p}-@{m} {max-height: unit(@p, %);}
.mw-@{p}-@{m} {max-width: unit(@p, %);}
})
}
})