Custom CSS according to a specific page/block property value?

Hello everyone,
does the current version of Logseq have a native way to define custom CSS based on the value of a page (or block) property (key-value pairs)?

For example:

bgcolour:: light → will trigger something like background-color: #FFFFFF;
bgcolour:: dark → will trigger something like background-color: #000000;

In general, what’s the most elegant way to achieve something like this? Thank you.