Adding a category class to a Published Page

That’s a very clever solution, but I agree that having such a thing by default (or customizable) in the core could be nice. The current intent is explicitly having a default background using the theme’s colors, as we can see in publish.scss:

.published-page {
  background-color: var(--secondary);
  color: var(--primary);

What about if the custom category background images URL were stored in CSS variables we could easily have access to in our custom CSS? At least, we wouldn’t bother using the full image URL in our CSS.


I’ve made a feature request here: Published pages could inherit categories' background image setting

4 Likes