Is it during the build process of CSSOM (default padding/border/margin may be applied to all nodes)?
P粉9830211772024-02-27 00:46:54
The
element's box is (re)computed in the so-called "Update Layout" phase, which is currently specified* to occur (at least) in the next "Update Rendering" event loop step, in substep 14:
But it can also be enforced synchronously when calling some getters.
*While this is a recent addition to the specification, not all browsers strictly adhere to it, for example, I know from experience that Safari does not wait for the next "paint frame" to perform this layout update , but just some free time.