Modifying CSS/style of debugShowFramesPerSecond

We’d like to use scene.debugShowFramesPerSecond outside of the Cesium.Viewer; doing so is easy enough, but the resulting performance display block is rendered as a div without an associated ID or CSS class name. Therefore, the position and appearance of the display is difficult (near impossible?) to control.

Anyone have any suggestions on doing so without any crazy XPATH? Or perhaps the Cesium team would consider a quick fix by adding an ID to the block? :slight_smile:

We could add a CSS className (but not an ID, since you’re allowed to have more than one Scene per document). But the styles there are all immediate styles, applied to the actual elements during creation, as opposed to drawn from widgets.css and its descendants. Of course you could go change them with JS, or possibly override them with the CSS “!important” flag, but neither is as clean as just having the styles in the CSS.

One issue we have is that we’re creating DOM elements now in Scene which is lower-level than the Widgets folder, but all our existing CSS files are confined to the Widgets folder. There’s no style sheets for the Scene level, just immediate styling. I don’t think we can expect that folks using Scene directly would even think to include widgets.css.

It seems as if Scene should have its own scene.css file, since it can create DOM elements.

–Ed.