cancel
Showing results for 
Search instead for 
Did you mean: 

Variable @button__shadow-active is undefined while running deploy static content in Magento 2

SOLVED

Variable @button__shadow-active is undefined while running deploy static content in Magento 2

I am getting this error whenever running php bin/magento setup:static-content:deploy.

It showing variable @button__shadow-active is undefined in file en_US/css/source/_extends.less in _extends.less. How to solve this. Kindly help me.

 

Due to this uncompleted static content deploy, I am facing Internal 500 error in the site. The site is not opening.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Variable @button__shadow-active is undefined while running deploy static content in Magento 2

Hello @kowsigan_atsaya,

I think in your's theme' css/source/_extend.less you are using a less variable @button__shadow-active which is not declared and defined anywhere.

So please define this variable in your theme's css/source/_theme.less as 

@button__shadow-active: red;

And then deploy the static contents. I hope this will help you. If still you face issue, let me know. If it helps you, please accept it as solution and give kudos.

Regards.

View solution in original post

6 REPLIES 6

Re: Variable @button__shadow-active is undefined while running deploy static content in Magento 2

Hi @kowsigan_atsaya,

I have fixed same type of error earlier.

You can try below solution.

Try once after adding undefined variable in your theme's _variable.less fine and declare there.

I managed to fix the problem, so static content is deployed. I had to add these to _variables.less (from luma theme)

@color-lighter-grayish: #cacaca;

I hope it will help you!

Re: Variable @button__shadow-active is undefined while running deploy static content in Magento 2

Hi, I just now checked in luma theme in the path -> /vendor/magento/theme-frontend-luma/web/css/source but there is no @button__shadow-active variable defined in _variable.less file. Can you tell me elaborately?

Re: Variable @button__shadow-active is undefined while running deploy static content in Magento 2

Hello @kowsigan_atsaya,

I think in your's theme' css/source/_extend.less you are using a less variable @button__shadow-active which is not declared and defined anywhere.

So please define this variable in your theme's css/source/_theme.less as 

@button__shadow-active: red;

And then deploy the static contents. I hope this will help you. If still you face issue, let me know. If it helps you, please accept it as solution and give kudos.

Regards.

Re: Variable @button__shadow-active is undefined while running deploy static content in Magento 2

@Sarvagya PandeyHi, Thanks. It working fine now.

Re: Variable @button__shadow-active is undefined while running deploy static content in Magento 2

Great !!!

Re: Variable @button__shadow-active is undefined while running deploy static content in Magento 2

Just for documentation sake I had a similar problem with `@button__shadow` and `@minicart-icons-color` not being found in Theme Blank when running deploy after assigning my new theme.

 

I added it to vendor/magento/theme-frontend-blank/web/css/source/_variables.less and then it fixed it.