jelovirt / pdf-generator

DITA-OT PDF plug-in generator
https://dita-generator.elovirta.com/
Apache License 2.0
12 stars 5 forks source link

PDF `--theme`: Border overrides not applied #54

Closed infotexture closed 2 years ago

infotexture commented 2 years ago

When building PDF output with --theme, border overrides are not applied.

For example, if a theme file contains the following entries:

style:
  h1:
    border-after: solid 1pt gray

The first-level headings still use the default thick black bottom borders from the default PDF2 settings.

infotexture commented 2 years ago

@jelovirt Could it be that the PDF2 common.border attribute sets take precedence here despite this rule?

Would it make sense to allow themes to define overrides for common.border properties, so you could adjust border styles for multiple things in one place?

infotexture commented 2 years ago

Update: Looks like this is a bug with the syntactic sugar “desugaring”.

If I replace the border-after shorthand with 3 explicit properties, the overrides are applied as expected.

style:
  h1:
-   border-after: solid 1pt gray
+   border-after-style: solid
+   border-after-width: 1pt
+   border-after-color: gray