1.0.4 • Published 3 years ago

b-box v1.0.4

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

BBox - npm b-box

Border-box geometric information for the DOM element of HTML5.

Constructor

  • BBox(element)

Fields

  • top
  • left
  • right
  • bottom
  • width
  • height
  • {margin-|padding-|border-}{top|left|right|bottom}

A Type of these fields above are string that have px at the tail. To retrieve a number, use px method.

Methods

  • update() - Updates the fields by evaluating the computed style of the element specified at the constructor.
  • px(<field-name>) - Returns a number value of the field.
  • margin{Top|Left|Right|Bottom|Nc() - Returns a total margin length as a number.
  • marginHorizontalNc() - Returns a marginLeftNc()+marginRightNc.
  • marginVerticalNc() - Returns a marginTopNc()+marginBottomNc.

LICENSE

This software is released under the MIT License, see LICENSE

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.2

6 years ago

0.1.1

7 years ago

0.1.0

7 years ago