CanisLupus / swift-selection-search

Swift Selection Search (SSS) is a simple Firefox add-on that lets you quickly search for some text in a page using your favorite search engines.
https://addons.mozilla.org/firefox/addon/swift-selection-search/
MIT License
215 stars 26 forks source link

Add transparent background to popup's text field #223

Closed igorofc closed 3 years ago

igorofc commented 3 years ago

Hey Daniel! This is just something I did awhile ago. A minor stylistic modification to make the popup's text field match the background color of the popup. Currently, it stays white when the user changes the said color:

image

With this modification, it would look like this:

image

With the help of the mix-blend-mode property we shouldn't worry about the text color since it will automatically contrast with the background.

I'm personally not using the popup lately - only shortcuts :) - but I thought it would be an improvement. If you think it should stay as it is, no problem.

CanisLupus commented 3 years ago

Hey Igor! The fact that the text field doesn't adapt to the chosen background color actually came to my mind this weekend for no reason, but I had no conclusions. :) Btw, it's issue #169.

This is probably not the right way because blend modes will most likely have many ugly cases. With this approach we'd get these (I admit they are probably uncommon colors, but just a sample):

image image image

While previously the user could see the text clearly on the white box even if it was ugly, in these examples it becomes much harder to read and they can do nothing about it since there's no option to change text colors.

There's also the side effect of the chosen highlight color not being respected anymore when hovering the text field, and the text field's border becoming much more "present" than before:

image

I'd also like to avoid more options just for this, but to make this automatic it would have to carefully consider any color choices by the user (and probably pick one of 2 text colors, plus a background color that is probably just the popup background color but a little darker/lighter). No sure if this is worth it, though! :)

igorofc commented 3 years ago

Hey. Yeah it's not worth the all the hassle for now. Closing this!