I highlighted the relevant tags containing data-path with the value Untitled. If I restart the application, those attributes would be test and test/test2 respectively.
When I create a new directory, the style doesn’t get applied (but it’s not a CSS loading issue, because changing existing styles work). Restarting the app fixes the problem.
Maybe I’m confused here, but I don’t see this as an Obsidian bug, @sagikazarmark and @WhiteNoise. The data-path attribute is meaningless by itself. It’s only meant to exchange information between HTML and its DOM representation via scripts. data-path is not a PATH to anything.
The reason it won’t update on the fly in developer tools is because it’s only read when the page is loaded. Nor is the data-* attribute used to style anything. The only relevance it has is the information within it used by the DOM. In this case, the values passed in are folder names, or directory’s if you prefer. They’re read as #text in the DOM and have no styling attached whatsoever.
is because Obsidian is looking for classes named: .nav-folder-title[data-path="projects"] and .nav-folder-title[data-path="archive/projects"]. There are none. I think what you’re looking for is:
I agree that this is not a major bug, but I do think it’s a bug. The value Untitled is certainly not valid. But I’ll open a feature request if you prefer.