asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
341 stars 97 forks source link

ToC placement "preamble" / "macro" forces white background for ToC #849

Closed ViToni closed 9 months ago

ViToni commented 9 months ago

Using the preview mode with the ToC placement macro / preamble with a custom "Workbench: Color Theme" (in this case "Red" to make it stand out more but usually it would be more switching between light / dark modes I guess)

The default :toc: or explicitly calling :toc: auto are shown just fine:

grafik

ToC placement preamble shows "light" colored ToC background:

grafik

ToC placement macro shows "light" colored ToC background:

grafik

System information: Version: 1.86.2 Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda Date: 2024-02-13T19:42:13.651Z Electron: 27.2.3 ElectronBuildId: 26908389 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin x64 23.3.0 AsciiDoc: v3.2.0

ViToni commented 9 months ago

Checking the HTML output from auto against macro/ preamble the difference seems to be:

So the assumption is, that macro/ preamble triggers: https://github.com/asciidoctor/asciidoctor-vscode/blob/26c8034cd915118f37be0fb759c2dd04db6a46f1/media/asciidoctor-editor.css#L1061-L1071

or respectively: https://github.com/asciidoctor/asciidoctor-vscode/blob/26c8034cd915118f37be0fb759c2dd04db6a46f1/media/asciidoctor-default.css#L901-L907