Will Native PDF's CSS let me use a pseudo-class?
In our DITA content, sometimes we have a <fig> with no <title> inside, and sometimes there's a title.
We move the title to the bottom, and so in the cases where a title is present in the <fig>, we want to give the <fig> element some padding at the bottom... but only in the cases where the <fig> has a <title>.
In the intermediate HTML, the <fig> becomes <figure>, and the <title> becomes <figcaption>.
So, in our CSS for making a Native PDF, I set up a very simple pseudo-class:
figure:has(figcaption) {
border: 0.5pt solid blue;
padding-bottom: 24pt;
}
...with the border there so I could see whether the element was being selected.
When I output the merged HTML and look at it in Chrome or Edge, this works fine. In the output PDF, however, this doesn't work. The element is not selected and is not formatted.
So, I'm wondering if there are any special considerations for using pseudo-classes in CSS with Native PDF... or alternatively, can you suggest a way to select the parent element when a figcaption element appears... but in a way that doesn't require ":has"?
Thanks,
Eric A.