z-index-rewrite

0.0.2 • Public • Published

z-index-rewrite

Rewrite z-index values to be more manageable.

This CSS:

#something {
  z-index: 18
}
 
.tom {
  z-index: 2;
}
 
.another.z-index {
  z-index: 2;
}
 
.another.z-index {
  z-index: -2;
}
 
#something {
  z-index: 34
}

becomes:

#something {
  z-index: 20
}
 
.tom {
  z-index: 10;
}
 
.another.z-index {
  z-index: 10;
}
 
.another.z-index {
  z-index: -2;
}
 
#something {
  z-index: 30
}

Install

$ npm install -g z-index-rewrite

Usage

Run z-index-rewrite with the file you want to rewrite. You can also pass a different output file if you want.

$ z-index-rewrite [path/to/source] [optional path/to/output]

For example:

$ z-index-rewrite css/style.css

Note: It currently ignores negative values.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i z-index-rewrite

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • tgvashworth