stylelint-plugin-defensive-css: Incorrect vendor prefix identification

Describe the bug Error Separate different vendor prefixes into their own rules. is showing on SASS that has no vendor prefixes:

.menu-item {

	&.menu-item-has-children::after,
	&.menu-item-has-grandchildren::after {
		content: '';
		position: absolute;
		top: 24px;
		right: 30px;
		width: 18px;
		height: 18px;
		background-size: contain;
	}
	
}

To Reproduce Steps to reproduce the behavior:

  1. Add the SASS code above into a sass/scss file
  2. Run Stylelint with use-defensive-css plugin
  3. Notice errors

Expected behavior No vendor error(s).

Desktop (please complete the following information):

  • OS: macOS
  • Browser: NA
  • Version: Sonoma 14.2

Additional context

package.json

{
  "devDependencies": {
    "stylelint": "^15.10.2",
    "stylelint-config-standard": "^34.0.0",
    "stylelint-config-standard-scss": "^11.1.0",
    "stylelint-high-performance-animation": "^1.9.0",
    "stylelint-order": "^6.0.3",
    "stylelint-plugin-defensive-css": "^0.9.1",
    "stylelint-stylistic": "^0.4.3"
  }

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

I’m not sure off hand, but that at least gives me a place to start. From what it seems, I may need to write tests specific to SCSS. This is a bit new for me, so bare with me as I try to figure out what is needed.

Thank you for reporting this. I will dig into it as soon as I can 🤘