feat(html-to-docx): document CSS styling, prefer inline styles - #6
Draft
nicolasiscoding wants to merge 1 commit into
Draft
feat(html-to-docx): document CSS styling, prefer inline styles#6nicolasiscoding wants to merge 1 commit into
nicolasiscoding wants to merge 1 commit into
Conversation
…e styles Add a 'Styling: inline styles vs. CSS stylesheet' section to usage.md and a code-generation note in SKILL.md. Leads with inline style attributes as the recommended, most predictable approach (the form the library resolves to internally) and presents documentOptions.css as a supported secondary option, documenting its limits (!important and @media unsupported, inline wins). Bumps skill version to 1.3.0.
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
Teaches the
turbodocx-html-to-docxskill about CSS styling, while steering generated code toward inline styles as the recommended default.Motivated by the new
documentOptions.cssoption in@turbodocx/html-to-docx(TurboDocx/html-to-docx#204).Changes
references/usage.md— new "Styling: inline styles vs. CSS stylesheet" section. Leads with inlinestyle="..."as the most reliable, predictable approach (and the form the library resolves everything to internally), then documentsdocumentOptions.cssas a supported secondary option with its limits: inline wins, standard specificity,<style>honored, and not supported:!important, at-rules (@media/@supports), external<link>.SKILL.md— code-generation note telling the skill to default to inline styles in the HTML it produces, and to reach fordocumentOptions.cssonly when the user already has a stylesheet, explicitly wants selector-based styling, or is generating highly repetitive markup. Version bumped to 1.3.0.Why inline-first
The library resolves stylesheets down to per-element inline styles before building the document, so inline is the canonical form — what you write is exactly what gets applied, with no cascade/specificity surprises, and it works on every version of the package. The stylesheet path is a convenience for reuse, not the default.
🤖 Generated with Claude Code