Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes a less compilation error: '.no-link a' isn't defined when .emai… #22332

Merged
merged 1 commit into from
Apr 20, 2019

Conversation

hostep
Copy link
Contributor

@hostep hostep commented Apr 14, 2019

…l-non-inline() isn't active, so when using '.no-link a', it should be wrapped inside .email-non-inline().

Description (*)

This was discovered by using a different less compiler then what Magento ships with.

The selector .no-link a only exists when .email-non-inline() is active, see:
https://github.com/magento/magento2/blob/2.3.1/app/design/frontend/Magento/blank/web/css/source/_email-base.less#L136-L140

However, it gets used in the Magento/blank & Magento/luma themes without being wrapped in .email-non-inline().

This throws an error when using less.js compiler v2.7.3 when compiling the email-inline.less file. Error message: extend ' .no-link a' has no matches.

See #22330 for more details.

Fixed Issues (if relevant)

  1. Error "extend ' .no-link a' has no matches" when compiling email-inline css using an alternative less compiler #22330: Error "extend ' .no-link a' has no matches" when compiling email-inline css using an alternative less compiler

Manual testing scenarios (*)

  1. Having nodejs v8 installed
  2. Setting up vanilla Magento installation using composer
  3. Run npm install [email protected]
  4. Run bin/magento setup:static-content:deploy -f -t Magento/luma en_US
  5. Run node_modules/.bin/lessc --no-color var/view_preprocessed/pub/static/frontend/Magento/luma/en_US/css/email-inline.less | head
  6. Notice that without this fix the first line says: extend ' .no-link a' has no matches, with this fix that error is gone.
  7. When sending an order confirmation email, verify that the styling of the phone number should be without underline and in color #333333, not in #006bb4.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

…l-non-inline() isn't active, so when using '.no-link a', it should be wrapped inside .email-non-inline().
@m2-assistant
Copy link

m2-assistant bot commented Apr 14, 2019

Hi @hostep. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-4753 has been created to process this Pull Request

@VasylShvorak
Copy link
Contributor

✔️ QA passed

@m2-assistant
Copy link

m2-assistant bot commented Apr 20, 2019

Hi @hostep, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@meker12
Copy link
Contributor

meker12 commented Jun 3, 2019

Release note:
Theme
Updated the email template stylesheet for the Magento default and Luma themes to correctly specify the .no-link selector. This update fixes the following less compilation error that displays when compiling the email-inline.less file using less.js compiler v2.73:
extend ' .no-link a' has no matches

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

Successfully merging this pull request may close these issues.

5 participants