-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Description
Describe the problem
Svelte has this wonderful feature that allows to create binding for {client,offset,content}{Width,Height} and other related properties. However, it does not support scroll{Width,Height}. Binding to those values would be useful for creating carousels, sliders, and other scroll-based components.
svelte/packages/svelte/src/compiler/phases/bindings.js
Lines 149 to 181 in 3ee8e0b
| // dimensions | |
| clientWidth: { | |
| omit_in_ssr: true, | |
| invalid_elements: ['svelte:window', 'svelte:document'] | |
| }, | |
| clientHeight: { | |
| omit_in_ssr: true, | |
| invalid_elements: ['svelte:window', 'svelte:document'] | |
| }, | |
| offsetWidth: { | |
| omit_in_ssr: true, | |
| invalid_elements: ['svelte:window', 'svelte:document'] | |
| }, | |
| offsetHeight: { | |
| omit_in_ssr: true, | |
| invalid_elements: ['svelte:window', 'svelte:document'] | |
| }, | |
| contentRect: { | |
| omit_in_ssr: true, | |
| invalid_elements: ['svelte:window', 'svelte:document'] | |
| }, | |
| contentBoxSize: { | |
| omit_in_ssr: true, | |
| invalid_elements: ['svelte:window', 'svelte:document'] | |
| }, | |
| borderBoxSize: { | |
| omit_in_ssr: true, | |
| invalid_elements: ['svelte:window', 'svelte:document'] | |
| }, | |
| devicePixelContentBoxSize: { | |
| omit_in_ssr: true, | |
| invalid_elements: ['svelte:window', 'svelte:document'] | |
| }, |
Describe the proposed solution
Add bindings for scrollWidth and scrollHeight for all elements.
Importance
nice to have
nmzein, codec-xyz, rbs-jacob, JE4GLE, Laurens256 and 6 morephocks, ndri and SarcevicAntonio
Metadata
Metadata
Assignees
Labels
No labels