Skip to content

DITA Bootstrap v6 - #12

Draft
jason-fox wants to merge 2 commits into
developfrom
v6
Draft

DITA Bootstrap v6#12
jason-fox wants to merge 2 commits into
developfrom
v6

Conversation

@jason-fox

Copy link
Copy Markdown
Collaborator

The v6 branch updates the PDF customization plugin (which renders DITA content to PDF using XSL-FO) to match the Bootstrap 6 styling specs, particularly color system upgrades and component rendering.


1. Color Palette Variable Updates

Bootstrap 6 changes color mappings (replacing light / dark with accent / inverse). The PDF attributes and settings files have been updated to reflect these values:

  • Removed Variables: Legacy variables like bootstrap-light, bootstrap-dark, bootstrap-light-subtle, bootstrap-dark-subtle, and their table/button/badge sub-variants.
  • Added Variables:
    • bootstrap-accent / bootstrap-inverse
    • bootstrap-accent-subtle / bootstrap-inverse-subtle (along with their text colors: *-subtle-text)
    • Component-specific variables for tables, buttons, and badges matching accent and inverse.
  • Color Code Alignments: Updated color hex codes across all default variables to match Bootstrap 6 design tokens (e.g. bootstrap-btn-primary-bg changed from #0d6efd to #0087fe).

2. Component Element Matching & Specialization Support

PDF templates were updated to directly check the DITA element names (like self::card or self::drawer) rather than solely relying on class hierarchy matching. This yields cleaner code and better compatibility with DITA 2.0 and custom maps.

  • Cards): cards.xsl
    • Updated element matching to support self::card, self::card-header, and self::card-footer.
    • Added a custom bootstrapDecoration mode override template for cards to prevent background color duplication on card borders and bodies.
  • Alerts alert.xsl
    • Added support for theme- prefixed outputclasses (e.g., theme-success) which are used in Bootstrap 6 alongside alert- styling classes.
    • Added exclusions in the template match statement to prevent other block elements (like drawer, carousel, or accordion) from being processed as alerts.
  • Drawers & Notes ([drawer.xsl/offcanvas.xsl updates]):
    • Standardized drawer element support to mirror the HTML output structure changes.

@jason-fox
jason-fox marked this pull request as draft August 1, 2026 11:52
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