-
Robert Knight authored
In PDFs, highlights are drawn in an otherwise-transparent text layer _on top_ of a canvas which displays the text that the user sees. Therefore highlights reduce the contrast of the text below and more than two levels starts to make the text very difficult to read. The ideal solution would be to draw the highlights below the text, but that's not trivial. As a simple step to improve the situation, make nested highlights that are 3+ levels deep transparent. This limits the amount of contrast reduction that overlapping highlights can cause. In web pages, the highlights are drawn _behind_ the text, so contrast is not reduced as much, but the same change is applied there for a consistent experience and also because it is easier to implement. Partially addresses: - https://github.com/hypothesis/client/issues/1995 - https://github.com/hypothesis/client/issues/408
2d296040