Oh, I see.
You can still use a pure SCSS solution using category slugs:
If you want to add line breaks in the text, put \A
inside your text, and add white-space: pre;
in the :after
pseudo element properties.
$categories: "nature", "general";
$labels: "All natural!\ANaturaaal!" "Another text";
@each $category, $label in zip($categories, $labels) {
body.category-#{$category} .category-heading .category-logo.aspect-image {
max-height: none;
&:after {
display: block;
content: $label;
font-size: 1.25em;
color: var(--primary-700);
white-space: pre;
text-align: center;
}
}
}