asciidoctor / asciidoctor-maven-plugin

A Maven plugin that uses Asciidoctor via JRuby to process AsciiDoc source files within the project.
http://asciidoctor.org
Apache License 2.0
318 stars 122 forks source link

Fix background color leaking into tables in asciidoctor-parser-doxia-module #948

Open abelsromero opened 1 day ago

abelsromero commented 1 day ago

What is this issue about?

Description

The default style does not enforce the background color for table, and that causes the color of the enclosing element to leak.

For example, see this table in an example block.

image

vs the original Asciidocotor conversion

image

abelsromero commented 1 day ago

Quick test, adding background to the table solved this. But we need to consider how many customer style are we injecting, at some point it will require a refactor.

sink.table(SinkAttributes.of(HTML.Attribute.STYLE,"background: #fff;"));