Trouble using css styling for accent color and font in Publish

What I’m trying to do

I’m attempting to style an obsidian publish site with css. I want to change the accent color to red, and the font for all text on the site to Times New Roman.

Things I have tried

I have a document entitled publish.css in the root folder of my library, I have included the following css snippet:

:root {
–default-font: ‘Times New Roman’, serif;
–text-on-accent-inverted: ‘–color-red’;
}

My the times new roman font change seem to work in my local version of obsidian, but not the accent, and neither work when I publish the css file.

For the fonts, you could have a look here:


For the text on accent, –color-red needs to be written as var(--color-red). You may need to define that for both light and dark modes; I’m not sure. e.g.

.theme-light {
    --text-on-accent: #f2f3f5;
    --text-on-accent-inverted: var(--color-red);
}

.theme-dark {
    --text-on-accent: #c7cbd4   
    --text-on-accent-inverted: var(--color-red);
}