Skip to content

feat(html-to-docx): document CSS styling, prefer inline styles - #6

Draft
nicolasiscoding wants to merge 1 commit into
mainfrom
docs/html-to-docx-css-styling
Draft

feat(html-to-docx): document CSS styling, prefer inline styles#6
nicolasiscoding wants to merge 1 commit into
mainfrom
docs/html-to-docx-css-styling

Conversation

@nicolasiscoding

Copy link
Copy Markdown
Member

Summary

Teaches the turbodocx-html-to-docx skill about CSS styling, while steering generated code toward inline styles as the recommended default.

Motivated by the new documentOptions.css option in @turbodocx/html-to-docx (TurboDocx/html-to-docx#204).

Changes

  • references/usage.md — new "Styling: inline styles vs. CSS stylesheet" section. Leads with inline style="..." as the most reliable, predictable approach (and the form the library resolves everything to internally), then documents documentOptions.css as 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 for documentOptions.css only 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

…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.
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.

1 participant