Skip to content

Embed only the CSS each HTML page needs - #26

Merged
prozolic merged 1 commit into
mainfrom
claude/htmlgenerator-css-optimization-a74290
Aug 5, 2026
Merged

Embed only the CSS each HTML page needs#26
prozolic merged 1 commit into
mainfrom
claude/htmlgenerator-css-optimization-a74290

Conversation

@prozolic

@prozolic prozolic commented Aug 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings August 5, 2026 13:44
@prozolic
prozolic merged commit 7d2c3a1 into main Aug 5, 2026
2 of 3 checks passed
@prozolic
prozolic deleted the claude/htmlgenerator-css-optimization-a74290 branch August 5, 2026 13:46

Copilot AI left a comment

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.

Pull request overview

This PR refactors HTML generation to emit page-specific embedded CSS, aiming to reduce per-page CSS payload by selecting only the styles required for each generated HTML page type.

Changes:

  • Introduces HtmlPageKind and threads it through GenerateTemplateHtml/label page generation to identify which page is being rendered.
  • Replaces monolithic CSS generation with segmented CSS blocks and a GetCssStyle(pageKind) selector to embed only the necessary CSS per page.
  • Updates index, daily, and label pages to pass the correct HtmlPageKind so each page gets the intended stylesheet subset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/PRDigest.NET/HtmlGenerator.cs
Comment thread src/PRDigest.NET/HtmlGenerator.cs
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