Skip to content

Delete HtmlCss rather than deprecating it - #3

Merged
HarryCordewener merged 1 commit into
mainfrom
remove-htmlcss
Sep 7, 2026
Merged

Delete HtmlCss rather than deprecating it#3
HarryCordewener merged 1 commit into
mainfrom
remove-htmlcss

Conversation

@HarryCordewener

@HarryCordewenerHarryCordewener commented Sep 7, 2026

Copy link
Copy Markdown
Member

Removes HtmlCss from MarkupString.Html. Use AnsiCss.Fixed — the rules are byte-identical.

Why

Every ms-* class — ms-bold, ms-faint, ms-italic, ms-underline, ms-strike, ms-overline, ms-blink, ms-invert, ms-cmd-link — is written by MarkupString.Ansi's AnsiHtmlEmitter. MarkupString.Html writes none of them; it emits the tag it was handed. Someone rendering HTML from MarkupString + MarkupString.Ansi therefore got classes with no rules anywhere in their dependency graph, and no reason to guess the fix lived in a package about raw tags. AnsiCss.Fixed (added in 2c29bfc) puts the sheet where the classes come from.

HtmlCss was left behind as an [Obsolete] forwarder. That was the wrong instinct: a deprecation buys a migration window for consumers you cannot reach, and this library is a day old with one consumer. All it bought was two public names for the same string and a member to carry forever.

Ships as v1.1.0, with 1.0.0 unlisted

Removing public API from a published version is a break, so strictly this wants a major. It ships as a minor instead because 1.0.0 went out the same day and nothing consumes it — unlist 1.0.0 on nuget.org before tagging, which turns "no one is broken" from an assumption into a fact. A pinned exact version still restores; nothing new resolves to it.

PublicAPI.Unshipped.txt records both symbols as *REMOVED*, so the removal is reviewed rather than merely permitted. PackageValidationBaselineVersion comes off for this build — the surface being removed from is the surface it would validate against — and goes back to 1.1.0 once that is published; docs/releasing.md carries both halves.

Verified

  • Build clean, 463 tests pass (including the two new guards that hold AnsiCss.Fixed and the emitter together in both directions: every class the emitter can write has a rule, and every rule is for a class it can write).
  • dotnet pack clean on all three packages.

🤖 Generated with Claude Code

@coderabbitai

coderabbitaiBot commented Sep 7, 2026

Copy link
Copy Markdown

Review 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: da2682e0-8bb8-4101-8758-0a54ecf7711e

📥 Commits

Reviewing files that changed from the base of the PR and between b0ed2e7 and 493d4e4.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • MarkupString.Ansi/MarkupString.Ansi.csproj
  • MarkupString.Html/HtmlCss.cs
  • MarkupString.Html/MarkupString.Html.csproj
  • MarkupString.Html/PublicAPI.Shipped.txt
  • MarkupString.Html/PublicAPI.Unshipped.txt
  • MarkupString/MarkupString.csproj
  • docs/releasing.md
💤 Files with no reviewable changes (2)
  • MarkupString.Html/HtmlCss.cs
  • MarkupString.Html/PublicAPI.Shipped.txt

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.


Walkthrough

The change removes the obsolete MarkupString.Html.HtmlCss API, documents AnsiCss.Fixed as the stylesheet source, and updates package-validation baseline instructions for regular and major releases.

Changes

API and release validation

Layer / File(s)Summary
Remove HtmlCss API
CHANGELOG.md, MarkupString.Html/HtmlCss.cs, MarkupString.Html/PublicAPI.*.txt
Removes MarkupString.Html.HtmlCss and its Fixed member. The changelog directs users to AnsiCss.Fixed.
Update package-validation guidance
MarkupString.Ansi/MarkupString.Ansi.csproj, MarkupString.Html/MarkupString.Html.csproj, MarkupString/MarkupString.csproj, docs/releasing.md
Documents updating PackageValidationBaselineVersion after each release. Major releases can omit the baseline before establishing the new major-version baseline.

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

Merge Risk:⚪ Minimal · up to 493d4

This removes the obsolete HtmlCss API and directs consumers to AnsiCss.Fixed. The breaking change and release guidance are documented, with no current merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly and concisely describes the main change: removing HtmlCss instead of retaining it as a deprecated API.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

Marking it obsolete and forwarding to AnsiCss.Fixed was the wrong instinct: a
deprecation buys a migration window for consumers you cannot reach, and this
library is a day old with one consumer. What it actually bought was two public
names for the same string and a member to carry forever.
So it goes. AnsiCss.Fixed is the stylesheet; MarkupString.Html writes no ms-*
class and has no reason to name one. The removal is recorded as *REMOVED* lines
in PublicAPI.Unshipped.txt.
Removing public API from a published version is a break, so this ships as 1.1.0
with 1.0.0 unlisted rather than as a major: 1.0.0 went out the same day and
nothing consumes it, so unlisting makes "no one is broken" a fact rather than
an assumption. PackageValidationBaselineVersion comes off for this build,
because the surface being removed from is the surface it would validate
against, and goes back to 1.1.0 once that is published. docs/releasing.md
carries both halves.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@HarryCordewener
HarryCordewener merged commit 26581a4 into mainSep 7, 2026
7 checks passed
@HarryCordewener
HarryCordewener deleted the remove-htmlcss branch September 7, 2026 07:39
Sign up for freeto 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.

1 participant

@HarryCordewener