
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
stylelint-z-index-value-constraint
Advanced tools
Stylelint rule for setting minimum and maximum constraint value for z-index.
Stylelint rule for setting minimum and maximum constraint value for z-index.
This is a fork of niksy/stylelint-number-z-index-constraint plugin.
npm install stylelint-z-index-value-constraint --save-dev
or
yarn add stylelint-z-index-value-constraint --dev
Add this config to your .stylelintrc
:
{
"plugins": ["stylelint-z-index-value-constraint"],
"rules": {
"plugin/z-index-value-constraint": {
"min": 1,
"max": 10
}
}
}
a {
z-index: 10;
}
/** ↑
* This number */
From CSS Tricks article:
It's fairly common to see people number in the hundreds with z-index in web design too. The idea being that you could slip something in between later if need be, which you couldn't if you did 1, 2, 3, etc, because z-index doesn't support decimals.
This rule also handles negative values.
{ min: 10 }
The following patterns are considered warnings:
a {
z-index: 9;
}
input {
z-index: 2;
}
a {
z-index: -9;
}
input {
z-index: -2;
}
The following patterns are not considered warnings:
a {
z-index: 10;
}
input {
z-index: 25;
}
a {
z-index: -10;
}
input {
z-index: -25;
}
{ max: 9999 }
The following patterns are considered warnings:
a {
z-index: 10000;
}
input {
z-index: 200000;
}
a {
z-index: -10000;
}
input {
z-index: -200000;
}
The following patterns are not considered warnings:
a {
z-index: 9999;
}
input {
z-index: 8000;
}
a {
z-index: -9999;
}
input {
z-index: -8000;
}
ignoreValues: ["number"]
{ max: 10 }, { ignoreValues: [11, 20] }
The following patterns are considered warnings:
a {
z-index: 12;
}
input {
z-index: 19;
}
The following patterns are not considered warnings:
a {
z-index: 11;
}
input {
z-index: 20;
}
This plugin has only stylelint as a dependency.
MIT
v1.4.0
FAQs
Stylelint rule for setting minimum and maximum constraint value for z-index.
The npm package stylelint-z-index-value-constraint receives a total of 5,525 weekly downloads. As such, stylelint-z-index-value-constraint popularity was classified as popular.
We found that stylelint-z-index-value-constraint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.