Using CSS Custom Properties as Runtime Design Tokens for Light/Dark Themes
Learn how CSS custom properties let you change colors, spacing, and other design tokens at runtime—no stylesheet swap or page reload required.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how CSS custom properties let you change colors, spacing, and other design tokens at runtime—no stylesheet swap or page reload required.
Use Photon Realtime’s lobby‑visible custom properties to perform skill‑based matchmaking without a separate lobby. Set <code>CustomRoomPropertiesForLobby</code> on room creation and filter with <code>ExpectedCustomRoomProperties</code> in <code>OpJoinRandomRoom</code>.
Use CSS custom properties for dynamic theming, inheritance, and fallbacks without a preprocessor build step.
Find out how to use Photon Realtime’s custom room properties for dynamic matchmaking—set criteria on room creation, query with JoinRandomRoom, and keep everything inside Photon’s fast server. Includes a Unity example, trade‑offs, and next steps.
Less mixins with pattern matching and guards shine at compile-time structure, but runtime theming belongs to CSS custom properties. Here's how to split the work — and verify it.
Learn how to define, scope, and safely use CSS custom properties with fallback values, plus common mistakes to avoid.