@import "variables"; /*=============================================*\ Some styles to show off masonry layout \*=============================================*/ $pictureGutter: 24px; $itemHeight: 220px; .picture-item { height: 220px; margin-top: $pictureGutter; overflow: hidden; background: $clouds; &.shuffle-item { margin-left: 0; /* shuffle items shouldn't have a left margin*/ } &.picture-item--h2 { height: ($itemHeight * 2) + $pictureGutter; /* 2x the height + 1 gutter */ } // Ehh, i should really use something other than span6 to target this... &.span6:not(.picture-item--h2) { .picture-item__details { position: absolute; bottom: 0; left: 0; width: 100%; background-color: #333; background-color: rgba(black, .6); color: white; } .picture-item__description { display: none; } } img { display: block; width: 100%; height: auto; } .picture-item__details, .picture-item__description { padding: 1em; } .picture-item__description { margin: 0; padding-top: 0; padding-right: 2em; } .picture-item__tags { margin: 0; } .picture-item__title { } } /* Shuffle needs either relative or absolute positioning on the container It will set it for you, but it'll cause another style recalculation and layout. AKA worse performance - so just set it here */ .shuffle--container { position: relative; } .shuffle--fluid .shuffle__sizer { position: absolute; opacity: 0; visibility: hidden; }