mmistakes / minimal-mistakes

:triangular_ruler: Jekyll theme for building a personal site, blog, project documentation, or portfolio.
https://mmistakes.github.io/minimal-mistakes/
MIT License
12.48k stars 25.75k forks source link

Extra space added when using a feature_row #2327

Closed lsolesen closed 5 years ago

lsolesen commented 5 years ago

Extra space added when using a feature_row in layout single.

Environment

Expected behavior

There should be no extra space in front of the feature row.

Steps to reproduce the behavior

See https://github.com/motionsplan/motionsplan-dk-jekyll/blob/gh-pages/_posts/2019-11-19-regler-styrkeloft.md

Which gives this result:

Screenshot - 2019-11-19T083854 829

Other

It can be seen on the live site here: https://www.motionsplan.dk/powerlifting-rules/

mmistakes commented 5 years ago

Looks like it has to do with the right sidebar. If you inspect it you can see it's pushing over into the main content column some, which pushes the feature row down.

image

When the right sidebar isn't being floated the feature row has enough room and fits.

image

Not sure what the fix is yet.

iBug commented 5 years ago

Duplicate of #2263

The answer is, if you want to use that in single layout, you should look into gallery instead. feature_row is intended for splash layout.

mmistakes commented 5 years ago

It'll likely break other things but giving feature__wrapper an inline style of display: inline-block fixes the wrap with the sidebar.

image

iBug commented 5 years ago

@mmistakes Perhaps something like this would be helpful without breaking anything?

.layout--single .feature__wrapper {
  display: inline-block;
}

Tried this in a few MM-themed sites, didn't notice any failure so far.

mmistakes commented 5 years ago

@iBug that change looks harmless to me if you want to submit a PR with the fix.