Implementing shared CSS table formatting across the Oxygen editor, PDF Chemistry, and HTML5/WebHelp
Posted: Wed Jun 29, 2022 10:35 pm
I am implementing CSS files to be shared across
In addition, I needed to implement default borders like this (color/thickness used for emphasis):
but these default borders should be overridden by any <table frame="..."> or @rowsep/@colsep settings.
Here is what I found:
Here is a testcase showing how to apply common CSS table styling:
The borders are color-coded as follows:
- the Oxygen editor
- PDF Chemistry output
- HTML5/WebHelp output
In addition, I needed to implement default borders like this (color/thickness used for emphasis):
but these default borders should be overridden by any <table frame="..."> or @rowsep/@colsep settings.
Here is what I found:
- In the Oxygen editor, <table frame="..."> styling is applied to <tgroup> elements.
- In PDF Chemistry and HTML5/WebHelp, <table frame="..."> is styled on <table> elements.
- In the Oxygen editor, @rowsep is set on <row> elements.
- In PDF Chemistry and HTML5/WebHelp, @rowsep becomes "rowsep-0" and "rowsep-1" @class values on <row> elements.
- In the Oxygen editor, @colsep is set via @colsep attributes in <colspec> elements.
- In PDF Chemistry and HTML5/WebHelp, @colsep becomes "colsep-0" and "colsep-1" @class values on <entry> elements.
- In the Oxygen editor, row separators must be applied to <entry> elements because they are ignored on <row> elements.
Here is a testcase showing how to apply common CSS table styling:
The borders are color-coded as follows:
- Red borders represent <table frame="..."> borders.
- Green borders represent @rowsep/@colsep borders.
- Blue borders represent the default border styling.