Magento 2 Component less/css editing best practicesEdit CSS/LESS problemsMagento 2.1 LESS compilation issuesMagento 2 - Magento 2 - Why is less file loading first? Need it to load after css filesBest way to extend module less found in web/css/source/module, like _minicart.less?Can edit .less and .css file though FTP?Using LESS variables in extended LESS file Magento 2Magento 2 Load _extend.less lastWhich css format is best for Magento 2 theme?How to edit .less or css filesMagento 2 What is the best practices to override the luma theme

What are the basics of commands in Minecraft Java Edition?

How fast does a character need to move to be effectively invisible?

Is this artwork (used in a video game) real?

What is the difference between a Hosaka, Ono-Sendai, and a "deck"?

Wordplay subtraction paradox

What is the meaning of [[:space:]] in bash?

How can a drink contain 1.8 kcal energy while 0 g fat/carbs/protein?

How should one refer to knights (& dames) in academic writing?

What would be the safest way to drop thousands of small, hard objects from a typical, high wing, GA airplane?

Why is the total probability theorem expressed in this way?

What "fuel more powerful than anything the West (had) in stock" put Laika in orbit aboard Sputnik 2?

Why is Google approaching my VPS machine?

Vienna To Graz By Rail

How can the electric potential be zero at a point where the electric field isn't, if that field can give a test charge kinetic energy?

What were the problems on the Apollo 11 lunar module?

Is it okay for a chapter's POV to shift as it progresses?

Improve quality of image bars

Did 007 exist before James Bond?

Cauchy reals and Dedekind reals satisfy "the same mathematical theorems"

Coverting list of string into integers and reshaping the original list

Generating a PIN from cryptographic bytes

How to honestly answer questions from a girlfriend like "How did you find this place" without giving the impression I'm always talking about my exes?

Was Jacobi the first to notice the ambiguity in the partial derivatives notation? And did anyone object to his fix?

Why do so many pure math PhD students drop out or leave academia, compared to applied mathematics PhDs?



Magento 2 Component less/css editing best practices


Edit CSS/LESS problemsMagento 2.1 LESS compilation issuesMagento 2 - Magento 2 - Why is less file loading first? Need it to load after css filesBest way to extend module less found in web/css/source/module, like _minicart.less?Can edit .less and .css file though FTP?Using LESS variables in extended LESS file Magento 2Magento 2 Load _extend.less lastWhich css format is best for Magento 2 theme?How to edit .less or css filesMagento 2 What is the best practices to override the luma theme






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Please help to understand below 2:
1. How to override component css using less files?
2. Is anyone can provide some of examples to write css in _extend.less file.










