CSS-only Tabs Plug-in
This is a DITA-OT Plug-in used to create CSS-only tabbed dialog within DITA HTML output.
Example
Install
Run the plug-in installation commands:
dita install https://github.com/jason-fox/fox.jason.extend.css/archive/master.zip
dita install https://github.com/jason-fox/fox.jason.tabs.css/archive/master.zip
The dita command line tool requires no additional configuration.
Usage
An HTML tabbed box is defined using a <bodydiv>
element
with an @outputclass=tabs
. The default size is 400px high.
Three other sizes are defined:
- small - 200px
- medium - 600px
- large - 1000px
For each tab, just place a <section>
element with a <title>
within the <bodydiv>
as shown:
When running an HTML based transform, the section will be transformed into a tabbed dialog. e.g.:
dita --format html5 --output out --input document.ditamap
To alter the CSS, amend the resource/tabs.css file which is copied over as part of the DITA processing.