Instantsearch.js: Default theme causes white text on white background on dark GTK+ theme

Created on 22 Aug 2018  路  8Comments  路  Source: algolia/instantsearch.js

Describe the bug 馃悰

Dark GTK+3 (used on Gnome specifically) theme set dark-grey background with white text.
This library sets background to white explicitly, but does not set font color, resulting in _white on white_.

To Reproduce 馃攳
Steps to reproduce the behavior:

  1. Install Gnome 3
  2. Enable GTK+3 dark mode (if not enabled)
  3. Create a searchbox input
  4. Type text into the input

Expected behavior 馃挱
Either don't change background color or also appropriately change font color.

Screenshots 馃枼
Default dark GTK+3 behavior:

With instantsearch.js:

Environment:

  • OS: Linux, Gnome with dark GTK+3 theme
  • Browser: Firefox
  • Version: 62
Easy Theme Bug

Most helpful comment

All 8 comments

Good call, thanks! We should probably _not_ change the background color I think

Since it's not instantsearch.js is not using the common them of InstantSearch just yet, we need to fix that internally first. If you're up for a contribution @Majkl578 that would be veryyyyyy appreciated :)

Thanks, I'm probably not the right guy for _any_ frontend, maybe @senseexception would like to pick this up? :wink:

I'm neither a frontend dev, but this hasn't stopped me doing frontend stuff in the past.

My vacation will be over soon, so maybe I can put this on my todo list.

Okay, looks like a no-brainer that won't take much time.

I guess we should choose to add color: $black instead of removing the background color. In case of websites, that only implemented their own text color but not a background color, removing background: $white might result in similar problems as described by @Majkl578.

If we keep background: $white, the compatibility is still given for those who didn't configured their own background color. Adding color: $black will keep the search-box text readable for every desktop theme.
For the integration on a website, the colors should be set anyway by the designer to prevent off-colored results.

That sounds reasonable @SenseException, adding color: $black seems to be the way to go 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChristopherDosin picture ChristopherDosin  路  4Comments

vvo picture vvo  路  4Comments

nicosrugeris picture nicosrugeris  路  3Comments

devwax picture devwax  路  3Comments

timkelty picture timkelty  路  3Comments