-
Notifications
You must be signed in to change notification settings - Fork 113
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
Fix for styles rendering in IE9 #2817
Conversation
@sebworks w/ node 6.10.0 (npm 3.10.10) I also get a shrinkwrap error but for unknown reasons it works if I run
Seems related to npm/npm#9703. |
thanks @contolini, that worked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job figuring out the fix for this mysterious bug! Some serious sleuthing.
<!--[if gt IE 8]><!--> <link rel="stylesheet" href="{{ static('css/main.css') }}"> <!--<![endif]--> | ||
<!--[if lt IE 9]><link rel="stylesheet" href="{{ static('css/main.ie8.css') }}"><![endif]--> | ||
<!--[if IE 9]><link rel="stylesheet" href="{{ static('css/main.ie9.css') }}"><![endif]--> | ||
<!--[if gt IE 9]><!--><link rel="stylesheet" href="{{ static('css/main.css') }}"><!--<![endif]--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the <!-->
hack is necessary anymore. If you want to lose a good part of your day, read through h5bp/html5-boilerplate#1437 (I don't recommend it, though. It's fine to leave the hack.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@contolini, I will revisit this issue when I make an attempt at cleaning up base.html.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job figuring this out. While you were digging in there, was there anything obvious we can do to reduce the bloat? I'm hoping moving to CFv4 will help, but I'm not entirely sure.
The main issue is that we don't have per module / page CSS. This is an old issue #253 (comment). I've done some work on it but stopped. I'll look at it again. If you run the page audit tool in chrome, you will notice that 80% of the css is unused for most of the pages. We might get some small wins by elimination some of the styles which are unused or have been migrated to Capital Framework. Another thing to consider is using something like uncss. I know @anselmbradford had fooled around with it but discovered that a number of pages were breaking. There is a bit of added complexity given the use of Wagtail. |
We eliminated a small amount of unused css in v4 of Capital Framework, especially around layouts. I think those and the font mixins probably account for a good amount of our repetitive bloat. I know most of it is gzipped away, but it seems like the IE issue is the uncompressed size. I think we really need to look into removing duplicated code. It'd be slimmer to use a font class in the markup than have the same font family mixins used everywhere (I'm not advocating that solution, just a point). cc @Scotchester |
Due to CSS bloat ( extremely sad ), we have to split css files to avoid CSS limitations in IE9. http://mitchgavan.com/style-sheet-limitations-in-ie9/
http://cssstats.com/stats?url=http%3A%2F%2Fconsumerfinance.gov&ua=Browser%20Default
Changes
gulp-bless
and produce an IE9 specific version of the styelsheet.Testing
gulp build
.Screenshots
Notes
Todos
Checklist