Keep div always square

To keep a div always as a square shape, use code below: div{ width: 100%;    &:after{ display: block; padding-bottom: 100%;    }}