kitbash Sign in Connect agent
Components

Grid masthead

Eight-column header: a dot, a three-line statement with the first line in black, a stacked three-word nav where hovering one word dims the others and underlines it, and a city with a live clock on the right. Lines fade up 8px one after another on load.

Part of the style

Difference Deck

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --paper: #f4f3ea;
  --ink: #08140e;
  --mute: #79776d;
  --dim: #4d5952;
  --hairline: rgba(244, 243, 234, 0.15);
  --glow: rgba(244, 243, 234, 0.9);
  --glow-dark: rgba(8, 20, 14, 0.55);
  --art-bone: #e8e7de;
  --art-soot: #29352f;
  --art-tangerine: #798e52;
  --art-coral: #728d39;
  --art-sand: #828877;
  --art-red: #6a8724;
  --art-ember: #758f3d;
  --art-ochre: #8ba164;
  --art-cobalt: #64824d;
  --art-blue: #62804a;
  --art-celadon: #609357;
  --art-lilac: #798e52;
  --art-rose: #708e58;
}
</style>

<header class="masthead">
  <span class="masthead__dot" aria-hidden="true"></span>

  <h1 class="masthead__statement">
    <span class="masthead__line">TERRON is the ceramics practice of Mira Holt</span>
    <span class="masthead__line masthead__line--mute">a norwegian potter and object designer</span>
    <span class="masthead__line masthead__line--mute">firing for kitchens, hotels and shelves</span>
  </h1>

  <nav class="masthead__nav" aria-label="Main">
    <ul class="masthead__list">
      <li class="masthead__item"><a class="masthead__link" href="#work">Work</a></li>
      <li class="masthead__item"><a class="masthead__link" href="#glazes">Glazes</a></li>
      <li class="masthead__item"><a class="masthead__link" href="#commissions">Commissions</a></li>
    </ul>
  </nav>

  <p class="masthead__place">
    <span class="masthead__line">Bergen</span>
    <time class="masthead__line masthead__line--mute masthead__clock" data-zone="Europe/Oslo">09:41</time>
  </p>
</header>

<style>
  .masthead {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: var(--gutter);
    padding: var(--edge);
    background: var(--paper);
    color: var(--ink);
    font-size: var(--text-s);
    line-height: var(--leading);
    letter-spacing: var(--tracking);
  }
  .masthead__dot {
    grid-column: 1;
    width: 6px;
    height: 6px;
    margin-top: 4px;
    border-radius: var(--radius-round);
    background: currentColor;
  }
  .masthead__statement {
    grid-column: 2 / span 2;
    margin: 0;
    font: inherit;
    letter-spacing: inherit;
  }
  .masthead__line {
    display: block;
  }
  .masthead__line--mute {
    color: var(--mute);
  }
  .masthead__nav {
    grid-column: 4;
  }
  .masthead__list {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .masthead__link {
    position: relative;
    color: inherit;
    text-decoration: underline 1px transparent;
    text-underline-offset: 3px;
    transition: opacity var(--time-dim) var(--ease-dim), text-decoration-color var(--time-dim) var(--ease-dim);
  }
  /* The link is inline so the stack stays tight; its hit area still reaches 44px. */
  .masthead__link::after {
    content: "";
    position: absolute;
    inset: -2px -8px;
  }
  .masthead__list:has(.masthead__link:hover, .masthead__link:focus-visible) .masthead__link {
    opacity: 0.32;
  }
  .masthead__list:has(.masthead__link:hover, .masthead__link:focus-visible) .masthead__link:is(:hover, :focus-visible) {
    opacity: 1;
    text-decoration-color: currentColor;
  }
  .masthead__link:focus-visible {
    outline: none;
  }
  .masthead__place {
    grid-column: 8;
    margin: 0;
    text-align: right;
  }
  .masthead__clock {
    font-variant-numeric: tabular-nums;
  }

  /* Lines fade up 8px into place, one after another. */
  .masthead__line,
  .masthead__item,
  .masthead__dot {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--time-fade) var(--ease-fade), transform var(--time-fade) var(--ease-fade);
    transition-delay: calc(var(--order, 0) * var(--stagger-fade));
  }
  .masthead.is-in .masthead__line,
  .masthead.is-in .masthead__item,
  .masthead.is-in .masthead__dot {
    opacity: 1;
    transform: none;
  }

  @media (max-width: 52rem) {
    .masthead {
      grid-template-columns: 1fr auto;
      row-gap: 18px;
    }
    .masthead__dot { grid-column: 1; grid-row: 1; }
    .masthead__place { grid-column: 2; grid-row: 1; }
    .masthead__statement {
      grid-column: 1 / -1;
      grid-row: 2;
      font-size: 14px;
      text-align: center;
    }
    .masthead__nav {
      grid-column: 1 / -1;
      grid-row: 3;
    }
    .masthead__list {
      display: flex;
      justify-content: center;
      gap: 4px;
    }
    .masthead__link {
      display: inline-flex;
      align-items: center;
      min-height: var(--tap);
      padding: 0 10px;
    }
    .masthead__link::after { content: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .masthead__line,
    .masthead__item,
    .masthead__dot {
      opacity: 1;
      transform: none;
      transition: none;
    }
  }
</style>

<script>
(() => {
  function tellTime(clock) {
    const zone = clock.dataset.zone;
    const format = new Intl.DateTimeFormat('en-GB', { hour: '2-digit', minute: '2-digit', hour12: false, timeZone: zone });
    const show = () => {
      const now = new Date();
      clock.textContent = format.format(now);
      clock.dateTime = now.toISOString();
    };
    show();
    setInterval(show, 15000);
  }

  function fadeIn(root) {
    root.querySelectorAll('.masthead__dot, .masthead__line, .masthead__item').forEach((line, order) => line.style.setProperty('--order', order));
    requestAnimationFrame(() => requestAnimationFrame(() => root.classList.add('is-in')));
  }

  for (const root of document.querySelectorAll('.masthead')) {
    root.querySelectorAll('.masthead__clock').forEach(tellTime);
    fadeIn(root);
  }
})();
</script>

Similar components

Corner nav with stepped panels

Corner nav with stepped panels

Corner masthead

Corner masthead

Wordmark masthead

Wordmark masthead

Dark top bar

Dark top bar

Grid top bar

Grid top bar

Bottom bar

Bottom bar

Cell header

Cell header

Pill menu bar

Pill menu bar