Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

yields/is-floating

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-floating

check if an element is floating.

Installation

Install with component(1):

$ component install yields/is-floating

Example

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>')));

Caveats

the element styles should be computed, since .getComputedStyles() is used.

Tests

$ make test

License

MIT

About

check if element is floating.

Resources

Stars

Watchers

Forks

Packages

No packages published