Remove or overwrite style-l.css in custom theme The Next CEO of Stack Overflowmagento 2 custom css in custom theme not being appliedMagento 2: style-m.css vs style-l.cssResources and admin panel are not available after installingStyle-l.css and Style-m.css is missing in my themeMagento media queries in platform-Responsive emailsRefused to apply style “because its MIME type ('text/html') is not a supported stylesheet MIME type”Style sheet is not working when new theme is created in magento 2.2.5?Magento 2 : Refuse to apply styleAdding styles before style-l.cssMagento custom theme, overwrite block content

What CSS properties can the br tag have?

How to set page number in right side in chapter title page?

How to use ReplaceAll on an expression that contains a rule

Traduction de « Life is a roller coaster »

My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?

what's the use of '% to gdp' type of variables?

Where do students learn to solve polynomial equations these days?

Can you teleport closer to a creature you are Frightened of?

Which one is the true statement?

Is it ever safe to open a suspicious HTML file (e.g. email attachment)?

Inexact numbers as keys in Association?

Purpose of level-shifter with same in and out voltages

Expressing the idea of having a very busy time

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

What was Carter Burkes job for "the company" in "Aliens"?

Computationally populating tables with probability data

Help/tips for a first time writer?

How to Implement Deterministic Encryption Safely in .NET

Would a completely good Muggle be able to use a wand?

Easy to read palindrome checker

Lucky Feat: How can "more than one creature spend a luck point to influence the outcome of a roll"?

Can Sneak Attack be used when hitting with an improvised weapon?

What difference does it make using sed with/without whitespaces?



Remove or overwrite style-l.css in custom theme



The Next CEO of Stack Overflowmagento 2 custom css in custom theme not being appliedMagento 2: style-m.css vs style-l.cssResources and admin panel are not available after installingStyle-l.css and Style-m.css is missing in my themeMagento media queries in platform-Responsive emailsRefused to apply style “because its MIME type ('text/html') is not a supported stylesheet MIME type”Style sheet is not working when new theme is created in magento 2.2.5?Magento 2 : Refuse to apply styleAdding styles before style-l.cssMagento custom theme, overwrite block content










2















I have some issues because of the order that CSS is being loaded in. We have



<link rel="stylesheet" type="text/css" media="all" href="https://<site>/pub/static/_cache/merged/c53078aed3784c1f81c0316580b47a29.css" />
<link rel="stylesheet" type="text/css" media="screen and (min-width: 768px)" href="https://<site>/pub/static/frontend/Thespicery/standard/en_GB/css/styles-l.css" />


I really need the cached file to be loaded after the style-l.css.



I am relatively happy to remove the style-l.css altogether but as yet have failed.



I have tried:



  • Removing the parent them (current Magento Blank) from the XML but this doesn't actually remove the reference to the file - it only deletes the actual file and then gives a 404 error (which technically works but I don't want the <link> in the source code


  • In default_head_blocks.xml for Magento Theme overrides adding:


<action method="removeItem"><type>skin_css</type><name>css/style-l.css</name></action>



and



<action method="removeItem"><css src="css/styles-l.css" media="screen and (min-width: 768px)"/></action>



but to no avail.



What is the correct way of doing this? Should I just try to change the load order (is that even possible), or should I remove style-l.css (and if so, how?)?










