Skip to content

Commit 78ce2e0

Browse files
authored
Update apps/svelte.dev/content/tutorial/02-advanced-svelte/04-advanced-bindings/04-dimensions/index.md
1 parent 9d6ab67 commit 78ce2e0

File tree

1 file changed

+1
-3
lines changed
  • apps/svelte.dev/content/tutorial/02-advanced-svelte/04-advanced-bindings/04-dimensions

1 file changed

+1
-3
lines changed

apps/svelte.dev/content/tutorial/02-advanced-svelte/04-advanced-bindings/04-dimensions/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@ You can add `clientWidth`, `clientHeight`, `offsetWidth` and `offsetHeight` bind
1414

1515
These bindings are readonly — changing the values of `w` and `h` won't have any effect on the element.
1616

17-
> [!NOTE] Elements are measured using a technique similar to [this one](http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/). There is some overhead involved, so it's not recommended to use this for large numbers of elements.
18-
>
19-
> `display: inline` elements cannot be measured with this approach; nor can elements that can't contain other elements (such as `<canvas>`). In these cases you will need to measure a wrapper element instead.
17+
> [!NOTE] `display: inline` elements do not have a width or height (except for elements with 'intrinsic' dimensions, like `<img>` and `<canvas>`), and cannot be observed with a `ResizeObserver`. You will need to change the `display` style of these elements to something else, such as `inline-block`.

0 commit comments

Comments
 (0)