Select where the style sheet goes
Closed this issue · 1 comments
cmcaine commented
Useful for shadow dom or iframes.
Off topic: is generation of inline styles just for file size or are there other performance benefits?
fuzetsu commented
Added in 5409193 (among other things) 🎉
const style = document.createElement()
const newZ = z.new({ style })
Off topic: is generation of inline styles just for file size or are there other performance benefits?
Do you mean attaching the styles directly to each element and generating a class for each?
If you style directly on each element zaftig basically ends up generating very simple flat css with very few nesting rules, which could potentially be faster for the browser process.