Skip to content

Commit 9e38c20

Browse files
committed
feat: clarify point in size-and-scroll article.md en
1 parent d78b01e commit 9e38c20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

2-ui/1-document/09-size-and-scroll/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ That's the nearest ancestor that is one of the following:
6363
2. `<td>`, `<th>`, or `<table>`, or
6464
3. `<body>`.
6565
66-
Properties `offsetLeft/offsetTop` provide x/y coordinates relative to `offsetParent` upper-left corner.
66+
Properties `offsetLeft/offsetTop` provide x/y coordinates of the element's upper-left corner relative to its `offsetParent`.
6767
68-
In the example below the inner `<div>` has `<main>` as `offsetParent` and `offsetLeft/offsetTop` shifts from its upper-left corner (`180`):
68+
In the example below, the inner `<div>` has `<main>` as `offsetParent`, and `offsetLeft/offsetTop` are the offsets of its upper-left corner (`180`) relative to the `offsetParent`:
6969
7070
```html run height=10
7171
<main style="position: relative" id="main">
@@ -148,7 +148,7 @@ Here's the example in hebrew:
148148

149149
These properties provide the size of the area inside the element borders.
150150

151-
They include the content width together with paddings, but without the scrollbar:
151+
They include the content width/height together with paddings, but without the scrollbar:
152152

153153
![](metric-client-width-height.svg)
154154

@@ -266,7 +266,7 @@ Please note that the described difference is only about reading `getComputedStyl
266266
Elements have the following geometry properties:
267267
268268
- `offsetParent` -- is the nearest positioned ancestor or `td`, `th`, `table`, `body`.
269-
- `offsetLeft/offsetTop` -- coordinates relative to the upper-left edge of `offsetParent`.
269+
- `offsetLeft/offsetTop` -- coordinates of the upper-left corner relative to the `offsetParent`.
270270
- `offsetWidth/offsetHeight` -- "outer" width/height of an element including borders.
271271
- `clientLeft/clientTop` -- the distances from the upper-left outer corner to the upper-left inner (content + padding) corner. For left-to-right OS they are always the widths of left/top borders. For right-to-left OS the vertical scrollbar is on the left so `clientLeft` includes its width too.
272272
- `clientWidth/clientHeight` -- the width/height of the content including paddings, but without the scrollbar.

0 commit comments

Comments
 (0)