The variables
These are the public tokens that the One UI stylesheet defines inside every
.tap-root.
installHostTheme() sets the host-side inputs in a test, so a component renders there the
way it renders in the host. Keep a fallback on custom CSS that may render without the SDK
stylesheet.
They change with the owner’s theme. useTapTheme() gives you { mode: "light" | "dark" }
when a component has to branch rather than restyle — a chart’s series colours, say.
The UI kit already uses them
Card, Metric, Button, Table and the rest of the kit are built on exactly
this list, so a surface assembled from them needs no CSS of your own:
Two rules the checks read
- No bundled fonts and no third-party stylesheets. A publish rejects a bundle that loads
a font or a script from another origin. Use
--font-one-uifor interface text and a system monospace stack for code. Writing a stylesheet into the document is a warning rather than a rejection, and the warning is worth acting on: styles put ondocument.headleave your shadow root and land on the host and on every other extension on the page. An emitted.cssasset is a rejection, because a separate file never reaches a shadow root — the build inlines the stylesheets your entry imports, so that one does not fire on its own. - Container queries, not viewport queries. A slot’s width has nothing to do with the viewport. Your mount is the container, so size against it: