Rounded picture row
Four rounded tiles in a row, a plain cream tile with a note then three paintings; hovering dims a picture and fades its label in.
Part of the style
Forest Ink on Cream
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/forest-ink-on-cream/tiles/figma.html?palette=050bd00a57bfe0ab
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/forest-ink-on-cream/tiles/figma.html?palette=050bd00a57bfe0ab and pass that whole HTML document to the html_to_figma tool, so the part "Rounded picture row" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<style>
/* Goes after the pack's base.css */
:root {
--paper: #91816b;
--tile: #72634e;
--ink: #1c0d06;
--on-ink: #91816b;
--ink-soft: #301e08;
--blossom: #8a745c;
--blossom-deep: #0c0400;
--blossom-eye: #301e08;
}
</style>
<section class="tiles" aria-label="Last season at the nursery">
<ul class="tiles__row">
<li class="tiles__tile tiles__tile--note">
<p class="tiles__note">Last season, in pictures</p>
<p class="tiles__small">Twelve months of sowing, potting on and giving away.</p>
</li>
<li class="tiles__tile">
<a class="tiles__link" href="#">
<img class="tiles__img" src="assets/chrysanthemums.jpg" alt="A painted bunch of chrysanthemums in a vase" width="800" height="666" loading="lazy">
<span class="tiles__label">The autumn bench</span>
</a>
</li>
<li class="tiles__tile">
<a class="tiles__link" href="#">
<img class="tiles__img" src="assets/strawberries.jpg" alt="A painted glass jar of strawberries beside a lemon and nuts" width="800" height="573" loading="lazy">
<span class="tiles__label">Runner swap day</span>
</a>
</li>
<li class="tiles__tile">
<a class="tiles__link" href="#">
<img class="tiles__img" src="assets/lemons.jpg" alt="A painted spread of grapes, lemons, pears and apples" width="800" height="662" loading="lazy">
<span class="tiles__label">Orchard open day</span>
</a>
</li>
</ul>
</section>
<style>
.tiles {
padding: var(--space-l) var(--edge) var(--section-space);
color: var(--ink);
}
.tiles__row {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: var(--gap);
margin: 0;
padding: 0;
list-style: none;
}
.tiles__tile {
position: relative;
aspect-ratio: 1;
overflow: hidden;
border-radius: var(--radius);
background: var(--tile);
}
.tiles__tile--note {
display: grid;
align-content: space-between;
padding: var(--space-m);
}
.tiles__note {
margin: 0;
font-family: var(--font-display);
font-size: var(--display-m);
font-weight: var(--weight-display);
font-variation-settings: "SOFT" 100;
line-height: var(--leading-display);
letter-spacing: var(--track-display);
}
.tiles__small {
margin: 0;
color: var(--ink-soft);
font-size: var(--text-s);
}
.tiles__link {
display: block;
height: 100%;
color: inherit;
text-decoration: none;
}
.tiles__img {
width: 100%;
height: 100%;
object-fit: cover;
transition: opacity var(--fade) var(--ease);
}
.tiles__label {
position: absolute;
left: var(--space-s);
bottom: var(--space-s);
padding: var(--space-xs) var(--space-s);
border-radius: var(--radius-s);
background: var(--paper);
font-size: var(--text-s);
opacity: 0;
transition: opacity var(--fade) var(--ease);
}
.tiles__link:hover .tiles__img,
.tiles__link:focus-visible .tiles__img {
opacity: 0.82;
}
.tiles__link:hover .tiles__label,
.tiles__link:focus-visible .tiles__label {
opacity: 1;
}
.tiles__link:focus-visible {
outline: var(--rule-link) solid var(--ink);
outline-offset: -2px;
border-radius: var(--radius);
}
@media (max-width: 44rem) {
.tiles__row {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (hover: none) {
.tiles__label {
opacity: 1;
}
}
</style>