Skip to content

A divider stops at its box's sides in HTML - #54

Merged
HarryCordewener merged 1 commit into
mainfrom
claude/focus-mode-rules-o7mlt0
Oct 8, 2026
Merged

HarryCordewener merged 1 commit into
mainfrom
claude/focus-mode-rules-o7mlt0

Conversation

@HarryCordewener

@HarryCordewener HarryCordewener commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Requested by Grave · project thread

Before: in a box padded 0 (--ms-pad:0ch), every divider ran 1ch past the box's left and right borders. SharpMUSH's +help and +wiki screens draw their frame with pad: 0, so the rule under the namespace table and the "Available help" rule stuck out of the box in the portal.

After: a divider reaches across its box's own padding and stops at the border. In a borderless box it does not reach out at all.

How: .ms-divider uses margin: 0 calc(-1 * var(--ms-pad, 1ch)) instead of a fixed -1ch, and .ms-box.ms-border-none > .ms-divider has no margin. .ms-box now sets --ms-pad: 1ch itself, so a box nested in one padded 0 gets its own 1ch rather than inheriting the parent's 0. Test Divider_InABoxWithoutPadding_ReachesOnlyToItsSides; the full suite passes (1102).

🤖 Generated with Claude Code

https://claude.ai/code/session_018zYSohsQvDRVmjizSfxGWi


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Dividers now extend to the edges of their box’s padding, including boxes with custom or zero padding. Dividers in borderless boxes no longer have extra horizontal margins.

.ms-divider reached 1ch past each side of its box whatever the box's
padding, so a divider in a box padded 0 ran past the border. It now
reaches across --ms-pad, and each box sets --ms-pad itself so a nested
box does not inherit its parent's.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zYSohsQvDRVmjizSfxGWi
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 99900f2f-1806-4928-8475-7724876268c5
📥 Commits

Reviewing files that changed from the base of the PR and between b43ceaf and 8b951be.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • MarkupString.Html/LayoutCss.cs
  • MarkupString.Tests/Layout/BlockLayoutTests.cs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC.


Walkthrough

The CSS now sets --ms-pad on each box. Dividers use the box’s padding to set their horizontal margins, with no margin inside borderless boxes. Tests and the changelog cover the updated behavior.

Changes

Divider padding behavior

Layer / File(s) Summary
Box padding and divider margins
MarkupString.Html/LayoutCss.cs, MarkupString.Tests/Layout/BlockLayoutTests.cs, CHANGELOG.md
Each .ms-box sets --ms-pad: 1ch. Dividers use the box’s padding value for their negative horizontal margin and have no margin inside borderless boxes. Tests check the CSS and a zero-padding box. The changelog describes the update.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: claude

Merge Risk: ⚪ Minimal · up to 8b951

Dividers follow their box’s padding, including zero-padding and borderless boxes. No actionable merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: HTML dividers now stop at the sides of their containing box.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@HarryCordewener
HarryCordewener merged commit b47d2c1 into main Oct 8, 2026
7 checks passed
@HarryCordewener
HarryCordewener deleted the claude/focus-mode-rules-o7mlt0 branch October 8, 2026 05:41
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