0

I am trying to change the colours from the standard Magento 2 blank theme via the _theme.less file. I currently have the following file structure /public_html/app/design/frontend/GladiatorFitness/Gladiator

- registration.php  
- theme.xml  
- web
-- css  
--- source
---- _theme.less  
---- _typography.less
-- fonts  
-- images

In my _themes.less I have added the following the following, and I have attempted to clear caches, and deploy assets. Nothing seems to make a difference.

//  Primary button
@button-primary__background: @color-orange-red1;
@button-primary__border: 1px solid @color-orange-red2;
@button-primary__color: @color-white;
@button-primary__hover__background: darken(@color-orange-red1, 5%);
@button-primary__hover__border: 1px solid @color-orange-red2;
@button-primary__hover__color: @color-white;
1

There should be a _variables.less file in the source folder of css codes. Try adding your codes there. Then you will see the change in colors.

|improve this answer|||||
0

After applying your theme, make sure you are in a developer mode (when flushing cache)

  • Go to your Magento Admin .
    Then go to System > Tools > Cache Management and click Flush Static Files Cache.

    Or

  • Manually clear the pub/static and var/view_preprocessed directories and subdirectories except for pub/static/.htaccess.

After clearing cache, run static-content:deploy -f (to force deployment)

|improve this answer|||||

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.