Problem
data-machine-events defines its own copies of generic tokens that DM core already publishes. Both systems work today because each plugin owns both definition and consumption of its tokens internally — but the values can drift silently when DM core changes its defaults.
Evidence
DM core publishes (--datamachine-*, no hyphen) in data-machine/inc/Core/Admin/assets/css/root.css:
--datamachine-text-primary: #333
--datamachine-border-radius: 4px
--datamachine-bg-light: #f9f9f9
data-machine-events redefines (--data-machine-*, with hyphen) in data-machine-events/inc/Blocks/root.css:
--data-machine-text-primary: #111827
--data-machine-border-radius: 8px
--data-machine-background-light: #f8fafc
Same concepts, different names, different values. The calendar block consumes its local versions throughout — see e.g. inc/Blocks/Calendar/style.css (193 usages).
Why this matters
If DM core decides to change --datamachine-border-radius from 4px to 6px, every consumer except this plugin picks it up via cascade. The calendar block keeps rendering with 8px because it consumes its own non-aligned token.
In practice: invisible drift that only surfaces when someone tries to "skin everything DM-related" with a single set of overrides.
Recommended cleanup
Two-namespace split:
-
Generic tokens consumed from DM core — drop the local redefinitions. Use var(--datamachine-text-primary) directly. The plugin shrinks; cascade follows DM core / theme bridge.
-
Calendar-specific tokens kept as a distinct namespace — --data-machine-day-monday-rgba, --data-machine-grid-cell-width, --data-machine-taxonomy-badge-background etc. genuinely belong to this plugin. Rename to a clearer namespace to reduce visual confusion with DM core: --datamachine-events-* or short prefix --dme-*.
After cleanup:
- Generic concerns inherit from DM core via cascade
- Calendar-specific concerns live in their own clearly-named namespace
- No silent drift between plugins
Audit numbers
Run from extrachill.com:
data-machine: 92 --datamachine- usages, 0 --data-machine-
data-machine-events: 0 --datamachine- usages, 403 --data-machine-
data-machine-frontend-chat: 59 --datamachine- usages, 0 --data-machine-
frontend-chat already does the right thing (consumes DM core tokens directly). data-machine-events is the only outlier.
Scope
Pure CSS work. No PHP / no template changes. Plugin behavior unchanged after cleanup; just better aligned with the rest of the DM stack.
Discovered while
Building OG card generation in extrachill-multisite#9, reviewing how DM-consumer plugins theme themselves.
Problem
data-machine-eventsdefines its own copies of generic tokens that DM core already publishes. Both systems work today because each plugin owns both definition and consumption of its tokens internally — but the values can drift silently when DM core changes its defaults.Evidence
DM core publishes (
--datamachine-*, no hyphen) indata-machine/inc/Core/Admin/assets/css/root.css:--datamachine-text-primary: #333--datamachine-border-radius: 4px--datamachine-bg-light: #f9f9f9data-machine-eventsredefines (--data-machine-*, with hyphen) indata-machine-events/inc/Blocks/root.css:--data-machine-text-primary: #111827--data-machine-border-radius: 8px--data-machine-background-light: #f8fafcSame concepts, different names, different values. The calendar block consumes its local versions throughout — see e.g.
inc/Blocks/Calendar/style.css(193 usages).Why this matters
If DM core decides to change
--datamachine-border-radiusfrom 4px to 6px, every consumer except this plugin picks it up via cascade. The calendar block keeps rendering with 8px because it consumes its own non-aligned token.In practice: invisible drift that only surfaces when someone tries to "skin everything DM-related" with a single set of overrides.
Recommended cleanup
Two-namespace split:
Generic tokens consumed from DM core — drop the local redefinitions. Use
var(--datamachine-text-primary)directly. The plugin shrinks; cascade follows DM core / theme bridge.Calendar-specific tokens kept as a distinct namespace —
--data-machine-day-monday-rgba,--data-machine-grid-cell-width,--data-machine-taxonomy-badge-backgroundetc. genuinely belong to this plugin. Rename to a clearer namespace to reduce visual confusion with DM core:--datamachine-events-*or short prefix--dme-*.After cleanup:
Audit numbers
Run from extrachill.com:
frontend-chat already does the right thing (consumes DM core tokens directly). data-machine-events is the only outlier.
Scope
Pure CSS work. No PHP / no template changes. Plugin behavior unchanged after cleanup; just better aligned with the rest of the DM stack.
Discovered while
Building OG card generation in extrachill-multisite#9, reviewing how DM-consumer plugins theme themselves.