I am trying to customize a theme in Magento but it does not work. I added my own stylesheet instead of the old one print.css and changed the default-head-blocks.xml and deployed setup Magento and flush all caches but nothing changes, how can I customize my theme, any advice, please?

thank you.


You can extend the css in your theme using _extend.less file.

Create app/design/frontend/vendor/theme/web/css/source/_extend.less

and add your css there.

Run deploy command.

php bin/magento setup:static-content:deploy -f

1) First you need to override print.less from the blank theme.

copy this file and override in your theme directory.**

2) dev\tools\grunt\configs\theme.js open this file and add print.less in your theme.

yourtheme: {
        area: 'frontend',
        name: 'vendor/yourtheme', 
        locale: 'en_US',
        files: [
        dsl: 'less'

3) Run command php bin/magento c:f

4) Run command php bin/magento s:up

After that you can run grunt exec and grunt watch command then check is print.less is compile or not.

I hop this will help you.

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.