_sass/components/_card.scss in jekyll-sleek-0.1.1 vs _sass/components/_card.scss in jekyll-sleek-0.1.2

- old
+ new

@@ -5,11 +5,17 @@ border-radius: 4px; overflow: hidden; background-color: $bg-color; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); margin-bottom: 5.26316%; + transition: box-shadow .25s ease; + &:hover, + &:focus { + box-shadow: 0 2px 40px 0 hsla(232, 8%, 63%, .3); + } + @include breakpoint($md) { width: 48.4375%; margin-right: 3.125%; &:last-of-type, @@ -31,8 +37,41 @@ margin-right: 0; } } } -.post-card--inner { - padding: 1.875rem 1.25rem; +.post-card__thumb { + margin: 0; + background: $dark-light; + position: relative; + + &::after { + content: ""; + display: block; + height: 0; + width: 100%; + // 16:9 = 56.25% = calc(9 / 16 * 100%) + padding-bottom: 56.25%; + } + + > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: block; + } +} + +.post-card__inner { + padding: 1.875rem 1.25rem 0.625rem; + color: $grey; +} + +.post-card__header { + margin-bottom: 0.75rem; + + .post-card__meta { + font-size: 0.875rem; + } }