Hide Empty Elements

Hide any element that doesn't contain content.

Tip: Hiding empty DITA elements is useful to prevent the automatically-generated labels from being added before empty DITA elements.

For examples of such labels, see Cause, Condition, Context, Example, Postreq, Prereq, Remedy, Result, Steps, Stepsection.


Resource location:@import url("https://jorsek.github.io/pdfgen.github.io/styles1.1/modules/styling/hide_empty_elements.css");
Figure 1. Disabled Style.

The “Context”, “Result”, and “Example” labels are added before empty elements.

hide empty element disabled
Figure 2. Enabled Style.

The labels preceding empty DITA elements are hidden.

hide empty elements enabled