Support ordered groups of inline stylesheets in Verso Manual
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- documentation
Research direction
Start with the extraCss collection in src/verso-manual/VersoManual/Html/Features.lean and the page emitter in src/verso-manual/VersoManual/Html.lean. Trace how extensions and project head entries contribute styles in single-page and multipage output, then identify where an ordered group can preserve the specified cascade placement. Done means the regression cases in the issue pass, including repeat use, unrelated sheet changes, and a later project override.
Written by the indexing model from the issue text.
Description
Manual extensions can contribute inline CSS through extraCss. The traversal state collects it in a hash set, and the page emitter uses extraCss.toArray. The CSS cascade resolves equal-specificity rules by source order, so changes to the set of collected sheets can change which rule wins.
In Verso Blueprint's visual redesign, removing the stylesheet for an unrelated style switcher moved the Blueprint block stylesheet from tenth to first among 14 inline style blocks. Verso's docstring rules then overrode the Blueprint rules and declaration panels grew from 0.86rem to 1rem. The declaration-panel rules themselves were unchanged.
Could Manual let an extension declare its own inline stylesheets as an ordered group, with documented placement in the page cascade? Blueprint needs Manual defaults first, then its own sheets in declared order, followed by project overrides supplied as head entries. Projects and other extensions can also contribute extraCss, including selectors for Blueprint classes. A group would let Blueprint state its own order without taking ownership of those sheets. The API shape is open.
As a regression case, register two sheets in one group with different values for the same property and selector. Check that the second sheet wins in single-page and multipage output after adding, editing or removing an unrelated sheet. Repeated uses of the same extension should emit its group only once, and a later project head override should still win a tie.
Blueprint currently marks its own sheets and emits an ordered copy before project head entries. The original copies still appear in every page. In the reported starter Addition example, the HTML grew from 210 KB to 268 KB with the workaround. An upstream ordering mechanism would let us remove the duplicate emission. This request is for inline CSS, independently of linked stylesheet and script assets.
- Dominant language
- Lean
- Stars
- 420
- Forks
- 134
- Avg merge
- 1d 9m
- Merged PRs (30d)
- 46
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from leanprover/verso
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
leanprover/verso#972 ·
Maintainers usually reply within 1 day
-
`"&"` in docstring of `Html.text` is not rendered literallyMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
leanprover/verso#898 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
leanprover/verso#1125 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 55/100
leanprover/verso#1107 ·
Maintainers usually reply within 1 day
-
`ptrEqThen`'s compiled implementation disagrees with its definition when `beq` is not reflexiveOpen
Difficulty 4/5 3-5 days Newbie friendliness 35/100
leanprover/verso#1095 ·
Maintainers usually reply within 1 day
All issues in leanprover/verso
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
優先度たかし
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
lean-ja/lean-by-example#2681 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
laststance/design-world#79 ·
Maintainers usually reply within 1 day
-
v2
Difficulty 1/5 Under an hour Newbie friendliness 86/100
modelcontextprotocol/python-sdk#3978 · 2 comments ·
Maintainers usually reply within 1 day