Skip to main content
7 votes
Accepted

Magento 2.2 LESS not compiling locally on Ubuntu

Did you delete the compiled file in the pub/static folder first? You should delete those css files (the styles-m.css and the styles-l.css), clear the var/view_preprocessed folder and then run compile. ...
circlesix's user avatar
  • 4,303
6 votes

Magento 2.2 LESS not compiling locally on Ubuntu

This should work: rm -rf var/view_preprocessed rm -rf pub/static/frontend You don't have to run setup:static-content:deploy if you are in developer mode. It's possible that the user created the ...
Czettner Sándor's user avatar
5 votes

How does Magento 2 work with CSS grunt-autoprefixer

Please perform above changes, I hope it will work out well. package.json { "name": "Project", "author": "Vendor", "description": "Node modules dependencies for local development", "version": ...
gelanivishal's user avatar
  • 1,336
5 votes

How does Magento 2 work with CSS grunt-autoprefixer

Customize dev/tools/grunt/configs/autoprefixer.json and run grunt autoprefixer. You need to setup it manually in you the deployment pipeline, b/c there is no way to run Grunt tasks from Magento.
igloczek's user avatar
  • 1,252
2 votes
Accepted

Execute less after changes

Remove var and pub/static folder and deploy static content again as per below commands. rm -rf var/ pub/static/ php bin/magento setup:static-content:deploy chmod -R 777 var/ pub/static/
Kishan Patadia's user avatar
2 votes

Magento2 Keeping CSS changes after redeployment

Never work in cache css files in pub/static folder. Files under this folder always overwritten when deploy command is run. Option: Installing and configuring Grunt Magento has built-in Grunt tasks ...
Sourav's user avatar
  • 1,298
2 votes

Unable to get Grunt less task working on Custom Magento theme

Try to leave the default themes.js untouched and copy everything over to local-themes.js and add your own theme there. Maybe also try using another name than "default" for the property.
Chaz's user avatar
  • 269
2 votes

Error while running static deploy command in magento 2

@mobile-cart-padding is need to defined at your variable.less or _extends.less files at your theme folder. After that, you need to do static content deploy
Amit Bera's user avatar
  • 77.6k
2 votes

Magento 2.2.5 styles-m.css and styles-l.css not load

I found a problem. The problem was that I made a syntax mistake in less file. So grunt didn't compiled these files.
Romienas's user avatar
2 votes

Styles are not loading in Magento 2.4.2 on Mac OS

You can try this if you have configured nginx correctly: If you use php 7.4.20 Edit that php.ini file and find the section [Pcre] and add this line at the bottom of that section : pcre.jit=0 Restart ...
Pascal LE MINH's user avatar
2 votes

Luma theme less styles styles not showing

It's not recommended to edit the files in the vendor directory directly, as any changes made there will be overwritten when Magento is updated or when the theme is updated. Instead, you should create ...
Harun's user avatar
  • 566
1 vote

How to immediate effect on website after changes in less css code?

You can use Live Reload and Grunt. https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/css-topics/css_debug.html
Anees Ahmad's user avatar
1 vote
Accepted

How to immediate effect on website after changes in less css code?

If you install Grunt you can watch and automatically compile LESS to CSS without having to run any commands. Once installed run grunt less to compile or grunt watch to watch files and automatically ...
Ben Crook's user avatar
  • 15.7k
1 vote

Enabling client side less compilation breaks everything, getting 404 errors and couldn't go back to server side compilation mode

If you want to change back to "server side compilation mode" use this commant followed by php if needed - bin/magento config:set dev/front_end_development_workflow/type ...
Nilesh Dubey's user avatar
  • 1,087
1 vote
Accepted

Less CSS inlining error

Below commands resolved the error. Deploy mode set to Default bin/magento deploy:mode:set default Upgraded setup bin/magento setup:upgrade Deployed static content bin/magento setup:static-content:...
ishaq's user avatar
  • 195
1 vote

Magento 2.2: How to apply breakpoints in custom .less files

Problem is that there is no less fail that imports your custom less file. For example you could move blank theme module LESS file under your theme one Vendor/theme/Magento_Theme/web/css/source/...
K-s's user avatar
  • 51
1 vote

_extend.less doesn't seem to work

You can import less in following way. _extend.less is availble in following path app/design/frontend/<vendor name>/<theme name>/web/css/source/_extend.less You have to write in _extend....
Vrajesh Patel's user avatar
1 vote

proper way to use .less files in custom theme?

You must delete css file from core theme in pub/static/frontend/ var/view_preprocessed/css/frontend/
Tomalo's user avatar
  • 161
1 vote
Accepted

Error when running grunt exec

Try to use another node version. Node version is 10.10.0 but i returned to 8.12.0 and works. You can change with this https://github.com/creationix/nvm
rafaga's user avatar
  • 26
1 vote

Error when running grunt exec

In my experience this happens when Grunt can't access the database. Make sure: You are running this from inside your Magento SSH terminal Your Magento instance running and has a working DB If both ...
Ben Crook's user avatar
  • 15.7k
1 vote

Execute less after changes

Just run php bin/magento setup:static-content:deploy from your project root folder. You might have to remove contents of pub/static or to be more granular affected files by your changes. Source: The ...
vitoriodachef's user avatar
1 vote

Cannot override _forms.less

Note 1: This will always assume you are extending magento-blank. Note 2: <theme-dir> is app/design/frontend/Vendor/theme/ The basics: Changing Base Variables (for tl;dr, skip to conclusion) ...
Envision eCommerce's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible