Properties: How to hide only fields that have no values in YAML

As an example I use this YAML in in Obsidian v.1.4.5:

---
aliases:
  - ABC
  - DEF
tags:
  - GHI
  - JKL
KA05: ""
case2: "-"
none: No value
whatever: "xyz abc"
nothingatall: 
---

How can I hide the last 5 fields in view mode, depending only on their values but independly of the fields?

This does not work:

.metadata-property[data-property-value=""],
.metadata-property[data-property-value="-"],
.metadata-property[data-property-value="No value"],
.metadata-property[data-property-value="xyz abc"],
.metadata-property[data-property-value=''] {
    display: none;
}
'''

Maybe try .metadata-property:has([placeholder="No value"])

Thanks, but that doesn’t work either.

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