A simple question: I have my properties on the right sidebar, and because I want to minimize the space used, I want to change the property default message “No Value” (when nothing is input) to something shorter (like 0). Any way to do it via CSS? I know I could simply put 0 for each property in my templates but that would mess up other things so it needs to be the default message.
So I can’t test this, because I don’t see “No Value” in my properties, so I don’t have the context to see what you mean. Mine say “Empty”, and in the sidebar, just a count. And the snippet below doesn’t work for me, if I change it to “Empty”.
But here ariehen shared a bunch of properties CSS snippets, including one that hides ones with that placeholder value. Check out the whole thread for more ideas. Properties view CSS - The Fall Collection
So I’m using it in French, hence I wasn’t sure about the english translation, but yeah it should be “Empty” on your side! (for me Aucune valeur)
I tried both in English and French, but to no avail.
I think Ariehen’s code is to hide properties that are left empty, not really what I was looking for. But you got it right, I want to change it from “Empty” to something like Null or else by default…
I don’t 'even know if it’s possible?
Yes, although if you know the correct element to target, you can change it to do what you want, like change the content (probably). I think that is possible, but so far I can’t even get it to hide. I’ll keep trying. (edit: oh I was editing the CSS for the wrong vault. I can make it do things now, but it targets all my properties…)
So here is my test that is not working, but kind of getting close. I’ve been trying “.metadata-property” and “.metadata-property-value” and other variations, but I am no CSS expert. Hopefully someone better has some clues!
Here is an example of how you could potentially replace an element:
But I don’t know why it’s targeting all my properties, including ones that don’t have the placeholder=Empty component. I’m doing tests by trying different elements like this to see which ones change by moving them to the right:
Thank you so much for your help Rigmarole and Ariehen, you guys rock!
I actually just needed that for my own created properties for now, so that is perfect to me now! I adjusted the color font with some grey to match the original faint grey
content: "0";
color: #666666;
}
Another random quick and niche question now that I’m here, would you know how to remove/hide the icon “Properties view: Show all properties”?
I know I can add/remove the one for the file property, but I can’t figure out the other way around. It looks like the file property view is dependent on the all property view; which also makes me wondering who actually find a use of the all properties view
So if you had snippet to hide it I would be much grateful to make my space a little cleaner
But for that icon, can’t you right-click on it, and “Close”? Or am I looking at the wrong one?
That’s what I simply thought, but if you try yourself to right-click on All Property view, close it, then restart the app, it will come back where it was…
Also in Core Plugins settings, would this hide that one for you?
And there too, if you try to untoggle the “Property view” it will remove both the file and all property view…So that’s why I said that the file Property view seems to be dependent on the All Property view, but not the other way around.
Oh I see. I didn’t even know about that file view. I had only been using the properties at the top of each note. I might want to use this and hide all properties in the note.
And now I do see what you mean. The “All properties” view keeps auto-opening.
Whether you find a CSS solution or not, you might want to consider opening a feature request asking for that view to stay closed.