+@supports (display: grid) {
+ .gallery {
+ display: grid;
+ grid-column-gap: 1em;
+ grid-template-columns: repeat( auto-fill, minmax(18em, 1fr) );
+ align-items: center;
+
+ p.img { margin: 0.5em 0; }
+ }
+}
+
+p.img {
+ text-align: center;
+
+ img {
+ vertical-align: bottom;
+ max-width: 40em;
+ width: 100%;
+ height: auto;
+ }
+
+ a {
+ text-decoration: none;
+ display: inline-block;
+ border: solid 2px;
+ }
+
+ small {
+ color: $foregroundcolour;
+ text-align: justify;
+ @media (max-width: 24em) { text-align: left; }
+ padding: 0.5ex;
+ display: block;
+ font-size: 0.9em;
+ }
+}