Unity UI Toolkit

The structure is built to port to Unity UI Toolkit (USS): the same tokens, the same class names. Here is what carries over and what needs another route.

WebUnity (USS)
CSS variables (--cz-*)USS variables, same names. Generate a tokens.uss from tokens.json.
.cz-button, .cz-button--primarySame USS class names on VisualElements.
:hover :active :focus :disabledUSS pseudo-classes of the same name; :checked for Toggle.
[data-state] from RadixAdd or remove a class from C# (e.g. .is-checked).
box-shadow, gradientsNot in USS. Use 9-slice sprites (-unity-slice-*) of each block, or draw with Painter2D.
::before glintA child VisualElement.
color-mix(), filterPre-compute the colours as extra tokens.
transitionSupported. Use ease-out-back for --cz-motion-ease-bounce.
@keyframesNot in USS. Drive with experimental.animation or a small tween in C#.
@font-faceCreate a Font Asset from the same TTF files.

Example

Button.uss
:root {
  --cz-primary: #B04A2C;
  --cz-outline: #5A3A28;
  --cz-radius-md: 12px;
}

.cz-button {
  border-width: 3px;
  border-color: var(--cz-outline);
  border-radius: var(--cz-radius-md);
  min-height: 48px;
  /* face, rim, wall and contact shadow come from a 9-slice sprite */
  background-image: url("project://database/Assets/UI/button-primary.png");
  -unity-slice-left: 16; -unity-slice-right: 16;
  -unity-slice-top: 12; -unity-slice-bottom: 18;
  transition: translate 140ms ease-out-back;
}

.cz-button:hover { translate: 0 -2px; }
.cz-button:active { translate: 0 6px; }

Tip: the 9-slice sprites can be captured from this site with a headless browser, one per variant and state, so the game and the web stay identical.