share|improve this question


























    2















    I have some issues because of the order that CSS is being loaded in. We have



    <link rel="stylesheet" type="text/css" media="all" href="https://<site>/pub/static/_cache/merged/c53078aed3784c1f81c0316580b47a29.css" />
    <link rel="stylesheet" type="text/css" media="screen and (min-width: 768px)" href="https://<site>/pub/static/frontend/Thespicery/standard/en_GB/css/styles-l.css" />


    I really need the cached file to be loaded after the style-l.css.



    I am relatively happy to remove the style-l.css altogether but as yet have failed.



    I have tried:



    • Removing the parent them (current Magento Blank) from the XML but this doesn't actually remove the reference to the file - it only deletes the actual file and then gives a 404 error (which technically works but I don't want the <link> in the source code


    • In default_head_blocks.xml for Magento Theme overrides adding:


    <action method="removeItem"><type>skin_css</type><name>css/style-l.css</name></action>



    and



    <action method="removeItem"><css src="css/styles-l.css" media="screen and (min-width: 768px)"/></action>



    but to no avail.



    What is the correct way of doing this? Should I just try to change the load order (is that even possible), or should I remove style-l.css (and if so, how?)?










    share|improve this question
























      2












      2








      2








      I have some issues because of the order that CSS is being loaded in. We have



      <link rel="stylesheet" type="text/css" media="all" href="https://<site>/pub/static/_cache/merged/c53078aed3784c1f81c0316580b47a29.css" />
      <link rel="stylesheet" type="text/css" media="screen and (min-width: 768px)" href="https://<site>/pub/static/frontend/Thespicery/standard/en_GB/css/styles-l.css" />


      I really need the cached file to be loaded after the style-l.css.



      I am relatively happy to remove the style-l.css altogether but as yet have failed.



      I have tried:



      • Removing the parent them (current Magento Blank) from the XML but this doesn't actually remove the reference to the file - it only deletes the actual file and then gives a 404 error (which technically works but I don't want the <link> in the source code


      • In default_head_blocks.xml for Magento Theme overrides adding:


      <action method="removeItem"><type>skin_css</type><name>css/style-l.css</name></action>



      and



      <action method="removeItem"><css src="css/styles-l.css" media="screen and (min-width: 768px)"/></action>



      but to no avail.



      What is the correct way of doing this? Should I just try to change the load order (is that even possible), or should I remove style-l.css (and if so, how?)?










      share|improve this question














      I have some issues because of the order that CSS is being loaded in. We have



      <link rel="stylesheet" type="text/css" media="all" href="https://<site>/pub/static/_cache/merged/c53078aed3784c1f81c0316580b47a29.css" />
      <link rel="stylesheet" type="text/css" media="screen and (min-width: 768px)" href="https://<site>/pub/static/frontend/Thespicery/standard/en_GB/css/styles-l.css" />


      I really need the cached file to be loaded after the style-l.css.



      I am relatively happy to remove the style-l.css altogether but as yet have failed.



      I have tried:



      • Removing the parent them (current Magento Blank) from the XML but this doesn't actually remove the reference to the file - it only deletes the actual file and then gives a 404 error (which technically works but I don't want the <link> in the source code


      • In default_head_blocks.xml for Magento Theme overrides adding:


      <action method="removeItem"><type>skin_css</type><name>css/style-l.css</name></action>



      and



      <action method="removeItem"><css src="css/styles-l.css" media="screen and (min-width: 768px)"/></action>



      but to no avail.



      What is the correct way of doing this? Should I just try to change the load order (is that even possible), or should I remove style-l.css (and if so, how?)?







      magento-2.1 layout theme template css






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 15 '17 at 14:28









      tim.bakertim.baker

      568825




      568825




















          1 Answer
          1






          active

          oldest

          votes


















          3














          To remove CSS via XML:



          In your theme add the following XML to default.xml



          <head>
          <remove src="css/styles-l.css" />
          </head>


          Source



          Your method didn't work because you're using the Magento 1 method of removing CSS. In Magento 2 <action> tags have been deprecated and skin_css is no longer used, in fact I don't think the theme is referenced to as skin at all anymore.






          share|improve this answer

























            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%2f164517%2fremove-or-overwrite-style-l-css-in-custom-theme%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









            3














            To remove CSS via XML:



            In your theme add the following XML to default.xml



            <head>
            <remove src="css/styles-l.css" />
            </head>


            Source



            Your method didn't work because you're using the Magento 1 method of removing CSS. In Magento 2 <action> tags have been deprecated and skin_css is no longer used, in fact I don't think the theme is referenced to as skin at all anymore.






            share|improve this answer





























              3














              To remove CSS via XML:



              In your theme add the following XML to default.xml



              <head>
              <remove src="css/styles-l.css" />
              </head>


              Source



              Your method didn't work because you're using the Magento 1 method of removing CSS. In Magento 2 <action> tags have been deprecated and skin_css is no longer used, in fact I don't think the theme is referenced to as skin at all anymore.






              share|improve this answer



























                3












                3








                3







                To remove CSS via XML:



                In your theme add the following XML to default.xml



                <head>
                <remove src="css/styles-l.css" />
                </head>


                Source



                Your method didn't work because you're using the Magento 1 method of removing CSS. In Magento 2 <action> tags have been deprecated and skin_css is no longer used, in fact I don't think the theme is referenced to as skin at all anymore.






                share|improve this answer















                To remove CSS via XML:



                In your theme add the following XML to default.xml



                <head>
                <remove src="css/styles-l.css" />
                </head>


                Source



                Your method didn't work because you're using the Magento 1 method of removing CSS. In Magento 2 <action> tags have been deprecated and skin_css is no longer used, in fact I don't think the theme is referenced to as skin at all anymore.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 days ago









                Rizwan

                860526




                860526










                answered Mar 15 '17 at 14:34









                Ben CrookBen Crook

                9,2222477




                9,2222477



























                    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%2f164517%2fremove-or-overwrite-style-l-css-in-custom-theme%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

                    Bulk add to cart function issuecart vs. mini cart issue … rwd themeRedirect Add to cart button to cart pageAdd to cart issue - Magento 2.1The requested Payment Method is not available When creating an orderM2: reason add-to-cart might not function in production modeAdd to cart issue in some android devicesMagento 2 - custom price can not add to subtotal and grand total after add to cartAdd to cart codeIssue with my cart module on pdp and cart pages, just keeps spinningBulk price and quantity update using rest api

                    Category menu linking direct to productHow to create an new observer on the event catalog_product_save_beforePHP else: statements in addtocart.phtml - Adding conditions to the Add To Cart button on product pageAdd template to custom adminhtml buttonAdd category title to product view pageEdit layered navigation filter titles in Magento 1.9.2Have category page main menu based on current categoryProduct collection displaying wrong categoryHow Can I Customize Magento Default URL (Product URL and Category URL)Programatically add cross sell products to all products within a certain categoryHow to create custom link for category?Creating Custom 'Buy Now' button with Custom buy now link