Styling the background of search box when nothing found

I'm currently using the OLED Dark theme and when I type a search term in the in-note ctrl-f search box and there are no results, the background changes to dark blue. I know this is a really minor thing, but blue is the accent colour in this theme so it's not really apparent that this colour change is indicating something negative, i.e. no results. To me, negative colour changes are supposed to be red.

Different themes use different colours for no-result. Is there a way to change this with css in userchrome.css? It appears that there is not. The code for the box is

<input placeholder="Search..." type="text" value="notinthedocument" style="width: 200px; margin-right: 5px; background-color: rgb(0, 0, 0); color: rgb(221, 221, 221);">

When I use the inspector, the style changes when no result is found.

I realize that when there are results there is the text x/y. But I wonder if it shouldn't also give a text notice like "No Results."

I actually don' use the in-note search that often so I have to relearn how it works each time. I think having a text notice alerting to no results is fairly standard, isn't it?

This is obviously a very minor thing.

Looks like the colour of that box is determined by the Joplin theme. Specifically the warning background colour. I think it makes sense that this colour should stand out more to signal it's position as a warning.

This is also a good idea, but personally, I don't like these kind of alerts so I hope nobody implements it :sweat_smile:

I think we could change the theme in the main app because it's true that blue is not great as an accent colour. Do you have any suggestion on how it could look for dark themes?

pastel orange background with black text. not too bright, otherwise it will cook your brain. :wink:

P.S.: It should have a css class to allow for customization.

Sorry, I dont think I explained it properly. I didn't mean a popup alert. I just meant that "nothing found" would replace the X/Y indicator.

Personally, looking at other themes I don't think the background colour change works well. I don't know, but in terms of accessibility, text makes more sense than colour change. Consider colour blindness.

1 Like

I see what you mean, that does seem to be the best option (although the colour probably is due for a change as well). I think it's probably not too difficult to implement either.

I just checked, and it looks like firefox does both

I'm going to create an issue for this and label it "Good first issue". Hopefully it gets picked up soon.

edit: You can find it here

Chrome and Edge does this:
image

So, no colour, and instead of a "not found" text it just shows 0/0. Not my favourite option, but might be simpler to code.

I think FireFox is good in that it gives a red colour indication, but it's not the background of the box.

Opera does background and text message:

LibreOffice changes the colour of the text in the search box and gives a text message:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.