magento / magento/security-package
Missing LESS guards create duplicate CSS
@friendscottn is already working on this.
Since Jan 11, 2023.
- Dominant language
- PHP
- Stars
- 75
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
### Preconditions (*)
1. Magento 2.4.5-p1 (not that this matters much)
### Steps to reproduce (*)
1. Compile the less files into CSS
### Expected result (*)
1. CSS should not be duplicated in styles-m.css and styles-l.css
2. CSS should be only in one CSS file or the other. This affects css file size and performance.
### Actual result (*)
1. Several style rules are duplicated between the two files:
```css
.form-discount .g-recaptcha {
margin-top: 50px !important;
}
...
.login-container .g-recaptcha,
.form-login .g-recaptcha,
.form-edit-account .g-recaptcha {
margin-bottom: 10px !important;
}
...
.required-captcha.checkbox {
position: absolute;
display: block;
visibility: visible;
overflow: hidden;
opacity: 0;
width: 1px;
height: 1px;
}
...
.block.newsletter .field-recaptcha .field .control:before {
content: none;
}
...
.review-form .field-recaptcha {
margin-bottom: 10px;
}
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.