## Description This changes highlighting from using keyboard shortcuts to use white instead of black. [Allows actually seeing the highlighting noticeable in high contrast mode](https://meta.stackoverflow.com/a/420420). The userstyle only works for dark mode, it does not have any effect in light mode. ## Installation You need an extension for managing userstyles, like [Stylus](https://add0n.com/stylus.html). - [For Chrome](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne) - [For Firefox](https://addons.mozilla.org/en-US/firefox/addon/styl-us/) - For Opera - the Chrome addon should be compatible with Opera. With a userstyle manager: [Direct install (GitHub)](https://github.com/PurpleMagick/userstyles/raw/main/stackoverflow/white-keyboard-highlight-dark-theme.user.css) [See the code on GitHub](https://github.com/PurpleMagick/userstyles/blob/main/stackoverflow/white-keyboard-highlight-dark-theme.user.css) ```lang-css /* ==UserStyle== @name White highlight on dark background @description Makes the keyboard selection highlight white when using dark themes @namespace https://github.com/PurpleMagick/ @version 1 @author VLAZ @license MIT ==/UserStyle== */ @-moz-document domain("stackoverflow.com") { body.theme-dark .keyboard-selected { box-shadow: 15px 15px 50px rgba(255, 255, 255, .2) inset; } } ``` ## Examples ### Regular dark mode #### Before [![Dark mode with the second of four questions selected. The dark highlighting is hard to distinguished and makes the question appear "pressed".][1]][1] #### After [![Dark mode with the second of four questions selected. The white highlighting makes the question pop out more.][2]][2] ### High contrast dark mode #### Before [![High contrast dark mode with the second of four questions selected. The black highlight on black background is impossible to see.][3]][3] #### After [![High contrast dark mode with the second of four questions selected. The white highlight on black background is possible to see.][4]][4] [1]: https://i.sstatic.net/kFQR6.png "Dark mode with the second of four questions selected. The dark highlighting is hard to distinguished and makes the question appear \"pressed\"." [2]: https://i.sstatic.net/nTZPQ.png "Dark mode with the second of four questions selected. The white highlighting makes the question pop out more." [3]: https://i.sstatic.net/6qL4O.png "High contrast dark mode with the second of four questions selected. The black highlight on black background is impossible to see." [4]: https://i.sstatic.net/Uwtc7.png "High contrast dark mode with the second of four questions selected. The white highlight on black background is possible to see."