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.
The reason this doesn’t work properly:
.nav-folder-title[data-path="projects"] .nav-folder-title-content::before,
.nav-folder-title[data-path="archive/projects"] .nav-folder-title-content::before {
content: "📋 ";
font-size:1.3em;
}
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:
.nav-folder-children .nav-folder-title-content::before {
content: '📁'/*\1F5BF*/;
font-size: .9em;
}
.nav-folder-children .nav-file-title-content::before {
content: "📄"/*\1F5D0*/;
font-size: .85em;
} /* Example from @SlRvb stunning ITS Theme – Adapt accordingly */
It’s not necessary to style one folder at a time, after they’re created. The above will style each new folder or file automatically.
That said, if you want to see those custom data-* values, Command/Control + R is only two keyboard clicks away.
I hope this helps. Here’s some other resources to peruse at your leisure.