06Hardcoded text that skips the pack
A scan line walks the code lines one by one; only the hardcoded Korean stuck between tags freezes red while the rest slide past untouched.
Best forWhen a string survives the language switch, or when auditing labels an AI assistant dropped in
태그 사이 한글 패턴t() 미사용 탐지소스 스캔

<main class="stage is-demo">
<div class="editor">
<header class="editor__head"><span class="editor__dot"></span><span class="editor__name">index.html</span></header>
<ul class="editor__rows">
<li class="cl" style="--i:0"><span class="cl__bar"></span><span class="cl__txt" data-t="<button>구매하기</button>"></span></li>
<li class="cl" style="--i:1"><span class="cl__bar"></span><span class="cl__txt" data-t="<button>{t('buy.now')}</button>"></span></li>
<li class="cl" style="--i:2"><span class="cl__bar"></span><span class="cl__txt" data-t="<h2>자주 묻는 질문</h2>"></span></li>
<li class="cl" style="--i:3"><span class="cl__bar"></span><span class="cl__txt" data-t="<a href="/en/">{t('nav.faq')}</a>"></span></li>
<li class="cl" style="--i:4"><span class="cl__bar"></span><span class="cl__txt" data-t="<p>배송 안내</p>"></span></li>
</ul>
<span class="editor__scan"></span>
<p class="editor__badge">3 hardcoded strings</p>
</div>
</main>@use "../../../../site/static/demo-tokens" as *;
// ── 변수 3개 ──────────────────────────────────────────
$duration: $dur-loop; // 2s — 소스 스캔 한 주기
$easing: $ease-out;
$color: $subject-ink; // 에디터 카드
@include stage($stage-yellow);
.editor {
position: relative;
width: min(420px, 94vw);
border-radius: $r-card;
background: $color;
box-shadow: $shadow-raised;
overflow: hidden;
}
.editor__head {
display: flex;
align-items: center;
column-gap: $sp-2;
padding: $sp-1 $sp-3;
border-bottom: 2px solid rgba($subject-cream, .14);
}
.editor__dot {
width: 10px; height: 10px;
border-radius: 50%;
background: $stage-yellow;
}
.editor__name {
font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
font-size: clamp(10px, 2.4vw, 13px);
font-weight: 700;
color: rgba($subject-cream, .85);
}
.editor__rows {
list-style: none;
margin: 0;
padding: $sp-2 $sp-3 $sp-2;
display: grid;
row-gap: $sp-1;
}
.cl {
position: relative;
border-radius: $r-xs;
padding: $sp-1 $sp-1 $sp-1 $sp-2;
min-height: clamp(18px, 6vw, 30px);
display: flex;
align-items: center;
}
.cl__bar {
position: absolute;
left: 0;
top: 4px;
bottom: 4px;
width: 4px;
border-radius: $r-pill;
background: transparent;
}
.cl__txt {
font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
font-size: clamp(8.5px, 2.1vw, 12px);
color: rgba($subject-cream, .92);
white-space: nowrap;
}
.cl__txt::before { content: attr(data-t); }
.editor__scan {
position: absolute;
inset: 0;
pointer-events: none;
background: linear-gradient(to bottom,
transparent 0 calc(50% - 7px),
rgba($stage-yellow, .30) calc(50% - 7px) calc(50% + 7px),
transparent calc(50% + 7px) 100%);
background-size: 100% 220%;
opacity: 0;
}
.editor__badge {
position: absolute;
right: $sp-2;
bottom: $sp-2;
margin: 0;
border-radius: $r-pill;
background: $error;
color: #fff;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-size: clamp(10px, 2.4vw, 13px);
font-weight: 800;
padding: $sp-1 $sp-3;
box-shadow: $shadow-press;
}
// t() 를 안 타는 줄만 스캔 라인이 지나가는 순간 잡아 굳는다
.stage.is-demo .editor__scan { animation: scan-down $duration $easing infinite; }
.stage.is-demo .cl { animation: cl-pass $duration linear infinite; animation-delay: calc(var(--i) * .19s); }
.stage.is-demo .cl__bar { animation: bar-grow $duration $easing infinite; animation-delay: calc(var(--i) * .19s); }
.stage.is-demo .editor__badge { animation: badge-in $duration $ease-pop infinite; }
@keyframes scan-down {
0% { opacity: 1; background-position: 0 -130%; }
70% { opacity: 1; background-position: 0 130%; }
75%, 100% { opacity: 0; background-position: 0 130%; }
}
@keyframes cl-pass {
0%, 6% { background: transparent; }
15% { background: rgba($stage-yellow, .16); }
26%, 100% { background: transparent; }
}
@keyframes bar-grow {
0%, 10% { transform: scaleY(0); background: $error; }
20% { transform: scaleY(1); background: $error; }
100% { transform: scaleY(1); background: $error; }
}
@keyframes badge-in {
0%, 64% { transform: scale(0) translateY(4px); opacity: 0; }
72% { transform: scale(1.2) translateY(0); opacity: 1; }
78%, 95%{ transform: scale(1) translateY(0); opacity: 1; }
100% { transform: scale(.5); opacity: 0; }
}
// 줄 구분: 하드코딩 줄(1·3·5)만 붉은 왼쪽 막대를 얻는다
.stage.is-demo .cl:nth-child(2) .cl__bar,
.stage.is-demo .cl:nth-child(4) .cl__bar { animation: none; }
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .editor__scan,
.stage.is-demo .cl,
.stage.is-demo .cl__bar,
.stage.is-demo .editor__badge { animation: none; }
.editor__scan { opacity: 0; }
.cl:nth-child(1), .cl:nth-child(3), .cl:nth-child(5) { background: rgba($error, .30); }
.cl:nth-child(1) .cl__bar, .cl:nth-child(3) .cl__bar, .cl:nth-child(5) .cl__bar { transform: scaleY(1); background: $error; }
}
// 좁은 화면(320px 검수) — 줄 간격을 줄여 세로로 맞춘다
@media (max-width: 359px) {
.editor__head { padding: 0 $sp-2; }
.editor__rows { padding: $sp-1 $sp-2; row-gap: $sp-1; }
.cl { min-height: 16px; padding: 0 0 0 $sp-2; }
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: #ffd23f;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
padding: clamp(8px, 4vw, 24px);
}
.editor {
position: relative;
width: min(420px, 94vw);
border-radius: 16px;
background: #17141a;
box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
overflow: hidden;
}
.editor__head {
display: flex;
align-items: center;
column-gap: 8px;
padding: 4px 12px;
border-bottom: 2px solid rgba(255, 247, 230, 0.14);
}
.editor__dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: #ffd23f;
}
.editor__name {
font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
font-size: clamp(10px, 2.4vw, 13px);
font-weight: 700;
color: rgba(255, 247, 230, 0.85);
}
.editor__rows {
list-style: none;
margin: 0;
padding: 8px 12px 8px;
display: grid;
row-gap: 4px;
}
.cl {
position: relative;
border-radius: 4px;
padding: 4px 4px 4px 8px;
min-height: clamp(18px, 6vw, 30px);
display: flex;
align-items: center;
}
.cl__bar {
position: absolute;
left: 0;
top: 4px;
bottom: 4px;
width: 4px;
border-radius: 999px;
background: transparent;
}
.cl__txt {
font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
font-size: clamp(8.5px, 2.1vw, 12px);
color: rgba(255, 247, 230, 0.92);
white-space: nowrap;
}
.cl__txt::before {
content: attr(data-t);
}
.editor__scan {
position: absolute;
inset: 0;
pointer-events: none;
background: linear-gradient(to bottom, transparent 0 calc(50% - 7px), rgba(255, 210, 63, 0.3) calc(50% - 7px) calc(50% + 7px), transparent calc(50% + 7px) 100%);
background-size: 100% 220%;
opacity: 0;
}
.editor__badge {
position: absolute;
right: 8px;
bottom: 8px;
margin: 0;
border-radius: 999px;
background: #c2361a;
color: #fff;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-size: clamp(10px, 2.4vw, 13px);
font-weight: 800;
padding: 4px 12px;
box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}
.stage.is-demo .editor__scan {
animation: scan-down 2s ease-out infinite;
}
.stage.is-demo .cl {
animation: cl-pass 2s linear infinite;
animation-delay: calc(var(--i) * 0.19s);
}
.stage.is-demo .cl__bar {
animation: bar-grow 2s ease-out infinite;
animation-delay: calc(var(--i) * 0.19s);
}
.stage.is-demo .editor__badge {
animation: badge-in 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}
@keyframes scan-down {
0% {
opacity: 1;
background-position: 0 -130%;
}
70% {
opacity: 1;
background-position: 0 130%;
}
75%, 100% {
opacity: 0;
background-position: 0 130%;
}
}
@keyframes cl-pass {
0%, 6% {
background: transparent;
}
15% {
background: rgba(255, 210, 63, 0.16);
}
26%, 100% {
background: transparent;
}
}
@keyframes bar-grow {
0%, 10% {
transform: scaleY(0);
background: #c2361a;
}
20% {
transform: scaleY(1);
background: #c2361a;
}
100% {
transform: scaleY(1);
background: #c2361a;
}
}
@keyframes badge-in {
0%, 64% {
transform: scale(0) translateY(4px);
opacity: 0;
}
72% {
transform: scale(1.2) translateY(0);
opacity: 1;
}
78%, 95% {
transform: scale(1) translateY(0);
opacity: 1;
}
100% {
transform: scale(0.5);
opacity: 0;
}
}
.stage.is-demo .cl:nth-child(2) .cl__bar,
.stage.is-demo .cl:nth-child(4) .cl__bar {
animation: none;
}
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .editor__scan,
.stage.is-demo .cl,
.stage.is-demo .cl__bar,
.stage.is-demo .editor__badge {
animation: none;
}
.editor__scan {
opacity: 0;
}
.cl:nth-child(1), .cl:nth-child(3), .cl:nth-child(5) {
background: rgba(194, 54, 26, 0.3);
}
.cl:nth-child(1) .cl__bar, .cl:nth-child(3) .cl__bar, .cl:nth-child(5) .cl__bar {
transform: scaleY(1);
background: #c2361a;
}
}
@media (max-width: 359px) {
.editor__head {
padding: 0 8px;
}
.editor__rows {
padding: 4px 8px;
row-gap: 4px;
}
.cl {
min-height: 16px;
padding: 0 0 0 8px;
}
}import type { CSSProperties } from "react";
import styles from "./HardcodedScan.module.scss";
export type HardcodedScanProps = {
duration?: number;
easing?: string;
color?: string;
badge?: string;
};
const LINES = [
{ code: "<button>구매하기</button>", hard: true },
{ code: "<button>{t('buy.now')}</button>", hard: false },
{ code: "<h2>자주 묻는 질문</h2>", hard: true },
{ code: "<a href=\"/en/\">{t('nav.faq')}</a>", hard: false },
{ code: "<p>배송 안내</p>", hard: true },
];
export default function HardcodedScan({
duration = 2000,
easing = "ease-out",
color = "#17141a",
badge = "하드코딩 3곳",
}: HardcodedScanProps) {
const vars: CSSProperties = { "--duration": `${duration}ms`, "--easing": easing, "--color": color } as CSSProperties;
return (
<div className={styles.stage} style={vars} aria-label="하드코딩 글자 스캔 데모" role="img">
<div className={styles.editor}>
<header className={styles.head}>
<span className={styles.dot} />
<span className={styles.name}>index.html</span>
</header>
<ul className={styles.rows}>
{LINES.map((l, i) => (
<li
key={i}
className={`${styles.cl} ${l.hard ? styles.hard : ""}`}
style={{ "--i": i } as CSSProperties}
>
<span className={styles.bar} />
<span className={styles.txt}>{l.code}</span>
</li>
))}
</ul>
<span className={styles.scan} />
<p className={styles.badge}>{badge}</p>
</div>
</div>
);
}06 Hardcoded text that skips the pack — Measured area 58.947% · moving frames 20/23Original by GODRICH · SCSS and React ship in the zip · i18n JSON Checks: 9 Ways to Catch Missing Keys
The post this demo lives in
i18n JSON Checks: 9 Ways to Catch Missing Keysi18n JSON files break quietly: a key missing from en.json leaves a button empty, and a stray {name} placeholder ships wi See all demos in this post
If you like this effect - similar demos
base03 Heading line-wrap balance — a paragraph that keeps a lone word off the last lineCSS Reset: 9 Patterns From Basics to Safe-Area
Dashboard UI06 A Label Fit That Measures the Cell Then Shrinks or Hides the TextTreemap Chart: 9 Canvas Layout Scenes
Dashboard UI03 Scroll that follows the cursorCommand Palette UI Design — 9 That Really Open