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
332 lines (288 loc) • 7.44 kB
text/less
@import (once) "include/vars";
@import (once) "include/mixins";
.fixed-top, .fixed-bottom {
position: fixed;
left: 0;
right: 0;
width: 100%;
}
.fixed-top {
top: 0;
bottom: auto;
}
.fixed-bottom {
top: auto;
bottom: 0;
}
.pos-relative {position: relative ;}
.pos-absolute {position: absolute ;}
.pos-static {position: static ;}
.pos-fixed {position: fixed ;}
.put-n {
right: auto ;
bottom: auto ;
left: 50% ;
top: 0 ;
.translateX(-50%);
.translateY(-100%);
}
.put-nw {
right: auto ;
bottom: auto ;
left: 0 ;
top: 0 ;
.translateY(-100%);
}
.put-ne {
left: auto ;
bottom: auto ;
top: 0 ;
right: 0 ;
.translateY(-100%);
}
.put-wn {
bottom: auto ;
right: auto ;
top: 0 ;
left: 0 ;
.translateX(-100%);
}
.put-w {
bottom: auto ;
right: auto ;
top: 50% ;
left: 0 ;
.translateX(-100%);
.translateY(-50%);
}
.put-ws {
top: auto ;
right: auto ;
bottom: 0 ;
left: 0 ;
.translateX(-100%);
}
.put-en {
bottom: auto ;
left: auto ;
top: 0 ;
right: 0 ;
.translateX(100%);
}
.put-e {
bottom: auto ;
left: auto ;
top: 50% ;
right: 0 ;
.translateX(100%);
.translateY(-50%);
}
.put-es {
top: auto ;
left: auto ;
bottom: 0 ;
right: 0 ;
.translateX(100%);
}
.put-s {
bottom: auto ;
right: auto ;
top: 100% ;
left: 0 ;
}
.put-sw {
bottom: auto ;
right: auto ;
top: 100% ;
left: 50% ;
.translateX(-50%);
}
.put-se {
bottom: auto ;
left: auto ;
top: 100% ;
right: 0 ;
}
.put-left {left: 0 ; right: auto ;}
.put-right {left: auto ; right: 0 ;}
.pos-top-left {
top: 0 ;
left: 0 ;
right: auto ;
bottom: auto ;
}
.pos-top-center {
top: 0 ;
left: 50% ;
right: auto ;
bottom: auto ;
.translateX(-50%);
}
.pos-top-right {
right: 0 ;
top: 0 ;
left: auto ;
bottom: auto ;
}
.pos-bottom-left {
top: auto ;
right: auto ;
left: 0 ;
bottom: 0 ;
}
.pos-bottom-center {
top: auto ;
left: 50% ;
bottom: 0 ;
right: auto ;
.translateX(-50%);
}
.pos-bottom-right {
bottom: 0 ;
right: 0 ;
top: auto ;
left: auto ;
}
.pos-left-center {
left: 0 ;
top: 50% ;
bottom: auto ;
right: auto ;
.translateY(-50%);
}
.pos-right-center {
right: 0;
top: 50%;
bottom: auto;
left: auto;
.translateY(-50%);
}
.pos-center {
top: 50% ;
left: 50% ;
bottom: auto ;
right: auto ;
.translateX(-50%);
.translateY(-50%);
}
.z-absolute {z-index: @zindex-absolute ;}
.z-dropdown {z-index: @zindex-dropdown ;}
.z-sticky {z-index: @zindex-sticky ;}
.z-fixed {z-index: @zindex-fixed ;}
.z-modal-backdrop {z-index: @zindex-modal-backdrop ;}
.z-modal {z-index: @zindex-modal ;}
.z-popover {z-index: @zindex-popover ;}
.z-tooltip {z-index: @zindex-tooltip ;}
.z-top {z-index: @zindex-top ;}
.z-notify {z-index: @zindex-notify ;}
.z-charms {z-index: @zindex-charms ;}
.z-overlay {z-index: @zindex-overlay ;}
.z-fullscreen {z-index: @zindex-fullscreen ;}
.z-1 {z-index: 1 ;}
.z-2 {z-index: 2 ;}
.z-3 {z-index: 3 ;}
.z-4 {z-index: 4 ;}
.z-5 {z-index: 5 ;}
.z-6 {z-index: 6 ;}
.z-7 {z-index: 7 ;}
.z-8 {z-index: 8 ;}
.z-9 {z-index: 9 ;}
.z-10 {z-index: 10 ;}
.generate-position-media-options(@mediaBreakpointListMobileLength);
.generate-position-media-options(@name, @i: 1) when (@i <= @mediaBreakpointListMobileLength) {
@m: extract(@mediaBreakpointListMobile, @i);
@media screen and (min-width: @@m) {
.pos-relative-@{m} {position: relative ;}
.pos-absolute-@{m} {position: absolute ;}
.pos-static-@{m} {position: static ;}
.pos-fixed-@{m} {position: fixed ;}
.put-left-@{m} {left: 0 ; right: auto ;}
.put-right-@{m} {left: auto ; right: 0 ;}
.put-n-@{m} {
right: auto ;
bottom: auto ;
left: 50% ;
top: 0 ;
.translateX(-50%);
.translateY(-100%);
}
.put-nw-@{m} {
right: auto ;
bottom: auto ;
left: 0 ;
top: 0 ;
.translateY(-100%);
}
.put-ne-@{m} {
left: auto ;
bottom: auto ;
top: 0 ;
right: 0 ;
.translateY(-100%);
}
.put-wn-@{m} {
bottom: auto ;
right: auto ;
top: 0 ;
left: 0 ;
.translateX(-100%);
}
.put-w-@{m} {
bottom: auto ;
right: auto ;
top: 50% ;
left: 0 ;
.translateX(-100%);
.translateY(-50%);
}
.put-ws-@{m} {
top: auto ;
right: auto ;
bottom: 0 ;
left: 0 ;
.translateX(-100%);
}
.put-en-@{m} {
bottom: auto ;
left: auto ;
top: 0 ;
right: 0 ;
.translateX(100%);
}
.put-e-@{m} {
bottom: auto ;
left: auto ;
top: 50% ;
right: 0 ;
.translateX(100%);
.translateY(-50%);
}
.put-es-@{m} {
top: auto ;
left: auto ;
bottom: 0 ;
right: 0 ;
.translateX(100%);
}
.put-s-@{m} {
bottom: auto ;
right: auto ;
top: 100% ;
left: 0 ;
}
.put-sw-@{m} {
bottom: auto ;
right: auto ;
top: 100% ;
left: 50% ;
.translateX(-50%);
}
.put-se-@{m} {
bottom: auto ;
left: auto ;
top: 100% ;
right: 0 ;
}
}
.generate-position-media-options(@name, @i + 1);
}