fix(blog): #118 본문 풀폭·인라인 코드 회색 배경·모바일 줄간격 복원#119
Merged
Conversation
세 가지 스타일 회귀를 원인 커밋 기준으로 바로잡는다. 1. 본문 단락 풀폭 (원인: #70 0b0d8d1) p { max-width: 70ch }가 본문을 약 70자 폭으로 가둬 1024px 칼럼 좌측에 쏠려 보였다. 데스크톱 70ch와 그 짝인 모바일 max-width:none을 함께 제거해 단락이 본문 칼럼 전체 폭을 쓰도록 복원한다. 2. 인라인 코드 회색 배경 (원인: #96 ebf8e35) rehype-pretty-code 옵션 defaultLang을 문자열 'text'로 주면 코드블록뿐 아니라 인라인 코드(백틱 1개)의 기본 언어로도 적용된다. 그 결과 shiki가 인라인 코드를 github-dark로 하이라이팅하고 keepBackground가 다크 배경을 inline style로 주입해 CSS의 --color-gray-100(연회색)을 덮었다. defaultLang: { block: 'text' }로 한정해 코드블록 라인넘버 동작은 유지하면서 인라인 코드는 plain <code>로 남겨 회색 배경을 회복한다. 3. 모바일 본문 줄간격 (원인: #70 0b0d8d1) 모바일 폰트를 12→14px로 키우면서 line-height는 20→22px에 그쳐 줄간격 비율이 1.67→1.57로 좁아졌다. 데스크톱(28px/16px≈1.75)과 같은 비율이 되도록 25px로 복원한다. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
리뷰 nit: 적용값 25px/14px≈1.79를 데스크톱과 '같은 비율(1.75)'이라 적었으나 실제로는 근사이므로, 주석을 '데스크톱 비율(1.75)에 근접(≈1.79)'으로 정정한다. 값(25px) 자체는 픽셀 정합·가독성상 유지한다. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
🔍 다관점 리뷰 (근본원인 · 회귀 · 완전성 · 컨벤션 / 적대적 검증)4개 렌즈로 독립 리뷰 후, material 지적은 적대적으로 재검증했습니다. 결론: APPROVE — 머지를 막는 blocker/major/minor 없음. nit 3건만 도출됐고, 그중 2건을 이 PR에서 반영했습니다(아래 별도 코멘트). 근본원인 진단 정확성
문제 ②의 before/after 실증
// L495-496 — defaultLang이 문자열이면 인라인 코드 기본 언어로도 적용된다
defaultInlineCodeLang = typeof defaultLang === 'string' ? defaultLang : defaultLang.inline || '';
// L560-562 — 기본 언어가 있으면 plain 인라인 코드도 하이라이팅됨
const lang = keepLangPart ? '' : getInlineCodeLang(value, defaultInlineCodeLang);
if (!lang) return; // {block:'text'}면 ''→여기서 early-return → plain <code>
// L417-420 — inline + keepBackground이면 pre의 다크 배경 inline style을 code로 복사
if (inline) { if (keepBackground) { code.properties.style = pre.properties.style } }동일 포스트(
→ 코드블록(```)은 두 경우 모두 검토했으나 문제 아님(refuted/정당한 범위 한정)
잘된 점
※ 이 리뷰는 다관점 에이전트 리뷰 결과를 사람이 검토·정리한 것입니다. |
Owner
Author
🛠️ 리뷰 반영 (미흡사항 개선)리뷰에서 나온 nit 3건에 대한 처리 내역입니다. 반영함
의도적으로 범위 밖으로 둠
최종 검증
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
Closes #118
최근 스타일 수정에서 발생한 3가지 회귀를 원인 커밋 기준으로 바로잡습니다. 모두 빌드 + 렌더된 HTML/CSS로 검증했습니다.
0b0d8d1—p { max-width: 70ch }70ch제거 (+ 짝인 모바일max-width:none정리)ebf8e35—defaultLang: 'text'(문자열)defaultLang: { block: 'text' }0b0d8d1— 14px인데line-height: 22pxline-height: 25px로 비율 복원원인 분석
1. 본문 풀폭
#70에서 데스크톱 가독성을 위해 단락에max-width: 70ch를 넣었는데, 본문 칼럼(max-w-[1024px])보다 훨씬 좁아 텍스트가 왼쪽에 몰리고 우측이 비어 "가운데 정렬이 안 된 것처럼" 보였습니다. 특별한 이유가 없으면 풀폭을 쓰자는 요구에 따라 제거했습니다.2. 인라인 코드 다크 배경 (핵심)
rehype-pretty-code@0.14.3소스(dist/index.js)에서 확인:defaultLang을 문자열'text'로 주면 인라인 코드의 기본 언어로도 적용됩니다. 그러면 plain 인라인 코드(`setTimeout`)도 shiki가github-dark로 하이라이팅하고,keepBackground: true가 다크 배경을 inline style로 주입해 CSS의--color-gray-100(연회색)을 덮어썼습니다.{ block: 'text' }로 한정하면 코드블록 라인넘버 동작은 그대로 유지되고, 인라인 코드는 다시 plain<code>로 남아 회색 배경을 회복합니다.3. 모바일 줄간격
#70에서 모바일 폰트를 12→14px로 키웠지만line-height는 20→22px에 그쳐, 줄간격 비율이 1.67→1.57로 오히려 좁아졌습니다(데스크톱은 28px/16px≈1.75로 정상). 같은 비율이 되도록 25px(≈1.79)로 복원했습니다.검증
pnpm run build성공,lint·tsc --noEmit통과event-loop):<code>setTimeout</code>(inline style/figure 래핑 없음) → CSS--color-gray-100: #f3f4f6적용<pre style="background-color:#24292e">다크 유지70ch완전히 제거 확인🤖 Generated with Claude Code