0.0.5 • Published 8 years ago

height v0.0.5

Weekly downloads
18
License
MIT
Repository
github
Last release
8 years ago

Height

Build Status

Get the height the element should be when use height: auto

Sometimes min-height has bugs or can not be used

Install

npm i height

Usage

var height = require('height')
// only used for box-sizing: border-box
function setHeight(el) {
  if (el.style.height == 'auto') return
  var h = height(el)
  if (h < 200) {
    el.style.height = h + 'px'
  } else {
    el.style.height = 'auto'
  }
}

API

height(el)

Return the height value the element should be

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago