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

Less validate check seem incorrectly as expected #456

Open
mrtuvn opened this issue Jun 18, 2023 · 1 comment
Open

Less validate check seem incorrectly as expected #456

mrtuvn opened this issue Jun 18, 2023 · 1 comment
Labels

Comments

@mrtuvn
Copy link

mrtuvn commented Jun 18, 2023

Preconditions

  1. Any version magento 2 (Example 2.4.6+)

When i checked docs related
Sort all properties in the alphabetical order. Mixins, variables, and so on should go first.
https://devdocs.magento.com/guides/v2.3/coding-standards/code-standard-less.html. But the results validate difference than doc
mention

Steps to reproduce

  1. Change file app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less
  2. Go to the code line around 154
.additional-attributes {
//Some code here
}

Following standards => Show warning (Mixins, variables go first same as docs recommends)

.additional-attributes {
            .lib-table-bordered(@_table_type: clear);
            .lib-table-resize(@_th-padding-left: 0, @_th-padding-right: @indent__l, @_th-padding-bottom: @indent__s, @_td-padding-bottom: @indent__s);
           width: auto;
        }

Nope this way is correct validate instead (No i don't want to follow standards). No warning anymore

.additional-attributes {
            width: auto;
            .lib-table-bordered(@_table_type: clear);
            .lib-table-resize(@_th-padding-left: 0, @_th-padding-right: @indent__l, @_th-padding-bottom: @indent__s, @_td-padding-bottom: @indent__s);
        }

Expected result

  1. No code warning

Actual result

  1. Code warning require Sort all properties in the alphabetical order.
@mrtuvn mrtuvn added the bug Something isn't working label Jun 18, 2023
@m2-assistant
Copy link

m2-assistant bot commented Jun 18, 2023

Hi @mrtuvn. 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


Join Magento Community Engineering Slack and ask your questions in #github channel.

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

No branches or pull requests

1 participant