Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/takamin/b-box
Border-box geometric information for the DOM element of HTML5
https://github.com/takamin/b-box
Last synced: about 1 month ago
JSON representation
Border-box geometric information for the DOM element of HTML5
- Host: GitHub
- URL: https://github.com/takamin/b-box
- Owner: takamin
- License: mit
- Created: 2017-04-09T00:47:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T17:59:52.000Z (about 2 years ago)
- Last Synced: 2024-04-14T22:12:58.882Z (8 months ago)
- Language: JavaScript
- Size: 221 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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`(``) - 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](LICENSE)