kitbash Sign in Connect agent
Components

Offset feature

One greyscale picture filling the right half, wiping down on view, with the caption stack hanging off its left edge over empty grey.

Part of the style

Blackletter Credit Stack

7 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@600&family=STIX+Two+Text:ital,wght@0,500;0,700;1,500&display=swap");
:root {
  --font-body: "STIX Two Text", "Times New Roman", Times, serif;
  --font-mark: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-small: "Inter", "Helvetica Neue", Arial, sans-serif;
}
</style>

<section class="offset-feature">
  <figure class="offset-feature__frame">
    <img class="offset-feature__picture" src="assets/marble-back.jpg" alt="White marble bust of a woman seen from behind, hair braided into a knot" width="832" height="1024" loading="eager">
  </figure>
  <a class="offset-feature__caption" href="#">
    <span class="offset-feature__client">KESTREL HALL</span>
    <span class="offset-feature__maker">Edda Rønning</span>
  </a>
</section>

<style>
  .offset-feature {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    min-height: clamp(420px, 50vw, 760px);
    background: var(--paper);
  }
  .offset-feature__frame {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    margin: 0;
    overflow: hidden;
    background: var(--paper-lift);
    clip-path: inset(0 0 100% 0);
    transition: clip-path var(--wipe) var(--ease-out);
  }
  .offset-feature.is-seen .offset-feature__frame {
    clip-path: inset(0 0 0 0);
  }
  .offset-feature__picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
    filter: grayscale(1) contrast(1.08);
    transform: scale(1.08);
    transition: transform 1600ms var(--ease-out);
  }
  .offset-feature.is-seen .offset-feature__picture {
    transform: scale(1);
  }

  /* The caption stack hangs off the picture's left edge: label, rule, name, then three hairlines. */
  .offset-feature__caption {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    display: grid;
    width: var(--caption-w);
    margin-bottom: var(--space-m);
    color: var(--ink-deep);
    text-align: center;
    text-decoration: none;
  }
  .offset-feature__client,
  .offset-feature__maker {
    display: block;
    padding: 9px var(--space-xs) 10px;
    line-height: 1;
  }
  .offset-feature__maker {
    border-top: var(--hair) solid var(--rule);
    color: var(--ink);
    transition: color var(--quick) var(--ease);
  }
  .offset-feature__caption::after {
    content: "";
    height: 15px;
    background: repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px 7px);
    border-top: var(--hair) solid var(--rule);
    transition: opacity var(--quick) var(--ease);
  }
  .offset-feature__caption:hover .offset-feature__maker,
  .offset-feature__caption:focus-visible .offset-feature__maker {
    color: var(--oxblood);
  }
  .offset-feature__caption:hover::after {
    opacity: 0.4;
  }

  @media (max-width: 52rem) {
    .offset-feature {
      grid-template-columns: 1fr 3fr;
      grid-template-rows: auto auto;
      min-height: 0;
    }
    .offset-feature__frame {
      grid-column: 1 / -1;
      aspect-ratio: 4 / 5;
      margin-left: 12%;
    }
    .offset-feature__caption {
      grid-column: 1 / -1;
      grid-row: 2;
      justify-self: start;
      margin: var(--space-m) 0 var(--section-space) 0;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .offset-feature__frame { clip-path: none; transition: none; }
    .offset-feature__picture { transform: none; transition: none; }
  }
</style>

<script>
  (() => {
    const seen = new IntersectionObserver((entries) => {
      for (const entry of entries) {
        if (!entry.isIntersecting) continue;
        entry.target.classList.add('is-seen');
        seen.unobserve(entry.target);
      }
    }, { threshold: 0.1 });
    for (const root of document.querySelectorAll('.offset-feature')) seen.observe(root);
  })();
</script>

Similar components

Drifting tile wall

Drifting tile wall

Spread

Spread

Stagger

Stagger

Bleed and column cascade

Bleed and column cascade

Colour wash showcase

Colour wash showcase

Thumbnail tray

Thumbnail tray

Night viewer

Night viewer

Project cards

Project cards