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
276 lines (240 loc) • 5.76 kB
text/less
@import (once) "../../include/vars";
@import (once) "../../include/mixins";
.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%);
}
each(@mediaBreakpointListMobile, {
@media screen and (min-width: @@value) {
.put-left-@{value} {left: 0; right: auto;}
.put-right-@{value} {left: auto; right: 0;}
.put-n-@{value} {
right: auto;
bottom: auto;
left: 50%;
top: 0;
.translateX(-50%);
.translateY(-100%);
}
.put-nw-@{value} {
right: auto;
bottom: auto;
left: 0;
top: 0;
.translateY(-100%);
}
.put-ne-@{value} {
left: auto;
bottom: auto;
top: 0;
right: 0;
.translateY(-100%);
}
.put-wn-@{value} {
bottom: auto;
right: auto;
top: 0;
left: 0;
.translateX(-100%);
}
.put-w-@{value} {
bottom: auto;
right: auto;
top: 50%;
left: 0;
.translateX(-100%);
.translateY(-50%);
}
.put-ws-@{value} {
top: auto;
right: auto;
bottom: 0;
left: 0;
.translateX(-100%);
}
.put-en-@{value} {
bottom: auto;
left: auto;
top: 0;
right: 0;
.translateX(100%);
}
.put-e-@{value} {
bottom: auto;
left: auto;
top: 50%;
right: 0;
.translateX(100%);
.translateY(-50%);
}
.put-es-@{value} {
top: auto;
left: auto;
bottom: 0;
right: 0;
.translateX(100%);
}
.put-s-@{value} {
bottom: auto;
right: auto;
top: 100%;
left: 0;
}
.put-sw-@{value} {
bottom: auto;
right: auto;
top: 100%;
left: 50%;
.translateX(-50%);
}
.put-se-@{value} {
bottom: auto;
left: auto;
top: 100%;
right: 0;
}
}
})