Skip to content

The design language that makes your AI harness better at design.

JavaScript
3.7 KB
Raw Blame
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Marquee: content crawling past, or an ornament in motion (browser-only pass rows)</title>
  <!--
    The stylesheet form of marquee is an infinite horizontal loop. In a
    browser it also asks what the loop moves: a marquee is words, logos or
    pictures crawling past. A wave drawn as one SVG path and a highlight
    sweeping across a pill loop the same way and carry nothing to read or
    look at. The static engine cannot see what a selector resolves to and
    reports all four. Explicit pixel dimensions throughout.
  -->
  <style>
    body { margin: 0; padding: 24px 40px; width: 1000px; font: 16px/24px system-ui, sans-serif; color: #1a1a1a; background: #fff; }
    h2 { font-size: 14px; line-height: 20px; margin: 32px 0 8px; color: #475569; }
    .strip { width: 640px; height: 40px; overflow: hidden; }
    .track { display: flex; gap: 48px; width: 1280px; height: 40px; white-space: nowrap; }
    .track span { line-height: 40px; }
    .flag-words { animation: fixture-crawl 20s linear infinite; }
    .flag-logos { animation: fixture-crawl 30s linear infinite; }
    .flag-logos svg { width: 96px; height: 40px; flex: none; }
    .cta { position: relative; width: 640px; height: 120px; overflow: hidden; background: #0f172a; color: #fff; }
    .cta p { margin: 0; padding: 24px; }
    .pass-wave { position: absolute; left: 0; bottom: 0; width: 1280px; height: 44px; animation: fixture-wave 12s linear infinite; }
    .pill { position: relative; display: inline-block; width: 160px; height: 32px; line-height: 32px; text-align: center; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 16px; }
    .pass-sweep { position: absolute; top: 0; bottom: 0; left: 0; width: 60px; background-image: linear-gradient(100deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.2) 50%, rgba(15, 23, 42, 0) 100%); animation: fixture-sweep 3.6s ease-in-out infinite; }
    @keyframes fixture-crawl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
    @keyframes fixture-wave { 0% { transform: translate(0); } 100% { transform: translate(-50%); } }
    @keyframes fixture-sweep { 0% { transform: translate(-120%); } 100% { transform: translate(220%); } }
  </style>
</head>
<body>
  <h2>Flag: a strip of words crawling past</h2>
  <div class="strip"><div class="track flag-words"><span>Free shipping over fifty</span><span>New arrivals every Friday</span><span>Returns within thirty days</span><span>Free shipping over fifty</span><span>New arrivals every Friday</span><span>Returns within thirty days</span></div></div>

  <h2>Flag: a strip of inline SVG logos crawling past</h2>
  <div class="strip"><div class="track flag-logos">
    <svg viewBox="0 0 96 40" role="img" aria-label="Acme"><rect x="8" y="10" width="80" height="20" rx="4" fill="#334155"/></svg>
    <svg viewBox="0 0 96 40" role="img" aria-label="Globex"><circle cx="48" cy="20" r="14" fill="#334155"/></svg>
    <svg viewBox="0 0 96 40" role="img" aria-label="Initech"><rect x="20" y="6" width="56" height="28" fill="#334155"/></svg>
    <svg viewBox="0 0 96 40" role="img" aria-label="Acme"><rect x="8" y="10" width="80" height="20" rx="4" fill="#334155"/></svg>
  </div></div>

  <h2>Pass: a wave divider sliding under a call to action</h2>
  <div class="cta"><p>Talk to us about your operation.</p>
    <svg class="pass-wave" viewBox="0 0 1280 44" preserveAspectRatio="none" aria-hidden="true"><path d="M0 22 C 160 0, 320 44, 640 22 S 1120 0, 1280 22 V44 H0 Z" fill="#1e293b"/></svg>
  </div>

  <h2>Pass: a highlight sweeping across a pill</h2>
  <span class="pill">Human curation<span class="pass-sweep" aria-hidden="true"></span></span>
</body>
</html>