Native element
This div receives the parent class directly.
Middle spread to third child
Middle child forwards props with spread
Third child receives
class="parent-owned svelte-160oiqm".Source Current result
Native element
<div class="demo-card parent-owned">Native element
demo-card parent-owned svelte-parent baselineForwarded scoped prop
<MiddleSpreadCard scoped:class="parent-owned" /> <SpreadGrandchildCard {...forwardedProps} />Third child
grandchild-card parent-owned svelte-parent svelte-grandchild has parent hashParent spread boundary
<MiddleSpreadCard {...propsWithClass} />Still not magic
propsWithClass.class = 'parent-owned' does not express scoped intent at the parent call site