Skip to content

Masonry layout for galleries #1387

Closed Answered by candidexmedia
3muchfun asked this question in Help
Discussion options

You must be logged in to vote

Thanks @3muchfun !

Replace:

@media all and (min-width:56.25em) {
  .gallery-wrapper--wide .gallery {
    width:calc(100% + .5666666667rem)
  }
}

With:

@media all and (min-width:56.25em) {
  .gallery-wrapper--wide {
    display:flex;
    justify-content:center;
    margin-left:calc(-50vw + 50%);
    margin-right:calc(-50vw + 50%)
  }
  .gallery-wrapper--wide .gallery {
    padding:0 var(--page-margin);
    max-width:var(--page-width)
  }
}

I've also updated my gist. Thanks for flagging!

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@3muchfun
Comment options

@3muchfun
Comment options

@candidexmedia
Comment options

Answer selected by 3muchfun
@3muchfun
Comment options

@3muchfun
Comment options

@candidexmedia
Comment options

@3muchfun
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants