check if an element is floating.
Install with component(1):
$ component install yields/is-floating
var float = require('is-floating');
assert(float(create('<a style="float: left">')));
assert(float(create('<a style="float: right">')));
assert(float(create('<td>')));
assert(float(create('<span>')));
assert(false == float(create('<div>')));
the element styles should be computed, since .getComputedStyles()
is used.
$ make test
MIT