Conversation
本文の左端より最大 64px 外へ出す。左に空いている余白へロゴを置く。 Cloudflare Blog が同じ形で、実測すると `max(16px, (100vw - 1440px)/2 - 64px)`——本文の枠より 64px 左、ただし 画面端から 16px より近づけない。動かすのはロゴだけで、ナビ・検索・ 下に開くパネルは本文の右端にそろえたまま(#2877 のパネルの基準を崩さない)。 出す量を固定にできないのは、左の余白が幅で 16〜300px と変わり単調でもないため (1366px で 113px、1400px では container が 1140→1320 に跳ねて 40px)。 余白のぶんだけ出して 64px で頭打ちにする。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
#3289 ごと見送りになったのでクローズします。 |
Closed
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 #3289
やったこと
ヘッダーのロゴ(
.header-brand)を、本文の左端より最大 64px 外へ出す。左に空いている余白へ置く。動かすのはロゴだけで、ナビ・検索・下に開くパネルは本文の右端にそろえたまま。Cloudflare Blog の実測
issue の「左のサイドバーの位置にずらす」を実際にやっている例として Cloudflare Blog をヘッドレスで測った。ルールは CSS に直接書いてあった:
本文の枠より 64px 左、ただし画面端から 16px より近づけない。
右側のナビ(Products〜Contact Sales)は枠の位置に残っていて、外へ出しているのはロゴだけだった。
出す量を固定にできない理由
左の余白は幅によって 16〜300px と変わり、単調ですらない:
1366px で 113px 空いているのに 1400px では 40px に縮む(container が 1140→1320 に跳ねるため)。固定量で寄せると #2901 の「どの幅でも揃わない=揃え損ねに見える」に当たる。余白のぶんだけ出して 64px で頭打ちにすれば、狭いところでは出ず、広いところでは一定の距離になる。
実装
.header-brandの負のマージンだけ。.header-barは.containerのままなので、#2877 のパネルの位置の基準(right: 0が本文の右端)は崩れていない。50vwから引くのは container の半分 + 左右の余白 12px。100vwはスクロールバーを含むので、余白いっぱいまで出すと画面の外へ出る。12px を引いた残りを上限にしてある。効かせるのは 992px から(#3222 の「ナビが引き出しに入る」境界。引き出しに入る幅では帯が詰まっていて左の余白の話にならない)。実測(ローカル、スクロールバーあり)
scrollWidthclientWidth)scrollWidth == clientWidth(横スクロールは出ない)範囲外
viewBoxの x=0 に届いているのはクリムゾンの線の先端だけで、FUTURE の「F」は箱の左端から 8.45px 内側)。64px 外へ出した後は本文とそろえる相手が無くなるので、この PR では触らない検証
make css→node css_lint.mjs(3検査とも通過)・node font_size_lint.mjs(段に収まる)npx markdownlint-cli2 CLAUDE.md(0 issues)getBoundingClientRect()を読んだ実測🤖 Generated with Claude Code