Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-zindex

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-zindex - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# 2.1.0
* Now aborts early when encountering negative indices, making the transform
safer overall.
# 2.0.1

@@ -2,0 +7,0 @@

@@ -9,4 +9,14 @@ 'use strict';

var nodes = [];
var abort = false;
// First pass; cache all z indexes
css.walkDecls('z-index', function (decl) {
if (abort) {
return;
}
// Check that no negative values exist. Rebasing is only
// safe if all indices are positive numbers.
if (decl.value[0] === '-') {
abort = true;
return;
}
nodes.push(decl);

@@ -13,0 +23,0 @@ cache.addValue(decl.value);

2

package.json
{
"name": "postcss-zindex",
"version": "2.0.1",
"version": "2.1.0",
"description": "Reduce z-index values with PostCSS.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -50,5 +50,7 @@ # [postcss][postcss]-zindex [![Build Status](https://travis-ci.org/ben-eb/postcss-zindex.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-zindex.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-zindex.svg)][deps]

Note that this module does not attempt to normalize relative z-index values,
such as `-1`. Be careful with using this module alongside JavaScript injected
CSS; ideally you should have already extracted all of your stacking context
into CSS.
such as `-1`; indeed, it will abort immediately when encountering these values
as it cannot be sure that rebasing mixed positive & negative values will keep
the stacking context intact. Be careful with using this module alongside
JavaScript injected CSS; ideally you should have already extracted all of your
stacking context into CSS.

@@ -55,0 +57,0 @@ ## Usage

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc