.image { width: 100%; padding-bottom: 100%; height: 0; background: var(--image); background-size: cover; background-position: center; } img { content: var(--image); width: 100%; display: none; visibility: hidden; } @container style(--gallery-splits: 1) { .image { padding-bottom: 0px; height: unset; } img { display: unset; } }