Optical margin alignment

광학 여백 정렬

Pushing punctuation with little ink and a lot of surrounding white space — quotation marks, bullets, hyphens — slightly outside the text block's edge so the paragraph looks flush, even though its literal edge isn't.

Also known as: 행잉 펑크추에이션Hanging punctuation
···
html
<div class="stage">
  <div class="col">
    <div class="tag">정렬 안 함</div>
    <p class="quote flush">"디자인은 어떻게 보이고 어떻게 작동하는지에 대한 것이다."</p>
  </div>
  <div class="col">
    <div class="tag good">광학 여백 정렬</div>
    <p class="quote hanging">"디자인은 어떻게 보이고 어떻게 작동하는지에 대한 것이다."</p>
  </div>
  <div class="readout" id="readout">확인 중…</div>
</div>
css
.stage{display:grid;gap:14px;justify-items:center;width:min(94%,320px)}
.col{width:100%}
.tag{font:10px ui-monospace,Menlo,monospace;color:var(--muted);margin-bottom:4px}
.tag.good{color:var(--accent-3)}
.quote{font:15px/1.6 Georgia,'Times New Roman',serif;color:var(--fg);margin:0;border-left:2px solid var(--line);padding-left:10px}
.hanging{text-indent:-0.42em}
.readout{font:10px ui-monospace,Menlo,monospace;color:var(--muted);text-align:center}
js
const readout = document.getElementById('readout');
const supported = CSS.supports('hanging-punctuation', 'first');
readout.textContent = supported
  ? 'CSS.supports("hanging-punctuation: first") = true — 표준 속성 지원됨 (데모는 호환성 위해 수동 트릭 사용)'
  : 'CSS.supports("hanging-punctuation: first") = false — 이 브라우저는 미지원, text-indent 수동 트릭만 동작';

Aligning every character in a paragraph to the exact same vertical line at the left or right edge can still look uneven if that line starts or ends with a quotation mark or hyphen. A quotation mark's actual ink occupies only part of its character width — the rest is whitespace — so lining it up at the same coordinate as solid letters makes its visual weight read as sitting further inward.

Optical margin alignment nudges these marks slightly outside the text box's literal boundary, realigning the edge the eye actually perceives. It's a long-standing hand-adjustment in print typesetting, common in high-end book design and newspaper composition.

CSS's `hanging-punctuation` property tried to standardize this (`first` hangs an opening quote at a paragraph's start, `last` hangs closing punctuation at a line's end), but browser support is quite limited (mainly Safari). The demo checks live with `CSS.supports` whether the property actually works here, and shows the effect either way using a manual negative-`text-indent` trick — one that works in every browser regardless.

When to use

Worth it for pull quotes that open with a quotation mark, or bullet lists, where punctuation's visual weight is noticeable. Skip it for ordinary UI text — the effect is too subtle to matter there.