I can’t seem to get your above snippet to do anything for me – looking at the PDF itself, embedded in a note, or in the Canvas.
This is working on my end (without the :first-child.endOfContent
part) and nothing changing after a minute or so:
.theme-dark .pdf-container:has(.textLayer) canvas {
filter: invert(0.9);
}
maybe give that a try?