html/layout: optional flush (outline) list-marker alignment#363
Open
carlos7ags wants to merge 1 commit into
Open
html/layout: optional flush (outline) list-marker alignment#363carlos7ags wants to merge 1 commit into
carlos7ags wants to merge 1 commit into
Conversation
58b1098 to
ce8a2d8
Compare
kuadrosx
approved these changes
Jun 20, 2026
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.
Follow-up to #358/#360. Adds an opt-in mode that draws every nested list
marker in the container's left column (all numbers share one left edge) while
the body text still cascades per level — the "outline" style common in legal
documents — as an alternative to the per-level marker indent that is now the
default.
Comparison
Same Master Services Agreement (
examples/legal-numbering), rendered both ways:In nested,
1.2.1./1.2.2.indent under "Services"; in flush they stay in theleft column and the clause bodies hang. Reproduce locally by rendering the
legal-numberingexample HTML with&fhtml.Options{FlushListMarkers: true}.API
Document-wide, off by default:
Underneath,
layout.List.SetMarkerFlush(bool)toggles it; sub-lists inheritthe value. Only the left-to-right outside path is affected; RTL and
list-style-position: insideare unchanged. Default (nested) output isbyte-identical.
Scope
Kept intentionally minimal: a single document-wide option, no new CSS
property. If per-
<ol>control within one document is needed later, a(non-standard) CSS property can layer on top of the same
SetMarkerFlushplumbing.
Tests
TestNestedMarkerFlush(layout: all markers share x=0 while bodies cascade) andTestFlushListMarkersOption(the Options toggle reaches the layout and changesthe render while numbering stays intact). Full module suite passes.