From d864ec94ffaa5ec4ff023155d130a90844a1861e Mon Sep 17 00:00:00 2001 From: bam Date: Tue, 25 Aug 2026 17:21:55 +0900 Subject: [PATCH 1/2] =?UTF-8?q?style:=20=EA=B5=90=EC=95=88=20=EC=A3=BC?= =?UTF-8?q?=EC=9A=94=20=EC=A3=BC=EC=A0=9C=20=EA=B5=AC=EB=B6=84=EC=84=A0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/app.css | 2 ++ tests/accessibility.test.js | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/styles/app.css b/styles/app.css index 8fa5c3c..05553ee 100644 --- a/styles/app.css +++ b/styles/app.css @@ -677,6 +677,7 @@ a.language-nav-link:hover { .lesson-body h2 { padding-top: 24px; margin: 26px 0 14px; + border-top: 1px solid var(--color-border); font-size: 24px; letter-spacing: -0.025em; } @@ -684,6 +685,7 @@ a.language-nav-link:hover { .lesson-body h2:first-child { padding-top: 0; margin-top: 0; + border-top: 0; } .lesson-body h3 { diff --git a/tests/accessibility.test.js b/tests/accessibility.test.js index 12a18f0..d03a7be 100644 --- a/tests/accessibility.test.js +++ b/tests/accessibility.test.js @@ -48,6 +48,19 @@ test("긴 교안 제목과 인라인 코드가 320px 문서 폭을 늘리지 않 assert.match(inlineCodeRule[1], /background:\s*var\(--color-surface-raised\)/); }); +test("교안의 주요 주제 H2만 위쪽 구분선으로 구분한다", async () => { + const css = await readFile(new URL("../styles/app.css", import.meta.url), "utf8"); + const h2Rule = css.match(/\.lesson-body h2\s*\{([^}]*)\}/)?.[1] ?? ""; + const firstH2Rule = css.match(/\.lesson-body h2:first-child\s*\{([^}]*)\}/)?.[1] ?? ""; + const h3Rule = css.match(/\.lesson-body h3\s*\{([^}]*)\}/)?.[1] ?? ""; + const h4Rule = css.match(/\.lesson-body h4\s*\{([^}]*)\}/)?.[1] ?? ""; + + assert.match(h2Rule, /border-top:\s*1px solid var\(--color-border\)/); + assert.match(firstH2Rule, /border-top:\s*0/); + assert.doesNotMatch(h3Rule, /border-top/); + assert.doesNotMatch(h4Rule, /border-top/); +}); + test("교안 표는 명확한 셀 경계와 포커스 가능한 내부 가로 스크롤을 유지한다", async () => { const css = await readFile(new URL("../styles/app.css", import.meta.url), "utf8"); const tokens = await readFile(new URL("../styles/tokens.css", import.meta.url), "utf8"); From 04b8b1bcbf7a81e579ceae85158a87da58d84359 Mon Sep 17 00:00:00 2001 From: bam Date: Tue, 25 Aug 2026 17:35:43 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EA=B5=90=EC=95=88=20=EA=B5=AC?= =?UTF-8?q?=EB=B6=84=EC=84=A0=20=EC=84=A0=ED=83=9D=EC=9E=90=20=EB=B2=94?= =?UTF-8?q?=EC=9C=84=20=EC=A0=9C=ED=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/app.css | 8 +++++--- tests/accessibility.test.js | 9 ++++++--- tests/course-separation.test.js | 3 +-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/styles/app.css b/styles/app.css index 05553ee..2e6fe40 100644 --- a/styles/app.css +++ b/styles/app.css @@ -677,15 +677,17 @@ a.language-nav-link:hover { .lesson-body h2 { padding-top: 24px; margin: 26px 0 14px; - border-top: 1px solid var(--color-border); font-size: 24px; letter-spacing: -0.025em; } -.lesson-body h2:first-child { +.lesson-body > h2:not(:first-child) { + border-top: 1px solid var(--color-border); +} + +.lesson-body > h2:first-child { padding-top: 0; margin-top: 0; - border-top: 0; } .lesson-body h3 { diff --git a/tests/accessibility.test.js b/tests/accessibility.test.js index d03a7be..cf7e9c8 100644 --- a/tests/accessibility.test.js +++ b/tests/accessibility.test.js @@ -51,12 +51,15 @@ test("긴 교안 제목과 인라인 코드가 320px 문서 폭을 늘리지 않 test("교안의 주요 주제 H2만 위쪽 구분선으로 구분한다", async () => { const css = await readFile(new URL("../styles/app.css", import.meta.url), "utf8"); const h2Rule = css.match(/\.lesson-body h2\s*\{([^}]*)\}/)?.[1] ?? ""; - const firstH2Rule = css.match(/\.lesson-body h2:first-child\s*\{([^}]*)\}/)?.[1] ?? ""; + const subsequentH2Rule = css.match(/\.lesson-body > h2:not\(:first-child\)\s*\{([^}]*)\}/)?.[1] ?? ""; + const firstH2Rule = css.match(/\.lesson-body > h2:first-child\s*\{([^}]*)\}/)?.[1] ?? ""; const h3Rule = css.match(/\.lesson-body h3\s*\{([^}]*)\}/)?.[1] ?? ""; const h4Rule = css.match(/\.lesson-body h4\s*\{([^}]*)\}/)?.[1] ?? ""; - assert.match(h2Rule, /border-top:\s*1px solid var\(--color-border\)/); - assert.match(firstH2Rule, /border-top:\s*0/); + assert.doesNotMatch(h2Rule, /border-top/); + assert.match(subsequentH2Rule, /border-top:\s*1px solid var\(--color-border\)/); + assert.match(firstH2Rule, /padding-top:\s*0/); + assert.match(firstH2Rule, /margin-top:\s*0/); assert.doesNotMatch(h3Rule, /border-top/); assert.doesNotMatch(h4Rule, /border-top/); }); diff --git a/tests/course-separation.test.js b/tests/course-separation.test.js index 9e676e3..40a947a 100644 --- a/tests/course-separation.test.js +++ b/tests/course-separation.test.js @@ -82,10 +82,9 @@ test("모든 교안은 원문 학습 목표를 hero에 한 번만 렌더링하 if (markdown.includes("## 면접 답변 예시")) { assert.match( body, - /
]*role="region"[^>]*tabindex="-1"[^>]*aria-labelledby="면접-답변-예시"[^>]* hidden>/, + /
]*role="region"[^>]*tabindex="-1"[^>]*aria-labelledby="면접-답변-예시"[^>]* hidden>\s*

면접 답변 예시<\/h2>/, lesson.id, ); - assert.match(body, /

면접 답변 예시<\/h2>/, lesson.id); assert.match( body, /data-toggle-model-answer[^>]*aria-controls="lesson-model-answer"[^>]*aria-describedby="lesson-model-answer-help"[^>]*aria-expanded="false"[^>]*>면접 답변 보기<\/button>/,