{"name":"stylelint-declaration-block-no-ignored-properties","description":"Disallow property values that are ignored due to another property value in the same rule.","version":"3.0.0","author":{"name":"Krister Kari","url":"https://github.com/kristerkari/"},"bugs":{"url":"https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties/issues"},"devDependencies":{"@eslint/js":"^9.0.0","cross-env":"^7.0.3","eslint":"^9.0.0","eslint-config-stylelint":"^26.1.0","eslint-plugin-jest":"^29.12.1","eslint-plugin-sort-requires":"^2.1.0","jest":"^30.2.0","jest-preset-stylelint":"^9.0.0","lint-staged":"^16.2.7","np":"^11.0.1","prettier":"^3.0.0","stylelint":"^17.0.0"},"peerDependencies":{"stylelint":"^17.0.0"},"engines":{"node":">=20.19.0"},"homepage":"https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties#readme","keywords":["css","less","lint","linter","scss","stylelint","stylelint-plugin","sugarss"],"license":"MIT","lint-staged":{"**/*.{js,json}":["prettier --write","git add"]},"type":"module","main":"index.js","exports":"./index.js","repository":{"type":"git","url":"git+https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties.git"},"scripts":{"jest":"cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest","lint":"eslint .","precommit":"lint-staged","pretest":"npm run lint","prettify":"prettier --write '**/*.{cjs,js,json,mjs}'","release":"npx np","test":"cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --coverage"},"gitHead":"381e9f967ff8422add5d20b92b5ecd79bcdd3d53","_id":"stylelint-declaration-block-no-ignored-properties@3.0.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-3ml4NgSW6nkHQrk+/ounU7Qljfb7e7FayHzU7Mry6rF9X28RXyPLD2bNn4QVOO7t98d5EGCCVkNbHCZSx+bNUQ==","shasum":"aec7ee5ffd0a5629a8bb6e4ddaa5bf12723911ee","tarball":"http://registry-npm.ywwl.com/stylelint-declaration-block-no-ignored-properties/download/stylelint-declaration-block-no-ignored-properties-3.0.0.tgz","fileCount":7,"unpackedSize":17112,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG3rZksb+o4fPPIVLN7uolTc80shOFrA25PjEjKeyD8+AiB7DkWqW50/Dt/5UoS3vhUIKqZnZmXL5hcE2yoZJlD8jg=="}],"size":5157,"noattachment":false,"key":"/stylelint-declaration-block-no-ignored-properties/-/stylelint-declaration-block-no-ignored-properties-3.0.0.tgz"},"_npmUser":{"name":"kristerkari","email":"polony02.broader@icloud.com"},"directories":{},"maintainers":[{"name":"kristerkari","email":"polony02.broader@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stylelint-declaration-block-no-ignored-properties_3.0.0_1769375357996_0.3115021669441349"},"_hasShrinkwrap":false,"readme":"# stylelint-declaration-block-no-ignored-properties\n\n[![NPM version](https://img.shields.io/npm/v/stylelint-declaration-block-no-ignored-properties.svg)](https://www.npmjs.com/package/stylelint-declaration-block-no-ignored-properties)\n[![Build Status](https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties/workflows/Tests/badge.svg)](https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties/actions?workflow=Tests)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)\n[![Downloads per month](https://img.shields.io/npm/dm/stylelint-declaration-block-no-ignored-properties.svg)](http://npmcharts.com/compare/stylelint-declaration-block-no-ignored-properties)\n\nOriginal rule: [stylelint/declaration-block-no-ignored-properties](https://github.com/stylelint/stylelint/tree/7.13.0/lib/rules/declaration-block-no-ignored-properties).\n\nDisallow property values that are ignored due to another property value in the same rule.\n\n```css\na { display: inline; width: 100px; }\n/**                  ↑\n *       This property */\n```\n\nCertain property value pairs rule out other property value pairs, causing them to be ignored by the browser. For example, when an element has display: inline, any further declarations about width, height and margin-top properties will be ignored. Sometimes this is confusing: maybe you forgot that your margin-top will have no effect because the element has display: inline, so you spend a while struggling to figure out what you've done wrong. This rule protects against that confusion by ensuring that within a single rule you don't use property values that are ruled out by other property values in that same rule.\n\nThe rule complains when it finds:\n\n-   `display: inline` used with `width`, `height`, `margin`, `margin-top`, `margin-bottom`, `overflow` (and all variants).\n-   `display: list-item` used with `vertical-align`.\n-   `display: block` used with `vertical-align`.\n-   `display: flex` used with `vertical-align`.\n-   `display: table` used with `vertical-align`.\n-   `display: table-*` (except `table-caption`) used with `margin`.\n-   `display: table-*` (except `table-cell`) used with `padding`.\n-   `display: table-*` (except `table-cell`) used with `vertical-align`.\n-   `display: table-(row|row-group)` used with `width`, `min-width` or `max-width`.\n-   `display: table-(column|column-group)` used with `height`, `min-height` or `max-height`.\n-   `float: left` and `float: right` used with `vertical-align`.\n-   `position: static` used with `top`, `right`, `bottom`, `left` or `z-index`.\n-   `position: absolute` used with `float`, `clear` or `vertical-align`.\n-   `position: fixed` used with `float`, `clear` or `vertical-align`.\n-   `list-style-type: none` used with `list-style-image`.\n-   `overflow: visible` used with `resize`.\n\n## Installation\n\n```\nnpm install stylelint-declaration-block-no-ignored-properties --save-dev\n```\n\n## Usage\n\n```js\n// .stylelintrc\n{\n  \"plugins\": [\n    \"stylelint-declaration-block-no-ignored-properties\"\n  ],\n  \"rules\": {\n    \"plugin/declaration-block-no-ignored-properties\": true,\n  }\n}\n```\n\n## Options\n\n### `true`\n\nThe following patterns are considered violations:\n\n```css\na { display: inline; width: 100px; }\n```\n\n`display: inline` causes `width` to be ignored.\n\n```css\na { display: inline; height: 100px; }\n```\n\n`display: inline` causes `height` to be ignored.\n\n```css\na { display: inline; margin: 10px; }\n```\n\n`display: inline` causes `margin` to be ignored.\n\n```css\na { display: block; vertical-align: baseline; }\n```\n\n`display: block` causes `vertical-align` to be ignored.\n\n```css\na { display: flex; vertical-align: baseline; }\n```\n\n`display: flex` causes `vertical-align` to be ignored.\n\n```css\na { position: absolute; vertical-align: baseline; }\n```\n\n`position: absolute` causes `vertical-align` to be ignored.\n\n```css\na { float: left; vertical-align: baseline; }\n```\n\n`float: left` causes `vertical-align` to be ignored.\n\nThe following patterns are *not* considered violations:\n\n```css\na { display: inline; margin-left: 10px; }\n```\n\n```css\na { display: inline; margin-right: 10px; }\n```\n\n```css\na { display: inline; padding: 10px; }\n```\n\n```css\na { display: inline-block; width: 100px; }\n```\n\nAlthough `display: inline` causes `width` to be ignored, `inline-block` works with `width`.\n\n```css\na { display: table-cell; vertical-align: baseline; }\n```\n\nAlthough `display: block` causes `vertical-align` to be ignored, `table-cell` works with `vertical-align`.\n\n```css\na { position: relative; vertical-align: baseline; }\n```\n\nAlthough `position: absolute` causes `vertical-align` to be ignored, `relative` works with `vertical-align`.\n","publish_time":1769375358158,"_cnpm_publish_time":1769375358158,"dist-tags":{"latest":"3.0.0"}}