UI Themes cssRules Reference

Advanced selector-level overrides in theme files.

When To Use cssRules

  • Use cssRules for component states and pseudo elements (::before/::after), not for simple color swaps.
  • Use module-scoped selectors to avoid accidental cross-screen leaks.
  • Pair cssRules with advancedCss.variables so your rules stay readable and maintainable.

Core Patterns (Production)

PatternSelector ExampleWhat You ChangeWhere To Test
Material Surface.ccb-start, .ccb-group, .ccb-tilePanel material, border, shadow, stripe overlays.Main menu command center.
Interaction States.menu-btn:hover, .season-quest-tab.activeHover/active contrast and readability.Main menu buttons, quest tabs.
Pseudo Control#mainMenu .menu-box::beforeEnable/disable ornamental layers or cinematic haze.Main menu background.
Module Isolation#seasonPassModal ...Full module skin without touching global styles.Season Pass modal.
Scene Exception.bounty-market-scene::before/::afterPreserve cinematic fades while flattening rest.Broker market scene.

Selectors You Can Reliably Target

AreaSelector FamilyNotes
Main Menu.ccb-*, #accountBtn, #seasonPassBtn, .inbox-btnPrimary identity layer; most theme previews derive from these.
Account + Theme Picker#accountModal ..., .ui-theme-item, .account-list-itemUse per-theme card design in selector/archives.
Season Pass + Quests#seasonPassModal ..., #seasonQuestModal ...Must be explicitly themed per pack to avoid default fallback.
Research#researchModal ..., .research-* Toolbar, lanes, cards, tabs and search states.
Bounty + Market#bountyBoardModal ..., .bounty-*Keep broker portrait colors untouched; style shell/controls only.
Inbox#inboxModal ..., .inbox-*Rows, toolbar, detail panes, unread states.

Safe Rule Authoring Checklist

  1. Start with one module and one selector block.
  2. Prefer variable-driven values: background: var(--ui-imperial-card).
  3. Only use !important for modal-specific shells where base CSS is very specific.
  4. After each block, test: normal, hover, active, disabled, focus.
  5. Verify no leakage into theme picker previews for other themes.

Next