Update article.md

`null` if that's `offsetParent` -> `null` for `offsetParent`
This commit is contained in:
Peter Roche 2019-11-07 21:34:48 -07:00 committed by GitHub
parent cb3aadc598
commit 83bfe333ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,7 +104,7 @@ For our sample element:
````smart header="Geometry properties are zero/null for elements that are not displayed" ````smart header="Geometry properties are zero/null for elements that are not displayed"
Geometry properties are calculated only for displayed elements. Geometry properties are calculated only for displayed elements.
If an element (or any of its ancestors) has `display:none` or is not in the document, then all geometry properties are zero (or `null` if that's `offsetParent`). If an element (or any of its ancestors) has `display:none` or is not in the document, then all geometry properties are zero (or `null` for `offsetParent`).
For example, `offsetParent` is `null`, and `offsetWidth`, `offsetHeight` are `0` when we created an element, but haven't inserted it into the document yet, or it (or it's ancestor) has `display:none`. For example, `offsetParent` is `null`, and `offsetWidth`, `offsetHeight` are `0` when we created an element, but haven't inserted it into the document yet, or it (or it's ancestor) has `display:none`.