Closed
Description
Preconditions
M2.4.4
Coding standard v25
Steps to reproduce
- Create a module
- Add file view/css/source/_module.less with content :
/**
* @DoNotInject
*/
.admin__menu {
.item-mymodule.level-0 {
& > a {
min-height: auto;
padding: 1rem;
&:before {
content: url('Namespace_Module::images/module-logo.png');
display: block;
height: 28px;
margin-bottom: .5rem;
}
}
}
}
- Launch phpcs
Expected result
No errors
Actual result
4 | WARNING | CSS class names should be separated with "-" (dash)
| | instead of "_" (underscore)
Notes
We should either :
- remove that rule since it is not respected by M2 core code.
- Fix class names in core M2 repo, but it will be a breaking change for all existing modules
- add exceptions to that rule