magento / magento/magento-coding-standard
Expected 1 space after colon with &:not(:first-child)
- Dominant language
- PHP
- Stars
- 375
- Forks
- 165
- PR merge metrics
- No merged PRs in 30d
Description
### Preconditions
1. In a less file if you use &:not(:first-child) it generates spacing warnings.
### Steps to reproduce
1. Use &:not(:first-child) in a less file.
2. Run the coding standard from command line. `vendor/bin/phpcs --standard=Magento2 path/to/module`
### Expected result
1. No Warnings are generated.
### Actual result
1. Warnings are generated
154 | WARNING | Expected 1 space after colon in style definition; newline found
154 | WARNING | Expected 1 space after colon in style definition; 0 found
Contributor guide
Research direction
Reproduce the warning with a LESS file containing `&:not(:first-child)` and run `vendor/bin/phpcs --standard=Magento2 path/to/module`. Start by locating the Magento2 rule that checks spacing in style definitions; done means the command produces no warnings for this selector.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100