The case-sensitive option for search is easy to toggle accidentally on touchscreens (& maybe on desktop) without noticing, which breaks subsequent searches.
But despite its prominent placement I would guess that most people don’t use it. Most search boxes people encounter — on the web, in file managers, and in the apps I’m familiar with — don’t have a case sensitivity toggle right in the search field, or even visible by default. (Clearly some people use it, tho, because there are a few help requests here looking for it.)
I don’t think I’ve used the case sensitivity toggle on purpose even once in nearly 4 years of daily Obsidian use. But I’ve accidentally toggled it several times, and wondered why Search wasn’t finding something I was sure existed.
Proposed solution
Move the case-sensitivity toggle from the search field to the options panel with the other toggles.
/* Hide Search's case sensitivity toggle because I never want it and sometimes trigger it by accident, breaking future searches. Related feature request: https://forum.obsidian.md/t/search-move-case-sensitivity-to-the-options-panel/97586
Code modified from that provided by AForAnglerfishRights (@honeydewmelonbordercollie) at https://discord.com/channels/686053708261228577/694233507500916796/1400404824331386971 to always hide it instead of showing it when the search options are open.
*/
.workspace-leaf-content[data-type="search"] .input-right-decorator {
display: none;
}
This essentially removes the case toggle. To allow it to appear when the search options are open, use the snippet in the next comment instead.
The original CSS snippet that hides the case toggle when search options are closed but shows it when they’re open, in case you ever want to use it (comments added by me):
/* Hide Search's case sensitivity toggle when search options are closed, show it when they're open. Related feature request: https://forum.obsidian.md/t/search-move-case-sensitivity-to-the-options-panel/97586
Code provided by AForAnglerfishRights (@honeydewmelonbordercollie) at https://discord.com/channels/686053708261228577/694233507500916796/1400404824331386971
*/
.workspace-leaf-content[data-type="search"]:has(.search-params[style="display: none;"]) .input-right-decorator {
display: none;
}