share|improve this question




























    0















    Please help to understand below 2:
    1. How to override component css using less files?
    2. Is anyone can provide some of examples to write css in _extend.less file.










    share|improve this question
























      0












      0








      0








      Please help to understand below 2:
      1. How to override component css using less files?
      2. Is anyone can provide some of examples to write css in _extend.less file.










      share|improve this question














      Please help to understand below 2:
      1. How to override component css using less files?
      2. Is anyone can provide some of examples to write css in _extend.less file.







      magento2 frontend less less-css






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 9 at 6:04









      Kamlesh YaduwanshiKamlesh Yaduwanshi

      265 bronze badges




      265 bronze badges




















          1 Answer
          1






          active

          oldest

          votes


















          0














          You can add in your theme app/design/fronted/PackageTheme/YourTheme/Aheadworks/Autorelated/web/css, and copy the CSS file from app/code/Aheadworks/Autorelated/view/frontend/web/css, and there you can change it.



          For edit in LESS file, you must add _module.less file in this path app/code/Aheadworks/Autorelated/view/frontend/web/css/source and you can also copy the CSS content from CSS files in _module.less and you can edit.



          After that you must run php bin/magento setup:static-content:deploy




          Best Practice:




          You should not edit/modify files within pub/* or vendor/* directory. Pub is for deployment and vendor is for default structure, which you override via your template or custom modules. Instead:



          • create a new theme inside app/design/frontend/vendor/yourTheme/. You can use Blank or Luma theme. You can also create new theme which inherites from Blank (inheritance is defined within theme.xml). If you are already using some theme then skip this step.

          • edit .less within your theme so the changes stay visible and don't get replaced when clearing the cache or upgrading the system.

          • Use grunt to compile your .less into deployment files.

          • You can also setup sourcemaps to pin point your styling within the theme .less files so you can be more productive.

          I hope this will help






          share|improve this answer

























          • My question is slightly different. Actually I am overriding the luma theme as per best practices as suggested in official docs. Trying to get further understanding on luma theme less file editing. For example if I need navigation css changes, what should be the best practices. Should I directly add the css or I need to change the mixin/variables codes. Just trying to best way of theme css editing.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:21











          • @KamleshYaduwanshi I add more detail in the answer, hope this will help you and other readers

            – Muhammad Hasham
            Jul 9 at 6:26











          • I am following all these best practices, just wants to know whether I edit the less codes mixing and variables or write regular css.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:31













          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281289%2fmagento-2-component-less-css-editing-best-practices%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You can add in your theme app/design/fronted/PackageTheme/YourTheme/Aheadworks/Autorelated/web/css, and copy the CSS file from app/code/Aheadworks/Autorelated/view/frontend/web/css, and there you can change it.



          For edit in LESS file, you must add _module.less file in this path app/code/Aheadworks/Autorelated/view/frontend/web/css/source and you can also copy the CSS content from CSS files in _module.less and you can edit.



          After that you must run php bin/magento setup:static-content:deploy




          Best Practice:




          You should not edit/modify files within pub/* or vendor/* directory. Pub is for deployment and vendor is for default structure, which you override via your template or custom modules. Instead:



          • create a new theme inside app/design/frontend/vendor/yourTheme/. You can use Blank or Luma theme. You can also create new theme which inherites from Blank (inheritance is defined within theme.xml). If you are already using some theme then skip this step.

          • edit .less within your theme so the changes stay visible and don't get replaced when clearing the cache or upgrading the system.

          • Use grunt to compile your .less into deployment files.

          • You can also setup sourcemaps to pin point your styling within the theme .less files so you can be more productive.

          I hope this will help






          share|improve this answer

























          • My question is slightly different. Actually I am overriding the luma theme as per best practices as suggested in official docs. Trying to get further understanding on luma theme less file editing. For example if I need navigation css changes, what should be the best practices. Should I directly add the css or I need to change the mixin/variables codes. Just trying to best way of theme css editing.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:21











          • @KamleshYaduwanshi I add more detail in the answer, hope this will help you and other readers

            – Muhammad Hasham
            Jul 9 at 6:26











          • I am following all these best practices, just wants to know whether I edit the less codes mixing and variables or write regular css.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:31















          0














          You can add in your theme app/design/fronted/PackageTheme/YourTheme/Aheadworks/Autorelated/web/css, and copy the CSS file from app/code/Aheadworks/Autorelated/view/frontend/web/css, and there you can change it.



          For edit in LESS file, you must add _module.less file in this path app/code/Aheadworks/Autorelated/view/frontend/web/css/source and you can also copy the CSS content from CSS files in _module.less and you can edit.



          After that you must run php bin/magento setup:static-content:deploy




          Best Practice:




          You should not edit/modify files within pub/* or vendor/* directory. Pub is for deployment and vendor is for default structure, which you override via your template or custom modules. Instead:



          • create a new theme inside app/design/frontend/vendor/yourTheme/. You can use Blank or Luma theme. You can also create new theme which inherites from Blank (inheritance is defined within theme.xml). If you are already using some theme then skip this step.

          • edit .less within your theme so the changes stay visible and don't get replaced when clearing the cache or upgrading the system.

          • Use grunt to compile your .less into deployment files.

          • You can also setup sourcemaps to pin point your styling within the theme .less files so you can be more productive.

          I hope this will help






          share|improve this answer

























          • My question is slightly different. Actually I am overriding the luma theme as per best practices as suggested in official docs. Trying to get further understanding on luma theme less file editing. For example if I need navigation css changes, what should be the best practices. Should I directly add the css or I need to change the mixin/variables codes. Just trying to best way of theme css editing.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:21











          • @KamleshYaduwanshi I add more detail in the answer, hope this will help you and other readers

            – Muhammad Hasham
            Jul 9 at 6:26











          • I am following all these best practices, just wants to know whether I edit the less codes mixing and variables or write regular css.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:31













          0












          0








          0







          You can add in your theme app/design/fronted/PackageTheme/YourTheme/Aheadworks/Autorelated/web/css, and copy the CSS file from app/code/Aheadworks/Autorelated/view/frontend/web/css, and there you can change it.



          For edit in LESS file, you must add _module.less file in this path app/code/Aheadworks/Autorelated/view/frontend/web/css/source and you can also copy the CSS content from CSS files in _module.less and you can edit.



          After that you must run php bin/magento setup:static-content:deploy




          Best Practice:




          You should not edit/modify files within pub/* or vendor/* directory. Pub is for deployment and vendor is for default structure, which you override via your template or custom modules. Instead:



          • create a new theme inside app/design/frontend/vendor/yourTheme/. You can use Blank or Luma theme. You can also create new theme which inherites from Blank (inheritance is defined within theme.xml). If you are already using some theme then skip this step.

          • edit .less within your theme so the changes stay visible and don't get replaced when clearing the cache or upgrading the system.

          • Use grunt to compile your .less into deployment files.

          • You can also setup sourcemaps to pin point your styling within the theme .less files so you can be more productive.

          I hope this will help






          share|improve this answer















          You can add in your theme app/design/fronted/PackageTheme/YourTheme/Aheadworks/Autorelated/web/css, and copy the CSS file from app/code/Aheadworks/Autorelated/view/frontend/web/css, and there you can change it.



          For edit in LESS file, you must add _module.less file in this path app/code/Aheadworks/Autorelated/view/frontend/web/css/source and you can also copy the CSS content from CSS files in _module.less and you can edit.



          After that you must run php bin/magento setup:static-content:deploy




          Best Practice:




          You should not edit/modify files within pub/* or vendor/* directory. Pub is for deployment and vendor is for default structure, which you override via your template or custom modules. Instead:



          • create a new theme inside app/design/frontend/vendor/yourTheme/. You can use Blank or Luma theme. You can also create new theme which inherites from Blank (inheritance is defined within theme.xml). If you are already using some theme then skip this step.

          • edit .less within your theme so the changes stay visible and don't get replaced when clearing the cache or upgrading the system.

          • Use grunt to compile your .less into deployment files.

          • You can also setup sourcemaps to pin point your styling within the theme .less files so you can be more productive.

          I hope this will help







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 9 at 6:25

























          answered Jul 9 at 6:09









          Muhammad HashamMuhammad Hasham

          5,53910 gold badges31 silver badges80 bronze badges




          5,53910 gold badges31 silver badges80 bronze badges












          • My question is slightly different. Actually I am overriding the luma theme as per best practices as suggested in official docs. Trying to get further understanding on luma theme less file editing. For example if I need navigation css changes, what should be the best practices. Should I directly add the css or I need to change the mixin/variables codes. Just trying to best way of theme css editing.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:21











          • @KamleshYaduwanshi I add more detail in the answer, hope this will help you and other readers

            – Muhammad Hasham
            Jul 9 at 6:26











          • I am following all these best practices, just wants to know whether I edit the less codes mixing and variables or write regular css.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:31

















          • My question is slightly different. Actually I am overriding the luma theme as per best practices as suggested in official docs. Trying to get further understanding on luma theme less file editing. For example if I need navigation css changes, what should be the best practices. Should I directly add the css or I need to change the mixin/variables codes. Just trying to best way of theme css editing.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:21











          • @KamleshYaduwanshi I add more detail in the answer, hope this will help you and other readers

            – Muhammad Hasham
            Jul 9 at 6:26











          • I am following all these best practices, just wants to know whether I edit the less codes mixing and variables or write regular css.

            – Kamlesh Yaduwanshi
            Jul 9 at 6:31
















          My question is slightly different. Actually I am overriding the luma theme as per best practices as suggested in official docs. Trying to get further understanding on luma theme less file editing. For example if I need navigation css changes, what should be the best practices. Should I directly add the css or I need to change the mixin/variables codes. Just trying to best way of theme css editing.

          – Kamlesh Yaduwanshi
          Jul 9 at 6:21





          My question is slightly different. Actually I am overriding the luma theme as per best practices as suggested in official docs. Trying to get further understanding on luma theme less file editing. For example if I need navigation css changes, what should be the best practices. Should I directly add the css or I need to change the mixin/variables codes. Just trying to best way of theme css editing.

          – Kamlesh Yaduwanshi
          Jul 9 at 6:21













          @KamleshYaduwanshi I add more detail in the answer, hope this will help you and other readers

          – Muhammad Hasham
          Jul 9 at 6:26





          @KamleshYaduwanshi I add more detail in the answer, hope this will help you and other readers

          – Muhammad Hasham
          Jul 9 at 6:26













          I am following all these best practices, just wants to know whether I edit the less codes mixing and variables or write regular css.

          – Kamlesh Yaduwanshi
          Jul 9 at 6:31





          I am following all these best practices, just wants to know whether I edit the less codes mixing and variables or write regular css.

          – Kamlesh Yaduwanshi
          Jul 9 at 6:31

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281289%2fmagento-2-component-less-css-editing-best-practices%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

          Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

          Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림