dbmdz / mirador-textoverlay

Text Overlay plugin for Mirador 3
https://mirador-textoverlay.netlify.com/
MIT License
50 stars 14 forks source link

Add support for customizing selection colors. #119

Closed jbaiter closed 3 years ago

jbaiter commented 3 years ago

This introduces a new theme section textOverlay that allows customization of the text selection foreground and background color, as well as the general font-family to use for rendering text. This improves text selection aesthetics for hidden text in WebKit-based browsers, which did not display the selected text before. The default colors are dark blue with a white foreground, due to the WCAG-compliant contrast ratio of 7:1.

Before ![image](https://user-images.githubusercontent.com/608610/115704546-c7921580-a36b-11eb-9d78-6b56b424bf33.png)
After ![image](https://user-images.githubusercontent.com/608610/115704438-aaf5dd80-a36b-11eb-9c68-73603b338ac9.png)