magento / security-package

Magento Security Extensions
Open Software License 3.0
73 stars 69 forks source link

Wrapping less in missing guards #326

Open friendscottn opened 1 year ago

friendscottn commented 1 year ago

Description (*)

This prevents unnecessary duplicated CSS from showing in all stylesheets. For example styles-m.css and styles-l.css

Fixed Issues (if relevant)

  1. Fixes #325

Manual testing scenarios (*)

  1. Compile the less files into CSS
  2. Make sure the following styles only appear in styles-m.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;
    }

Contribution checklist (*)

friendscottn commented 1 year ago

Signed agreement. Reopening