Interface: ElementCSSBoxDimensions

An object describing an element CSS Box dimensions, see CSS 2 (Box model).

remarks

This object scalar units are CSS pixels.

Hierarchy

  • ElementCSSBoxDimensions

Properties

borderBox

• borderBox: DOMRectSize

The border box as specified in the CSS Box Model.

remarks Margin, padding and content boxes can be derived from ElementCSSBoxDimensions.computedStyle.


computedStyle

• computedStyle: CSSBoxDimensionsComputedStyle

The computed box style. See window.getComputedStyle().

remarks Be aware that the computed vertical margins might collapse in the viewport. See CSS 2 (collapsing margins)


horizontalScrollbarWidth

• horizontalScrollbarWidth: number

The width of the horizontal scrollbar.

remarks In the CSS Box model, scrollbars are part of the content box.


scrollBox

• scrollBox: DOMRectSize

A box formed by scrollWidth and scrollHeight element properties.

remarks The box is formed with all the space occupied by element's children, even when overflowing. The element padding, border and scrollbar are not counted. See https://drafts.csswg.org/cssom-view/#dom-element-scrollwidth, scrollWidth and scrollHeight for a reference.


verticalScrollbarWidth

• verticalScrollbarWidth: number

The width of the vertical scrollbar.

remarks In the CSS Box model, scrollbars are part of the content box.