Hi Guys
I’m trying to set custom colours per category in
Illuminate, but the colour doesn’t change on the front-end.
Environment
- XenForo: 2.3.7
- Style: Illuminate (active, editing the same active/child style)
- Site: behnix.com
- No template edits besides extra.less
What I’m doing
Following your guide, I’m targeting the category and node IDs. Example (node/category ID =
17):
Code:
/* extra.less */
{{ include('xenfocus_base.less') }}
{{ include('xenfocus_theme.less') }}
/* Place your custom code below */
.block--category17,
html[data-container-key="node-17"] {
--block-color: #1e90ff; /* also tried with !important */
}
/* Fallback attempt – direct header gradient */
.block--category17 .block-header::before,
html[data-container-key="node-17"] .block-header::before {
background: linear-gradient(to right, #1e90ff, #00bfff) !important;
}
Expected
The top gradient/strip for that category/node should pick up the new colour.
Actual
No visual change—still using the default theme colour.
What I’ve tried
- Verified IDs (URL ends with .17/edit, and front-end URL #... .17).
- Used both selectors: .block--category17 and html[data-container-key="node-17"].
- Tried --block-color (with and without !important) and a direct ::before override (see above).
- Saved in the active style’s extra.less (below the two include lines).
- Hard refresh (Ctrl+F5), cleared server cache; also purged CDN cache (if any).
- DevTools: inspected the category header; my rules load, but the visible colour doesn’t change. I don’t see --block-color changing in Computed styles for that element.
Questions
- In Illuminate 2.3.x, is --block-color still the correct variable for the category header gradient?
- Is the gradient applied on an element other than .block-header::before in this version?
- Is there another container key I should be using on the forum index (e.g., a different data-container-key), or a style property that overrides --block-color later?
- Any known conflicts with add-ons that could prevent the variable from taking effect?
If helpful, I can provide a short screencast or give you a test account.
Thanks a lot!
—
Domain: behnix.com