You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we use the following language to describe different areas associated with a dimension:
withoutMargin: straight from getBoundingClientRect
withMargin: we use window.getComputedStyles(el) to pull the margin from the element it and add it to withoutMargin
withoutPadding: we use window.getComputedStyles(el) to obtain the elements padding and then we shrink the withoutMargin dimension by this amount.
These terms have grown organically as needs arose. They also directly map to the box model. To reduce friction we should rename our properties to match their box model equivalents
withMargin -> marginBox
withoutMargin -> paddingBox
withoutPadding -> contentBox
For now we are getting away with ignoring borders 😊 but we could look at adding a borderBox as well. Although, we could do this as a seperate task
The text was updated successfully, but these errors were encountered:
Currently we use the following language to describe different areas associated with a dimension:
withoutMargin
: straight fromgetBoundingClientRect
withMargin
: we usewindow.getComputedStyles(el)
to pull the margin from the element it and add it towithoutMargin
withoutPadding
: we usewindow.getComputedStyles(el)
to obtain the elements padding and then we shrink thewithoutMargin
dimension by this amount.These terms have grown organically as needs arose. They also directly map to the box model. To reduce friction we should rename our properties to match their box model equivalents
withMargin
->marginBox
withoutMargin
->paddingBox
withoutPadding
->contentBox
For now we are getting away with ignoring borders 😊 but we could look at adding a
borderBox
as well. Although, we could do this as a seperate taskThe text was updated successfully, but these errors were encountered: