Elasticsuite: variable @autocomplete-item__border is undefined

Created on 29 Nov 2016  路  7Comments  路  Source: Smile-SA/elasticsuite

elasticsuite 2.2.3

[2016-11-29 11:13:25] main.CRITICAL: Compilation from source: frontend/***/***/en_GB/css/styles-l.less variable @autocomplete-item__border is undefined in file /var/www/html/web/var/view_preprocessed/css/frontend/*****/*****/en_GB/Smile_ElasticsuiteCore/css/source/_module.less in _module.less on line 30, column 34 28| border-bottom: 0; 29| } 30| .lib-css(border-top, @autocomplete-item__border); 31| cursor: default; 32| margin: 0; 33| padding: @indent__xs @indent__xl @indent__xs @indent__s; [] []

is preventing generation of css

Most helpful comment

To fix it i had to add the following to or theme. I would suggest having some fallback if its not defined and documenting that a bit more clearly.

@autocomplete__background-color: @color-white; @autocomplete__border: 1px solid @form-element-input__border-color; @autocomplete-item__border: 1px solid @color-gray90; @autocomplete-item__hover__color: @color-gray91; @autocomplete-item-amount__color: @color-gray60;

All 7 comments

This is on magneto 2.1.2

To fix it i had to add the following to or theme. I would suggest having some fallback if its not defined and documenting that a bit more clearly.

@autocomplete__background-color: @color-white; @autocomplete__border: 1px solid @form-element-input__border-color; @autocomplete-item__border: 1px solid @color-gray90; @autocomplete-item__hover__color: @color-gray91; @autocomplete-item-amount__color: @color-gray60;

Hello @LouiseMcMahon

Could you describe how is configured your "Design" ? Which theme do you use ? A custom one from scratch ?

The @autocomplete-* variables are defined into the Luma theme, but also in the Blank theme.

If you are derivating one of those 2 themes you are not supposed to face this issue.

Let us know,

Regards

Hi @romainruaud its a completely custom one and even it it was based off blank theme we tend to remove unused variables.

Well... I'm afraid that I don't get it. Theses variables are not unused because they are used by our extension, but also by standard Magento's autocomplete box, so you should not have removed them from the blank theme, don't you ?

Hi @LouiseMcMahon,

As explained by @romainruaud, the variables are present in standard Magento theme.
We can not handle heavy customizations done in custom themes by the users of the module and only ship something that works out of the box on a standard Magento.

Additionally, we can not propose our own default values for variables that are expected to be present, since it would override the values provided by the default theme and future changes in the default theme would not be applied then.

I fear that you will to have to live with this ...

I have encountered the same bug - custom theme which was forked from a older blank-theme.
I could solve this by creating the file app/design/frontend//base/Magento_CatalogSearch/web/css/source/_module.less and putting the instructions inside.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShirishRam picture ShirishRam  路  3Comments

surendiranganesan picture surendiranganesan  路  3Comments

shamoon picture shamoon  路  3Comments

ghost picture ghost  路  4Comments

gihovani picture gihovani  路  4Comments