DOM/CSS UI is not currently able to transcend into WebXR space, so we need to come up with method for UI inside WebGL. One of these approaches:
Render basic DOM/CSS to canvas using the SVG trick, which has limitations on what CSS features are supported, and a bit of performance cost every frame.
This might be the simplest way to support a wide set of UI capabilities already built into the browser, to leverage it in WebXR.
Create a UI system out of WebGL primitives
This is perhaps more complicated than option 1, but will eventually yield better results: full control over rendering inside of WebXR without limitations, and more performance.
We can to re-implement things like text flow, font rendering, etc (for which some libraries for Three.js already exists).
DOM/CSS UI is not currently able to transcend into WebXR space, so we need to come up with method for UI inside WebGL. One of these approaches: