New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To handle IE9, I need to have Meteor NOT concatenate the css files #1876

Closed
patmoore opened this Issue Mar 2, 2014 · 14 comments

Comments

Projects
None yet
@patmoore
Contributor

patmoore commented Mar 2, 2014

IE9 has a 4095 selectors / stylesheet limit. ( you can read a little bit about that here : http://stackoverflow.com/questions/9906794/internet-explorers-css-rules-limits ). Once that limit is hit, the rest of the styling rules are silently ignored. (thank you Microsoft employees for not even bothering with an error message to console)

I would like a clean solution from the Meteor community on how to have Meteor serve the original css files (minimizing is o.k. but not concatenated) to IE9-.

We are doing a temporary hack of asking user to upgrade but that seems really lame since the solution is "simply" get Meteor to not concatenate the css files.

see also : http://stackoverflow.com/questions/22117069/to-handle-ie9-i-need-to-have-meteor-not-concatenate-the-css-files

bug report filed per request by: http://stackoverflow.com/users/1626821/imslavko and http://stackoverflow.com/users/1007676/dave

@glasser

This comment has been minimized.

Member

glasser commented Mar 14, 2014

Thanks for opening the issue so we can track it. We'd like to have better minification options (and @Slava has started to think about them).

@abhiaiyer91

This comment has been minimized.

abhiaiyer91 commented Sep 30, 2014

Hello,

This is Abhi from www.workpop.com. We're experiencing the same issue in Internet Explorer 9 and it is affecting many of our users. Is there a plan to fix this issue?

Thanks so much.

Abhi Aiyer

@avital

This comment has been minimized.

Contributor

avital commented Sep 30, 2014

For reference, the --debug flag to meteor deploy and meteor build (previously meteor bundle) disables both minification and concatenation.

@Slava

This comment has been minimized.

Member

Slava commented Sep 30, 2014

@avital that wouldn't affect CSS concatenation though. We concatenate CSS even in debug mode (with a supporting source map).

@avital

This comment has been minimized.

Contributor

avital commented Sep 30, 2014

YLSNED

@MiroRadenovic

This comment has been minimized.

MiroRadenovic commented Oct 16, 2014

same problem here. we are stuck using meteor in production for IE9 users!

@scmart

This comment has been minimized.

scmart commented Oct 23, 2014

This is also a very annoying problem for us.

@MiroRadenovic

This comment has been minimized.

MiroRadenovic commented Oct 23, 2014

a temp solution is to split the css using bless (http://blesscss.com/)
and add in your

<!--[if lt IE 10]><link href='http://PATH_TO_YOUR_CSS/style.css?0.9749983360525221' rel='stylesheet' type='text/css'><![endif]-->

in this way, IE users will download 2 css: the one created from meteor and the one splitted with bless

please note that we are manually appending a timestamp in the querystring to avoid browser caching the css

@d4nyll

This comment has been minimized.

Contributor

d4nyll commented Jan 16, 2015

Any update on this issue? Would it be much trouble if during the build, we generate ie9-specific CSS files, split it into chunks which fits the 4096 selector limit, _but only if required, and then add a HTML conditional comments _if required so IE9 will load that CSS, and the rest will not bother with it.

And if this is not an issue, then the IE9 CSS won't be generated in the build, and conditional comments won't be in the final HTML.

Not looked much into it, but this script might be useful. There's also this website.

@MiroHibler

This comment has been minimized.

MiroHibler commented Jan 28, 2015

Hey @patmoore, are you using Iron.Router? If you do, would it be possible to manually split your CSS per routes? Than you'd be able to lazy-load them with preloader.

Not exactly what you're looking for, but may help...

@havays

This comment has been minimized.

havays commented Mar 10, 2015

I used two CSS files and meteor doesn't concatenate them, for this i have created separate package which injects the CSS file, placed in public folder, directly into the head tag.
Below is the snapshot of the code:

var head = document.getElementsByTagName('head')[0];

//Generate a style tag
var style1 = document.createElement('link');
style1.type = 'text/css';
style1.rel = "stylesheet";
style1.href = '/style1.css';

head.appendChild(style1);

@lassombra

This comment has been minimized.

Contributor

lassombra commented Jun 15, 2015

What is the status of this? Meteor claims to support IE 8/9 but this is clearly a case of broken support.

@Slava

This comment has been minimized.

Member

Slava commented Jun 15, 2015

Presumably the change proposed here will help.

Slava added a commit that referenced this issue Jun 15, 2015

@Slava Slava closed this in 7c729b9 Jul 16, 2015

@patmoore

This comment has been minimized.

Contributor

patmoore commented Jul 16, 2015

@MiroHibler Would preloader work to provide a print only css?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment