Skip to content

Commit bfe2bd2

Browse files
author
Cory Simmons
committed
Make align reset go back to position: static
1 parent b29bb78 commit bfe2bd2

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

less/lost.less

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Lost Grid v5.1.5 - https://github.com/corysimmons/lost
1+
// Lost Grid v5.1.6 - https://github.com/corysimmons/lost
22

33
@gutter: 30px;
44
@rtl: false;
@@ -136,12 +136,12 @@
136136
& when (@flex = false) {
137137
position: relative;
138138
> * {
139-
position: absolute;
140-
top: 50%;
141-
right: auto;
142-
bottom: auto;
143-
left: 50%;
144-
transform: translate3d(-50%, -50%, 0);
139+
& when (@location = reset) {
140+
position: static;
141+
}
142+
& when not (@location = reset) {
143+
position: absolute;
144+
}
145145
& when (@location = reset) {
146146
top: auto;
147147
right: auto;
@@ -190,6 +190,12 @@
190190
bottom: auto;
191191
left: auto;
192192
transform: translate3d(0, -50%, 0);
193+
} & when (@location = middle-center) {
194+
top: 50%;
195+
right: auto;
196+
bottom: auto;
197+
left: 50%;
198+
transform: translate3d(-50%, -50%, 0);
193199
} & when (@location = right) {
194200
top: 50%;
195201
right: 0;

scss/lost.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Lost Grid v5.1.5 - https://github.com/corysimmons/lost
1+
// Lost Grid v5.1.6 - https://github.com/corysimmons/lost
22

33
$gutter: 30px !default;
44
$rtl: false !default;
@@ -125,7 +125,11 @@ $flexbox: false !default;
125125
@if ($flex == false) {
126126
position: relative;
127127
> * {
128-
position: absolute;
128+
@if ($location == reset) {
129+
position: static;
130+
} @else {
131+
position: absolute;
132+
}
129133
@if ($location == reset) {
130134
top: auto;
131135
right: auto;

stylus/lost.styl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Lost Grid v5.1.5 - https://github.com/corysimmons/lost
1+
// Lost Grid v5.1.6 - https://github.com/corysimmons/lost
22

33
$gutter = 30px
44
$rtl = false
@@ -116,7 +116,10 @@ align($location = middle-center, $flex = $flexbox)
116116
if $flex is false
117117
position: relative
118118
> *
119-
position: absolute
119+
if $location is reset
120+
position: static
121+
else
122+
position: absolute
120123
if $location is reset
121124
top: auto
122125
right: auto

0 commit comments

Comments
 (0)