Skip to content

Instantly share code, notes, and snippets.

@nirbhay18
Created June 17, 2022 03:55
Show Gist options
  • Save nirbhay18/db3247dac9664cf134fb38bb80271c5a to your computer and use it in GitHub Desktop.
Save nirbhay18/db3247dac9664cf134fb38bb80271c5a to your computer and use it in GitHub Desktop.
.gallery-item {
display: inline-block;
text-align: center;
vertical-align: top;
width: 100%;
}
.gallery-item a {
display: block;
}
.gallery-item a:focus img {
outline-offset: -2px;
}
.gallery-columns-2 .gallery-item {
max-width: 50%;
}
.gallery-columns-3 .gallery-item {
max-width: 33.33%;
}
.gallery-columns-4 .gallery-item {
max-width: 25%;
}
.gallery-columns-5 .gallery-item {
max-width: 20%;
}
.gallery-columns-6 .gallery-item {
max-width: 16.66%;
}
.gallery-columns-7 .gallery-item {
max-width: 14.28%;
}
.gallery-columns-8 .gallery-item {
max-width: 12.5%;
}
.gallery-columns-9 .gallery-item {
max-width: 11.11%;
}
.gallery-caption {
display: block;
}
figure.wp-caption a:focus img {
outline-offset: 2px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment