ID:WORK-078Status:donePriority:mediumComplexity:trivial
BEM Modifier Hygiene for Storytelling Runes
Summary
Several storytelling rune configs emit BEM modifier classes for free-form string attributes (aliases, tags, parent, scale, factionType, id, track, follows). These produce unusable CSS selectors like .rf-character--"Gandalf the Grey,Mithrandir". Add noBemClass: true to these modifiers so only data-* attributes are emitted.
Acceptance Criteria
characterconfig:aliasesandtagsmodifiers havenoBemClass: truerealmconfig:scale,tags, andparentmodifiers havenoBemClass: truefactionconfig:factionTypeandtagsmodifiers havenoBemClass: trueloreconfig:tagsmodifier hasnoBemClass: trueplotconfig:tagsmodifier hasnoBemClass: truebeatconfig:id,track, andfollowsmodifiers havenoBemClass: true- Data attributes still emitted for all modified fields (verified via
refrakt inspect) - CSS coverage tests still pass (no selectors should depend on these classes)
Approach
Config-only changes in runes/storytelling/src/config.ts. Add noBemClass: true to each identified modifier. Run tests to verify data attributes are preserved and no CSS breaks.
References
- SPEC-028 (Standard 1 — BEM Modifier Classes for Enumerable Values Only)