Skip to content

A simple javascript utility for calculating z-index

License

Notifications You must be signed in to change notification settings

devgru/z-indices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

z-indices

A simple javascript utility for calculating z-index.

Distributed as UMD module.

Installing

$ yarn add z-indices
# or
$ npm install --save z-indices

Usage

Provide configuration dictionary object then pass arrays of keys to calculate z-index.

import zIndices from 'z-indices';

const zIndex = zIndices({
  'foreground': 10,
  'background': 0,
  'popup': 1000
});

zIndex(['foreground', 'popup']); // 1010

Development

  • Run tests: yarn test;
  • Build yarn build;

License

MIT © Dmitriy Semyushkin

About

A simple javascript utility for calculating z-index

Resources

License

Stars

Watchers

Forks

Packages

No packages published