JBNX · UX · themes
One page, many skins
Every JBNX site with more than one look (Easy, Classic, Game, light, dark) keeps one page. Skins are token values set by data-ux and data-theme on <html>; the UX choice is saved on the account so XP and data never split; shared components; a CI check proves every screen works in every skin.
standard
- Project
- JBNX
- Use for
- FedM8 Easy, Classic and Game; CipherDeck, NodeDough admin and mkt.jbnx.io light/dark; any new site that needs a second look
Same page, three skins
One HTML block below. Only data-ux and data-theme change. XP stays on one account.
Easy · light
Today3 tasks · 120 XP
Classic · light
Today3 tasks · 120 XP
Game · light
Today3 tasks · 120 XP
Easy · dark
Today3 tasks · 120 XP
Classic · dark
Today3 tasks · 120 XP
Game · dark
Today3 tasks · 120 XP
Try the switch
This uses jb-theme.js on this page. Your pick is cached; on a real site it saves to the account.
Live
Today3 tasks · 120 XP
Code: themes.css · jb-theme.js · theme-check.mjs · DESIGN.md
Copy the code
themes.css
/* themes.css v1.0.0 · JBNX one page, many skins · https://jbnx.io/design/ux/themes
Starter token file. Copy it into a site and change the values, never the names.
Rule: components read tokens only. A skin is a set of token values, nothing else.
Load order: buttons.css (button defaults), then themes.css, then the site's own CSS. */
/* Base = Classic + light. Every token used anywhere must be set here.
[data-theme="light"] repeats it so a light block can sit inside a dark page. */
:root, [data-theme="light"] {
--bg: #f6f3ee;
--panel: #ffffff;
--ink: #1c2230;
--muted: #5b6474;
--line: #ded6c8;
--accent: #1f5fbf;
--accent-ink: #ffffff;
--radius: 12px;
--gap: 16px;
--font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--text-size: 16px;
--tap: 44px;
/* Button tokens (--jb-main, --jb-second, --jb-danger + -fg/-edge) default in buttons.css.
buttons.css v1.0.x danger (#e5484d on white text) is 3.91:1; this keeps it at AA. */
--jb-danger: #cf3439; --jb-danger-edge: #8f1d21;
}
/* Easy: bigger text, bigger taps, calmer color, one thing per screen. */
[data-ux="easy"] {
--text-size: 19px;
--tap: 56px;
--gap: 22px;
--radius: 16px;
--accent: #155e3b;
--jb-main: #1d7a4e; --jb-main-fg: #ffffff; --jb-main-edge: #0f4a2e;
--jb-btn-h: 56px;
}
/* Game: bolder color, tighter spacing. XP and data stay the same account. */
[data-ux="game"] {
--bg: #fff8e8;
--accent: #7a2fd0;
--jb-main: #7a2fd0; --jb-main-fg: #ffffff; --jb-main-edge: #4b1690;
--radius: 18px;
--gap: 14px;
}
/* Dark works with every UX: it only swaps surface and ink. */
[data-theme="dark"] {
--bg: #0f1622;
--panel: #18212f;
--ink: #eef2f8;
--muted: #a7b1c2;
--line: #2a3546;
--accent: #7fb0ff;
--accent-ink: #0f1622;
--jb-second: #2b3445; --jb-second-fg: #f2f5fa; --jb-second-edge: #141a24;
--jb-btn-ring: #8cc2ff;
}
[data-theme="dark"][data-ux="easy"] { --accent: #7fd4a8; }
[data-theme="dark"][data-ux="game"] { --bg: #160f24; --accent: #c49bff; }
/* Only where CSS layout must differ. Never a second copy of the page.
These read the skin on <html>; put data-ux on <html> only (nested skins are for demos). */
[data-ux="easy"] .jb-only-classic, [data-ux="game"] .jb-only-classic,
[data-ux="classic"] .jb-only-easy, [data-ux="game"] .jb-only-easy,
[data-ux="easy"] .jb-only-game, [data-ux="classic"] .jb-only-game { display: none !important; }