Skip to content

Missing LESS guards create duplicate CSS #325

@friendscottn

Description

@friendscottn

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:
.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;
}

Activity

m2-assistant

m2-assistant commented on Jan 11, 2023

@m2-assistant

Hi @friendscottn. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


linked a pull request that will close this issue on Jan 11, 2023
friendscottn

friendscottn commented on Jan 11, 2023

@friendscottn
Author

@magento I am working on this

m2-assistant

m2-assistant commented on Jan 11, 2023

@m2-assistant

Hi @friendscottn! 👋
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

friendscottn

friendscottn commented on Jan 11, 2023

@friendscottn
Author

@magento add to contributors team

m2-assistant

m2-assistant commented on Jan 11, 2023

@m2-assistant

Hi @friendscottn! 👋
Thank you for joining. Please accept team invitation 👉 here 👈 and add your comment one more time.

friendscottn

friendscottn commented on Jan 11, 2023

@friendscottn
Author

@magento add to contributors team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @friendscottn

    Issue actions

      Missing LESS guards create duplicate CSS · Issue #325 · magento/security-package