peterramsing / lost

LostGrid is a powerful grid system built in PostCSS that works with any preprocessor and even vanilla CSS.
http://lostgrid.org
MIT License
4.5k stars 161 forks source link

lost-align doesn't align correctly. #403

Closed ghost closed 6 years ago

ghost commented 6 years ago

I just looked at website and saw this. Screenshot below. Top: 115px; Bottom: 85px;

Is this a feature request or a bug report? Bug.

What is the current behavior? Doesn't align correctly.

If it's a bug please provide the steps to reproduce it and maybe some code samples. http://lostgrid.org/lostgrid-example.html

What version of LostGrid, browser and browser version are affected by this issue? Did this happen in previous versions? Chrome on mac.

screen shot 2018-01-08 at 16 42 52

peterramsing commented 6 years ago

Well, that's awkward. I'll take a look. Thanks.

peterramsing commented 6 years ago

Hmm. Something seems up with the translate. I'll keep poking at this.

ghost commented 6 years ago

I never get an accurate result with top: 50%. It is not surprising to me.

peterramsing commented 6 years ago

No, sadly it's not terribly surprising to me either. So what to do what to do? I'm totally enveloped in Ready Player One but once I'm done (super close) I'll see if I can figure out something.

ghost commented 6 years ago

Made me laugh. I can't figure why but felt funny.

peterramsing commented 6 years ago

Doh! It has everything to do with the margin of the element that is being contained. Because it has the margin-top: 15%; added to it it's no longer being centered. I don't think it's actually a problem with lost-align. It's a problem with the example, though. I'll fix that. 👍 Thanks for catching that!

peterramsing commented 6 years ago

Huzzah! It's fixed. Thanks again @atilkan!