Fix: Add missing typography indentation rules [main]#2090
Fix: Add missing typography indentation rules [main]#2090wso2-engineering-bot wants to merge 1 commit intomainfrom
Conversation
This fixes indentation issues in documentation after introducing the new theme. Added proper CSS rules for list indentation, nested lists, blockquotes, and other content elements. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
WalkthroughA single CSS file receives 55 new lines of typography styling rules, adding indentation and spacing declarations for lists, nested lists, blockquotes, admonitions, code blocks, and table of contents elements. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@en/theme/material/assets/css/partials/_typography.css`:
- Around line 70-74: The global list rules (.md-typeset ul li and .md-typeset ol
li and the nested-list rules affecting .md-typeset ul li ul li / ol li) are
adding vertical spacing to the Table of Contents; update the TOC-specific
selectors (.md-typeset .toc, .md-typeset .toc ul li, .md-typeset .toc ol li and
nested .md-typeset .toc ul li ul li / ol li) to explicitly reset vertical
margins (e.g., margin-bottom: 0) and any nested-list top/bottom margins so the
TOC uses compact spacing; locate and change the TOC override block that
currently only resets left margins (selectors under .md-typeset .toc) and add
the margin-bottom reset and nested-list resets there to override the global
rules.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 308ef369-ee1a-42d5-acf9-44806d7ea8ef
📒 Files selected for processing (1)
en/theme/material/assets/css/partials/_typography.css
| .md-typeset ul li, | ||
| .md-typeset ol li { | ||
| margin-bottom: 0.5em; | ||
| margin-left: 1.25em; | ||
| } |
There was a problem hiding this comment.
TOC still inherits vertical spacing from global list rules
Line 72 (margin-bottom: 0.5em) and Lines 86-87 (nested list vertical margins) apply to .md-typeset .toc lists too. The TOC override (Lines 110-116) only resets left margins, so TOC items can appear too spaced.
💡 Suggested patch
.md-typeset .toc ul {
margin-left: 0;
+ margin-top: 0;
+ margin-bottom: 0;
}
.md-typeset .toc ul li {
margin-left: 0;
+ margin-bottom: 0;
}
+
+.md-typeset .toc ul ul,
+.md-typeset .toc ul ol,
+.md-typeset .toc ol ul,
+.md-typeset .toc ol ol {
+ margin-top: 0;
+ margin-bottom: 0;
+}Also applies to: 82-88, 110-116
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@en/theme/material/assets/css/partials/_typography.css` around lines 70 - 74,
The global list rules (.md-typeset ul li and .md-typeset ol li and the
nested-list rules affecting .md-typeset ul li ul li / ol li) are adding vertical
spacing to the Table of Contents; update the TOC-specific selectors (.md-typeset
.toc, .md-typeset .toc ul li, .md-typeset .toc ol li and nested .md-typeset .toc
ul li ul li / ol li) to explicitly reset vertical margins (e.g., margin-bottom:
0) and any nested-list top/bottom margins so the TOC uses compact spacing;
locate and change the TOC override block that currently only resets left margins
(selectors under .md-typeset .toc) and add the margin-bottom reset and
nested-list resets there to override the global rules.
|
@wso2-engineering-bot The indentation issue is not yet solved |
This PR was automatically generated by Claude AI.
_typography.cssfile.Changes
Verification
mkdocs buildSummary by CodeRabbit