連番の箇条書きの字下げを中黒にそろえる - #186
Merged
Merged
Conversation
future-architect#174 で li の字下げを ul / ol の padding へ移すとき、クラス付きの ol を 取り逃していた(テーマの ol.arabic li が詳細度で勝っていた)。 reST の連番は種類ごとにクラスが付くので ol[class] li の形で当てる。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
連番(
1.2.…)の箇条書きだけ、本文の左端が中黒より 28px 右にずれていました。何が起きていたか
#174 で
liの字下げをul/ol側の padding へ移すとき、クラス付きのolを取り逃していました。margin-left.rst-content section ol.arabic li(テーマ).rst-content section ol li(#174)reST の連番は種類ごとにクラスが付きます(
arabic/loweralpha/upperromanなど)。ol[class] liの形にして、どの種類でも当たるようにします。残る 4px は意図です
これで差は 4px になります(中黒 374px / 連番 378px)。中黒は「1.」より字が細く、同じ空きだと広く見えるので、ブログは中黒側の余白だけ狭くしています(0.15em 対 0.4em)。マーカーは右揃えで置かれるため、見た目の空きはそろい、本文の左端が 4px ずれるという形です。
そろえたい場合は、中黒の余白を連番と同じ 0.4em にすれば本文の左端は一致します(そのぶん中黒と本文の空きは広く見えます)。
🤖 Generated with Claude Code