← Back to Effects

Effects pattern

Offset border callout

A flat emphasis panel made from solid borders and one decorative color block.

Live example

See the pattern in isolation

The preview uses the same locked-down composition policy as the Agate IDE.

PreviewSandboxed

Canonical source

Copy it, change it, keep it plain

These exact files power the preview and the IDE handoff.

Source

HTML

<aside class="offset-callout" aria-labelledby="callout-title">
  <p class="offset-callout__label">Keep this close</p>
  <h1 id="callout-title">Start with the simplest useful structure.</h1>
  <p>You can add complexity later. A clear heading, a short paragraph, and one visible border are often enough to begin.</p>
</aside>
Source

CSS

* {
  box-sizing: border-box;
}

body {
  display: grid;
  min-height: 100vh;
  margin: 0;
  padding: clamp(2rem, 8vw, 6rem);
  place-items: center;
  background: #b0436a;
  color: #2b151d;
  font-family: system-ui, sans-serif;
}

.offset-callout {
  position: relative;
  width: min(100%, 38rem);
  padding: clamp(1.5rem, 6vw, 3.5rem);
  border: 4px solid #2b151d;
  background: #f7efe6;
}

.offset-callout::before {
  position: absolute;
  z-index: -1;
  width: 5rem;
  height: 5rem;
  inset-block-end: -1.25rem;
  inset-inline-end: -1.25rem;
  border: 4px solid #2b151d;
  background: #d94f9d;
  content: "";
}

.offset-callout__label {
  margin: 0 0 0.75rem;
  color: #8e2f50;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.offset-callout h1 {
  max-width: 15ch;
  margin: 0 0 1rem;
  font-size: clamp(2rem, 7vw, 3.8rem);
  line-height: 1;
}

.offset-callout > p:last-child {
  max-width: 34rem;
  margin: 0;
  color: #4a2c35;
  line-height: 1.65;
}

How it works

A small pattern with visible decisions

A heavy border and an offset color block create emphasis with simple, solid shapes. No gradient, transparency, or shadow is needed.

The decorative block is created with a pseudo-element and cannot interfere with the callout’s text or reading order.

Make it yours

Open both files in the workspace.

Agate will protect different saved work before loading this example.