1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/node_modules/get-size
2023-06-30 09:56:13 -03:00
..
tasks https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00
test https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00
.nvmrc https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00
bower.json https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00
get-size.js https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00
LICENSE.md https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00
notes.md https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00
package.json https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00
README.md https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00
sandbox.html https://github.com/WWBN/AVideo/issues/8137 2023-06-30 09:56:13 -03:00

getSize

Get the size of elements. Used in Masonry, Isotope, & Flickity.

var size = getSize( elem );
// elem can be an element
var size = getSize( document.querySelector('.selector') )
// elem can be a selector string
var size = getSize('.selector')

Returns an object with:

  • width, height
  • innerWidth, innerHeight
  • outerWidth, outerHeight
  • paddingLeft, paddingTop, paddingRight, paddingBottom
  • marginLeft, marginTop, marginRight, marginBottom
  • borderLeftWidth, borderTopWidth, borderRightWidth, borderBottomWidth
  • isBorderBox

Browser support: Chrome 51+, Firefox 50+, Edge 12+, Safari 10+,

Install

npm: npm install get-size

Yarn: yarn add get-size

MIT License

getSize is released under the MIT License. Have at it.