30 CSS Hero Sections

Asymmetric Type

Construction-site asymmetric typography — broken across columns with intentional misalignment, hi-vis safety yellow on concrete grey, black hard rules.

Pure CSS MIT licensed
Live Demo Open in tab
Open in playground

The code

<section class="hs-asy" aria-label="Hero">
  <div class="hs-asy-grid">
    <span class="hs-asy-tag">/ ZONE 4</span>
    <h2 class="hs-asy-h">
      <span class="hs-asy-l1">UNDER</span>
      <span class="hs-asy-l2">construction.</span>
      <span class="hs-asy-l3">Always.</span>
    </h2>
    <span class="hs-asy-amp">&amp;</span>
    <p class="hs-asy-p">
      Software you ship is software that's still being built. We make CI fast enough to do it on the
      dev's terms — not the build's.
    </p>
    <a class="hs-asy-cta" href="#start">DEPLOY →</a>
    <span class="hs-asy-stripe" aria-hidden="true"></span>
  </div>
</section>
.hs-asy {
  display: grid; place-items: stretch;
  width: 100%; min-height: 480px;
  padding: clamp(24px, 4vw, 48px);
  background: #c8c4be;
  font-family: 'Inter', system-ui, sans-serif;
  color: #0a0a0a;
  box-sizing: border-box;
  overflow: hidden;
}
.hs-asy-grid {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr 0.6fr;
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
  width: 100%;
}
.hs-asy-tag {
  grid-column: 1 / 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em;
  background: #f5d028; padding: 4px 10px; align-self: start; justify-self: start;
}
.hs-asy-h {
  grid-column: 1 / 4;
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 900; line-height: 0.85; letter-spacing: -0.04em;
  text-transform: uppercase;
}
.hs-asy-l1 { display: block; font-size: clamp(60px, 11vw, 130px); }
.hs-asy-l2 { display: block; font-size: clamp(40px, 8vw, 90px); margin-left: clamp(40px, 12vw, 180px); color: #f5d028; -webkit-text-stroke: 2px #0a0a0a; }
.hs-asy-l3 { display: block; font-size: clamp(40px, 8vw, 90px); margin-left: clamp(80px, 24vw, 360px); }
.hs-asy-amp {
  grid-column: 3; grid-row: 3;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(80px, 14vw, 160px); font-weight: 800; font-style: italic;
  color: #0a0a0a; line-height: 1; align-self: end; justify-self: end;
}
.hs-asy-p {
  grid-column: 1 / 3; grid-row: 3;
  font-size: 14px; line-height: 1.55; max-width: 380px;
  color: #2a2a2a; margin: 0; align-self: end;
  border-left: 4px solid #f5d028;
  padding-left: 14px;
}
.hs-asy-cta {
  grid-column: 1 / 2; grid-row: 4;
  display: inline-block; padding: 14px 26px;
  background: #0a0a0a; color: #f5d028;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800; font-size: 14px; letter-spacing: 0.16em;
  text-decoration: none; border: 0;
  align-self: start; justify-self: start;
  transition: background 0.15s;
}
.hs-asy-cta:hover { background: #f5d028; color: #0a0a0a; }
.hs-asy-stripe {
  grid-column: 2 / 4; grid-row: 4;
  height: 14px; align-self: center;
  background: repeating-linear-gradient(45deg, #0a0a0a 0 12px, #f5d028 12px 24px);
}
@media (max-width: 720px) {
  .hs-asy-l2, .hs-asy-l3 { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .hs-asy-cta { transition: none; } }

Search CodeFronts

Loading…