keepassxreboot / keepassxc-browser

KeePassXC Browser Extension
GNU General Public License v3.0
1.72k stars 176 forks source link

[Feature] support macOS highlight color #2127

Open foss- opened 6 months ago

foss- commented 6 months ago

Currently e.g. in the login selection dropdown, the highlight color of the selected login is green.

Expected Behavior

It would be nice, if KeePassXC-Browser used the Highlight color set in macOS System Settings > Appearance > Highlight color. 1

Debug info

KeePassXC 2.7.6 KeePassXC-Browser 1.8.12 Operating system: macOS 13.6.4 Browser: Firefox 123.0

varjolintu commented 6 months ago

Is there a browser API that can achieve this?

foss- commented 6 months ago

Valid question. Not entirely sure. Tested switching to yellow and that was not reflected in Firefox selections.

Then again the 1Password extension does indeed reflect the yellow, set as accent color (not highlight color), when presenting logins in Firefox. So it seems possible. 2

varjolintu commented 6 months ago

FYI: This is restricted to checkbox, radio, range and progress elements: https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color Also this is restricted to Firefox: https://developer.mozilla.org/en-US/docs/Web/CSS/system-color Returning accentColor from getComputedStyle() will not work either, because the value is restricted to auto for fingerprint resistance.

The only way to do this would be using a custom checkbox element that behaves like a normal div.