feat(converter): add theme color resolution and @page CSS support#87
Merged
feat(converter): add theme color resolution and @page CSS support#87
Conversation
Theme Color Resolution: - New ResolveThemeColors setting (default: true) enables theme color resolution - Reads color scheme from theme1.xml (a:clrScheme element) - Supports all 12 theme colors: dk1, lt1, dk2, lt2, accent1-6, hlink, folHlink - Applies w:themeTint (lighten) and w:themeShade (darken) modifiers - Resolves w:themeColor in run colors, paragraph shading, cell shading, and fills - Falls back to explicit color value if theme color not found @page CSS Rule: - New GeneratePageCss setting (default: false) enables @page rule generation - Reads page dimensions from w:sectPr/w:pgSz and margins from w:sectPr/w:pgMar - Generates CSS @page { size: Xin Yin; margin: ... } rules - Supports US Letter, A4, and custom page sizes with proper inch conversions Tests: - Added 7 new tests for theme color and @page CSS functionality Addresses converter gaps #1 (No Page/Document Setup CSS) and #6 (Theme Colors Not Resolved)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
w:themeColorattributes to actual RGB values from document theme@pagerule generation for print stylesheets and PDF generationChanges
Theme Color Resolution
ResolveThemeColorssetting (default: true) enables theme color resolutiontheme1.xml(a:clrSchemeelement)w:themeTint(lighten toward white) andw:themeShade(darken toward black) modifiersw:themeColorin run colors, paragraph shading, cell shading, and fills@page CSS Rule
GeneratePageCsssetting (default: false) enables@pagerule generationw:sectPr/w:pgSzand margins fromw:sectPr/w:pgMar@page { size: Xin Yin; margin: ... }rulesTest plan
Documentation
docs/architecture/wml_to_html_converter_gaps.mdto mark issues ci: bump actions/setup-dotnet from 4 to 5 #1 and deps: Bump SkiaSharp from 2.88.9 to 3.119.1 #6 as resolvedCHANGELOG.mdwith new features