Skip to content

Less code isn't 100% valid #775

Closed
@hostep

Description

@hostep

Preconditions (*)

  1. Seen on Magento OS 2.4.3
  2. Which comes with page-builder 1.7.0 (which isn't even published here on github? 😕 )
  3. I have nodejs v12 installed, but maybe it works with other versions as well

Steps to reproduce (*)

  1. Install Magento OS 2.4.3 and make sure page-builder is also installed
  2. Run npm install less@3.13.1
  3. Run rm -R var/view_preprocessed/* pub/static/*; bin/magento setup:static-content:deploy -f --theme=Magento/backend en_US
  4. Run node_modules/.bin/lessc -l var/view_preprocessed/pub/static/adminhtml/Magento/backend/en_US/css/styles.less

Expected result (*)

  1. The less linting should give no errors or warnings

Actual result (*)

  1. Linting the less file generates the following warnings:
extend ' .abs-reset-list' has no matches
extend ' .abs-add-box-sizing' has no matches
extend ' .abs-actions-addto' has no matches
extend ' .abs-product-link' has no matches
extend ' .abs-reset-image-wrapper' has no matches

Discussion

The issues come from the page-builder module, when I don't have page builder installed with Magento 2.4.3, I don't get linting errors.

We've seen similar problems before in core Magento in the following tickets/PR's. Maybe reading those can help you figure out what exactly is wrong and how to fix these problems:

It would be great if the less code from this module has no linting errors.
Would also be super nice if Magento's static tests could include a check for this, so it doesn't get introduced in any other new modules that are created in the future

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions