Skip to content

Draw a heavy rule 2px thick in HTML - #115

Merged
HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-67mp1m
Nov 26, 2026
Merged

HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-67mp1m

Conversation

@HarryCordewener

Copy link
Copy Markdown
Member

Requested by Grave · project thread

Fixes SharpMUSH/SharpMUSH#2912.

The layout stylesheet gives a heavy box a 2px border and a double rule a 3px double line, but has no heavy rule override. So .ms-rule.ms-border-heavy drew the same 1px line as single. This PR adds two rules to LayoutCss (and the generated markupstring.css):

.ms-border-heavy.ms-rule::before, .ms-border-heavy.ms-rule::after { border-top-width: 2px; }
.ms-border-heavy.ms-titles > .ms-line { border-top-width: 2px; }

The second covers the line between several titles on a heavy rule, and on a heavy box's top or bottom edge, which had the same gap.

Tests

  • New rules fragment (single, heavy, double, and a heavy rule with two titles). runtime.test.cjs reads each one's computed line width in Chromium: ["1px 1px","1px 1px","3px 3px","1px"] on main, ["1px 1px","2px 2px","3px 3px","2px"] with the fix.
  • Full suite: 1797 passed.

Generated by Claude Code

A heavy box already had a 2px border, but a heavy rule, and the line between
titles on a heavy edge, kept the 1px line of a single one, so the portal drew
rule(...,{"border":"heavy"}) the same as single. The browser test checks the
computed line width of single, heavy and double rules.

Fixes SharpMUSH/SharpMUSH#2912

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rqqt7W3gzmP3nZJkUZeSwE
@HarryCordewener
HarryCordewener marked this pull request as ready for review November 26, 2026 09:07
@HarryCordewener HarryCordewener self-assigned this Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@HarryCordewener
HarryCordewener merged commit 783fb93 into main Nov 26, 2026
7 of 8 checks passed
@HarryCordewener
HarryCordewener deleted the claude/project-thread-67mp1m branch November 26, 2026 09:09
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.

Portal renders a heavy rule() with the same line weight as single

2 participants