Closed
Description
Preconditions (*)
- Seen on Magento OS 2.4.3
- Which comes with page-builder 1.7.0 (which isn't even published here on github? 😕 )
- I have nodejs v12 installed, but maybe it works with other versions as well
Steps to reproduce (*)
- Install Magento OS 2.4.3 and make sure page-builder is also installed
- Run
npm install less@3.13.1
- Run
rm -R var/view_preprocessed/* pub/static/*; bin/magento setup:static-content:deploy -f --theme=Magento/backend en_US
- Run
node_modules/.bin/lessc -l var/view_preprocessed/pub/static/adminhtml/Magento/backend/en_US/css/styles.less
Expected result (*)
- The less linting should give no errors or warnings
Actual result (*)
- 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:
- Less compilation extend 'mixin' has no matches magento2#23619
- Less compilation problems in Magento/backend theme magento2#24004
- Fixes less compilation problems in the Magento/blank theme magento2#24001
- Fixes less compilation problems in the Magento/luma theme magento2#24003
- Fix issue extend match class in style-old admin magento2#28895
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