2

frontend/Magento/kiegeszitoshop/en_US/css/styles-m.less .lib-popup-button-close-icon is undefined in C:/xampp/htdocs/magento2sample/var/view_preprocessed/css/frontend/Magento/kiegeszitoshop/en_US/css/sourc /_popups.less>

I m getting this error when i m deploying static content using composer..

Have anyone any idea what is going wrong here??

  • same here :( no idea what is going wrong. – Gunther Hebein Mar 23 '16 at 14:09
4

It's because the luma theme has an error in the code, in which hasnt been fixed.

goto line 30 of _popups.less

.lib-popup-button-close-icon

should be

._lib-popup-button-close-icon

then on line 23 of the same file I just removed all those less functions.

...seems to work

  • 1
    magento 2 is a joke btw--happy coding! The github repo is littered with bugs tread carefully my friend--god speed. – Chris Anderson Apr 6 '16 at 1:07
  • Yes you are right ! I thing people have stop using magento2 for at least 1year. And I will check your answer and let you know – Asish Hira Apr 6 '16 at 6:11
2

Yes, It is a bug. If your theme inherit from Theme_Luma edit file:

vendor/magento/theme-frontend-luma/web/css/source/_popups.less

Or if your theme inherit from Theme_blank edit this file:

vendor/magento/theme-frontend-blank/web/css/source/_popups.less

On end of file copy this content:

    //  Popup close button use icon
.lib-popup-button-close-icon(
    @_popup-button-close-icon,
    @_popup-icon-font-content,
    @_popup-icon-font,
    @_popup-icon-font-size,
    @_popup-icon-font-line-height,
    @_popup-icon-font-color,
    @_popup-icon-font-color-hover,
    @_popup-icon-font-color-active,
    @_popup-icon-font-margin,
    @_popup-icon-font-vertical-align,
    @_popup-icon-font-position,
    @_popup-icon-font-text-hide
) when (@_popup-button-close-icon = true) {
    .lib-button-icon(
        @_icon-font-content: @_popup-icon-font-content,
        @_icon-font: @_popup-icon-font,
        @_icon-font-size: @_popup-icon-font-size,
        @_icon-font-line-height: @_popup-icon-font-line-height,
        @_icon-font-color: @_popup-icon-font-color,
        @_icon-font-color-hover: @_popup-icon-font-color-hover,
        @_icon-font-color-active: @_popup-icon-font-color-active,
        @_icon-font-margin: @_popup-icon-font-margin,
        @_icon-font-vertical-align: @_popup-icon-font-vertical-align,
        @_icon-font-position: @_popup-icon-font-position,
        @_icon-font-text-hide: @_popup-icon-font-text-hide
    );
}

//  Popup close button reset
._lib-popup-button-close-reset (
    @_popup-button-close-reset
) when (@_popup-button-close-reset = true) {
    .lib-button-reset();
}

Above code is from vendor/magento/magento2-base/lib/web/css/source/lib/_popups.less

Finally clean static folder and run command

rm -rf pub/static/frontend/; rm -rf var/view_preprocessed/
php bin/magento setup:static-content:deploy
1

I tried Chris's solution which is to change

.lib-popup-button-close-icon

to

._lib-popup-button-close-icon

on line 30 of _popups.less and then on line 23 of the same file I just removed all those less functions. But I kept on having the same problems. Even after clearing all the necessary cache, static, and var folders.

I then tried Marcin's solution and that seems to have fixed the problems for me. The only caveat is that I had to add this code to all the themes and child themes that had a bug in _popups.less. Otherwise the deploy static view files command would throw an error and halt.

//  Popup close button use icon
.lib-popup-button-close-icon(
    @_popup-button-close-icon,
    @_popup-icon-font-content,
    @_popup-icon-font,
    @_popup-icon-font-size,
    @_popup-icon-font-line-height,
    @_popup-icon-font-color,
    @_popup-icon-font-color-hover,
    @_popup-icon-font-color-active,
    @_popup-icon-font-margin,
    @_popup-icon-font-vertical-align,
    @_popup-icon-font-position,
    @_popup-icon-font-text-hide
) when (@_popup-button-close-icon = true) {
    .lib-button-icon(
        @_icon-font-content: @_popup-icon-font-content,
        @_icon-font: @_popup-icon-font,
        @_icon-font-size: @_popup-icon-font-size,
        @_icon-font-line-height: @_popup-icon-font-line-height,
        @_icon-font-color: @_popup-icon-font-color,
        @_icon-font-color-hover: @_popup-icon-font-color-hover,
        @_icon-font-color-active: @_popup-icon-font-color-active,
        @_icon-font-margin: @_popup-icon-font-margin,
        @_icon-font-vertical-align: @_popup-icon-font-vertical-align,
        @_icon-font-position: @_popup-icon-font-position,
        @_icon-font-text-hide: @_popup-icon-font-text-hide
    );
}

//  Popup close button reset
._lib-popup-button-close-reset (
    @_popup-button-close-reset
) when (@_popup-button-close-reset = true) {
    .lib-button-reset();
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.