.md-img { display: flex; flex-direction: column; margin: 3rem auto; img { border-radius: 1rem; margin: 0 auto; box-shadow: rgba(0, 0, 0, .25) 0 0 .5rem; } &.with-text img { margin-bottom: .5rem; } &-text { font-size: .8em; font-weight: 300; text-align: center; } }