Skip to content

Fix: Add missing typography indentation rules [main]#2090

Open
wso2-engineering-bot wants to merge 1 commit intomainfrom
fixing-issue-2088-main-1773820105
Open

Fix: Add missing typography indentation rules [main]#2090
wso2-engineering-bot wants to merge 1 commit intomainfrom
fixing-issue-2088-main-1773820105

Conversation

@wso2-engineering-bot
Copy link
Copy Markdown

@wso2-engineering-bot wso2-engineering-bot commented Mar 18, 2026

This PR was automatically generated by Claude AI.

  • Issue: Indentation issues in docs after introducing new theme #2088
  • Type: Documentation
  • Summary: Fixed indentation issues in documentation after introducing the new theme by adding proper CSS rules for list indentation, nested lists, blockquotes, and other content elements to the _typography.css file.

Changes

  • Added CSS rules for proper indentation of unordered and ordered lists
  • Added proper spacing for nested lists
  • Added indentation rules for blockquotes
  • Added proper spacing for admonitions and code blocks
  • Added table of contents indentation rules

Verification

  • Documentation builds successfully with mkdocs build
  • CSS rules follow Material for MkDocs best practices

Summary by CodeRabbit

  • Style
    • Enhanced typography styling with improved spacing and indentation for lists, nested list items, blockquotes, code blocks, table of contents, and admonition sections for better visual hierarchy and readability.

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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 18, 2026

Walkthrough

A 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

Cohort / File(s) Summary
Typography Styling
en/theme/material/assets/css/partials/_typography.css
Added comprehensive indentation and spacing rules: list margins and padding, nested list vertical spacing, blockquote styling, admonition/details margin resets, code block vertical margins, and table of contents list margin resets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Spacing and margins, now align with grace,
Lists and blockquotes find their proper place,
Indentation rules make typography neat,
CSS tweaks that make the theme complete!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers the core purpose, goals, and approach but significantly deviates from the required template structure with missing standard sections. Align description with the repository template by adding sections like Release note, Documentation, User stories, and other required fields to provide complete context for reviewers.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding missing typography indentation rules to fix CSS styling issues in the documentation theme.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fixing-issue-2088-main-1773820105
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between be2a968 and 0daca18.

📒 Files selected for processing (1)
  • en/theme/material/assets/css/partials/_typography.css

Comment on lines +70 to +74
.md-typeset ul li,
.md-typeset ol li {
margin-bottom: 0.5em;
margin-left: 1.25em;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

@DedunuKarunarathne
Copy link
Copy Markdown
Contributor

@wso2-engineering-bot The indentation issue is not yet solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants