ヘッダーの帯を 1025px 以上で追従させる - #3239
Merged
Merged
Conversation
#2877 の「追従しない」を PC だけ覆す。読み進めてもロゴが左上に残り、 長いトップページで検索に手が届く。1024px 以下は本文の面を優先して追従しない。 境界は目次が追従し始める幅と同じ。 帯に連動する3箇所: 目次の top と max-height(帯の下から 24px)、 目次のスクロールスパイの基準線(帯の下辺 + 32px。帯の位置を読むので 幅の分岐を持たない)、html の scroll-padding-top(帯 + 16px)。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
地を 90% にして下の本文を 8px ぼかして透かす。90% は帯の下にコードブロック (#2b2b2b)が来ても ink-mute が AA を保つ値(5.15)。ぼかしが効かない ブラウザでは @supports で不透明のまま。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
2コミット目で追従する帯を磨りガラスにした(レビューの提案)。
実測: 1280px で |
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.
Fixes #3220
#2877 で「追従しない」と決めた帯を、PC(1025px 以上)だけ追従させる。モバイルは今のまま。
判断
変更
.site-header@media (min-width: 1025px)でposition: sticky; top: 0(z-index: 999は既存)htmlscroll-padding-top: 80px(帯 64 + 16)。目次のクリックと見出しのアンカーで見出しが帯の下に隠れない。線に接すると詰まって見えるので 16px 空ける.blog-sidebar .toc-sectiontop: 88px(帯の下から 24px)、max-height: calc(100vh - 112px)sidebar.ejs)getBoundingClientRect().bottomを読むので幅の分岐を持たず、追従しない幅では下辺が負になるので 0 で止める実測(playwright、900px 送った後)
ドロップダウンは送った後も本文の上に開く(既存の
z-index: 999)。make cssの差分は上の3ルール、css_lint/font_size_lint/ textlint 通過。目視のポイント
@mediaの塊を消すだけ🤖 Generated with Claude Code