fast icon indicating copy to clipboard operation
fast copied to clipboard

fix(fast-html): TemplateElement-derived elements are rendered in the DOM

Open radium-v opened this issue 7 months ago • 1 comments

🐛 Bug Report

The <f-template> element renders as a 0-width box in the DOM.

💻 Repro or Code Sample

https://stackblitz.com/edit/vitejs-vite-xaylxldx?file=src%2Fmain.ts

🤔 Expected Behavior

The <f-template> itself should not be rendered in the DOM.

😯 Current Behavior

An outline is applied to the <f-template> element, showing how the element is being rendered in the DOM: Image

💁 Possible Solution

The TemplateElement should have its own embedded styles to set display: none, so it doesn't render by default.

radium-v avatar Jul 23 '25 17:07 radium-v

@radium-v Could this simply be display: contents;?

chrisdholt avatar Jul 23 '25 17:07 chrisdholt