CSS not loading properly in magento2. Getting below error:
NameError: variable @button__shadow-active is undefined
in _buttons.less
CSS not loading properly in magento2. Getting below error:
NameError: variable @button__shadow-active is undefined
in _buttons.less
Do you use wampserver ?
Apache->apache modules->rewrite_module[enable this]
After this start all services and check it ........
Css not loaded properly means static content rendering problem so,
Remove cache,page_cache,view_preprocessed from var table
Give full permissions to var folder
Run static command in magento root folder php bin/magento setup:static-content:deploy
now Roload the site
CSS not loading properly due to static deploy not push the file to pub/static directory.
You have to follow the below steps.
rm -rf var/*
rm -rf pub/static/*
php bin/magento setup:static-content:deploy
chmod -R 7777 var pub/static
As the error says your less variable is missing and not found. It means these are possible reasons for your error:
@import "custom-variables.less";
Without code, there are only guesses. Please provide us a code so we could check it more precisely. Also, check your .log files there can be some hints.
From
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
From
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Try this,
set permission on /var
and /pub
folders to 777
ssh using this command
php bin/magento setup:static-content:deploy