# Newbie question around cursor colors and file nav selections with a custom obsidian.css

**URL:** <https://forum.obsidian.md/t/newbie-question-around-cursor-colors-and-file-nav-selections-with-a-custom-obsidian-css/108931>\
**Category:** Devs: Theme Design & Custom CSS\
**Tags:** custom-css\
**Created:** [December 12, 2025, 2:29am UTC](https://forum.obsidian.md/t/newbie-question-around-cursor-colors-and-file-nav-selections-with-a-custom-obsidian-css/108931 "2025-12-12T02:29:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ILikeVoltron](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/i/ed655f/32.png) [@ILikeVoltron](https://forum.obsidian.md/u/ILikeVoltron)\
**Post date:** [December 12, 2025, 2:29am UTC](https://forum.obsidian.md/t/newbie-question-around-cursor-colors-and-file-nav-selections-with-a-custom-obsidian-css/108931/1 "2025-12-12T02:29:52Z")

</div>

Hello friends!

I have what I hope is a simple question!

When using the “Files: Show File Explorer” my obsidian directory is shown with it’s custom colors, I defined those in snippets/obsidian.css with something like the following:

```css
.nav-folder-title[data-path*="DirectoryName"], .nav-file-title[data-path*="DirectoryName"] { color: ...; background: ...; }

```

My challenge is that when combined with a theme like flexoki or minimal, the outline color for the selection is difficult or impossible to discern (attached screenshots show this). I tried playing around with the box-shadow options in obsidian.css, but I lack the full understanding of how to get what I’m looking for.

 ![share6](https://forum.obsidian.md/uploads/default/original/3X/d/4/d4a7a317eef9a0d4b2c6942e77ddb77d66899030.png)

 ![share5](https://forum.obsidian.md/uploads/default/original/3X/8/2/823ff934542822e9059a9bd8f87504fc21d77452.png)

Things I’ve tried:

```css
.nav-files-container .nav-folder {
        box-shadow: 0 0 0 2px rgb(15, 15, 15);
}

```

Which does alter the non-selected boxes to the right color but it doesn’t follow the focus of the cursor.

Thank you for taking the time to read and understand my problem, I hope we can find a solution.

---

<div class="post-metadata">

**Author:** ![ILikeVoltron](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/i/ed655f/32.png) [@ILikeVoltron](https://forum.obsidian.md/u/ILikeVoltron)\
**Post date:** [December 12, 2025, 5:31pm UTC](https://forum.obsidian.md/t/newbie-question-around-cursor-colors-and-file-nav-selections-with-a-custom-obsidian-css/108931/2 "2025-12-12T17:31:21Z")

</div>

Just wanted to update the thread, apparently using vim mode causes some other cursor issues, as it affects using block or line depending on vim mode, this is all fine and good but doesn’t help me figure out further why the color of the cursor in the file panel is different from the cursor in the editor panel.

I also tried changing the accent color as found in settings → appearance, but this only changed all the OTHER cursors, plus the background on checkboxes and the like.

Then I followed these instructions and still can’t seem to change the cursor in the file browser:

> [@Caret/Cursor thickness](https://forum.obsidian.md/t/caret-cursor-thickness/48969/12):
>
> If that works for you, go with it. There’s also a [variable](https://docs.obsidian.md/Reference/CSS+variables/CSS+variables), --caret-color, so you could easily do .theme-light { --caret-color: salmon; } .theme-dark { --caret-color: gold; } to set separate colors depending on if you’re in the light or dark color scheme.

This affects both the light and dark theme cursor, but only in the editor window and not the file browser

---

<div class="post-metadata">

**Author:** ![ariehen](https://forum.obsidian.md/user_avatar/forum.obsidian.md/ariehen/32/46932_2.png) [@ariehen](https://forum.obsidian.md/u/ariehen)\
**Post date:** [December 12, 2025, 10:47pm UTC](https://forum.obsidian.md/t/newbie-question-around-cursor-colors-and-file-nav-selections-with-a-custom-obsidian-css/108931/3 "2025-12-12T22:47:28Z")

</div>

The “caret-color” is referring to the `|` (pipe) in an editor window when you are typing. It doesn’t have to do with moving your mouse pointer around or hovering.

* * *

For your initial question, I _think_ you are looking for a `.has-focus` state or hovering over something with the mouse pointer.

When running the `Files: reveal current file in navigation` command and using arrow keys to up/down, this is applied:

![Screenshot 2025-12-13 072712](https://forum.obsidian.md/uploads/default/original/3X/2/3/2360dd60839d8313dfeff9db0659c93a1ba32fe3.png)

example snippet:

```css
.theme-light {
    --background-modifier-border-focus: olive;
}

```

![Obsidian_gLe2w113ui](https://forum.obsidian.md/uploads/default/original/3X/1/1/11f40e077af95a70c494d8e9d16e8ba5200516b5.gif)

* * *

For hovering with your mouse pointer, there’s a variable (things starting with `--`) as well:

 ![Screenshot 2025-12-13 073057](https://forum.obsidian.md/uploads/default/original/3X/1/c/1cbbfd542e693bd15a4d8fef31dec2290766d99e.png)

```css
.theme-light {
    --nav-item-background-hover: rgba(255, 105, 180, 0.8);
}

```

![Obsidian_NeSUh4ojKE](https://forum.obsidian.md/uploads/default/original/3X/e/b/eb72bc4980aa209d4bc5f8066787600a083b95bf.gif)

This is what is applied for the current note you are looking at:

 ![Screenshot 2025-12-13 074230](https://forum.obsidian.md/uploads/default/original/3X/f/7/f71f52268badb9971c58caf84464af4e60ae99ea.png)

* * *

Have a look here: [https://docs.obsidian.md/Reference/CSS+variables/Components/Navigation](https://docs.obsidian.md/Reference/CSS+variables/Components/Navigation) for the variables covering navigation. This is essential as well if you haven’t see it yet:

> [@Obsidian CSS Inspector Workflow](https://forum.obsidian.md/t/obsidian-css-inspector-workflow/58178):
>
> Obsidian CSS Inspector Workflow This was originally called “Obsidian CSS Quick Guide” but it ended up being more focused on the inspector. As a retrospective change to help people use this as a resource, it has been renamed. – FireIsGood Hi friends! CSS in Obsidian can be confusing to get into, so this is a guide to get you started with information on the tools, methods, and some background knowledge! Let’s get started by looking at how you can look behind the curtain of Obsidian’s visuals. …

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [December 19, 2025, 10:48pm UTC](https://forum.obsidian.md/t/newbie-question-around-cursor-colors-and-file-nav-selections-with-a-custom-obsidian-css/108931/4 "2025-12-19T22:48:21Z")

</div>

Closed on December 19, 2025, 10:48pm UTC

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