I am using a third-party module, i did model and template files override, how to override CSS in the custom module.

Under web/css folder i am created three custom less file, how to rewrite from the custom module?

1 Answer 1


Take a look: https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/css-guide/css_quick_guide_approach.html#override-module-styles

You can do it directly in theme or create a module if you want to change something else (more than only css)

Considering its only css:

to Override: <theme_dir>/ <module_dir>/ web/ css/ source/_module.less

to Just append new CSS' rules: <theme_dir>/ <module_dir>/ web/ css/ source/_extend.less

  • I am created a custom module module and override model and template files, how to override css?
    – zus
    Commented Mar 23, 2021 at 17:28
  • In the third-party module the CSS rules are in view/<base|front/back end>/web/css/source/_module.less? Or there is a .css file in somewhere?
    – jefferson
    Commented Mar 23, 2021 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.