0

I need to use custom css in IE.

Added below code to default_head_blocks.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
       <css src="css/ie_styles.css" ie_condition="IE" />
    </head>
</page>

My magento version is 2.3.

I have written css in the ie_styles.css file which should load only in IE, but its not loading in my case when opened in IE.

Which is not loading in IE browser. Am i missing any other thing? I need to load separate css file only for IE browser.

Can anyone help me on this please.

0

Magento 2 no longer supports IE9 so this is unlikely to ever be fixed by Magento

It's looking very likely that this is down to the fact IE9 can only support up to 4096 selectors, my styles-m.css currently has 4977 selectors (due to having Luma as a parent (bad idea!)).

The styles inside the media-common mixin aren't displaying as they are placed last, after the 4096 limit.

It seems my only solution is to split the CSS up into multiple files, this should be fun!

| improve this answer | |

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.