{"id":325,"date":"2010-01-19T18:58:24","date_gmt":"2010-01-19T16:58:24","guid":{"rendered":"http:\/\/www.gatellier.be\/blog\/?p=325"},"modified":"2010-01-19T18:58:24","modified_gmt":"2010-01-19T16:58:24","slug":"bug-ie-rendu-css-drupal","status":"publish","type":"post","link":"https:\/\/gatellier.be\/blog\/bug-ie-rendu-css-drupal\/","title":{"rendered":"Bug: IE n&#8217;affiche pas mes CSS"},"content":{"rendered":"<p>Un <a href=\"\/\/support.microsoft.com\/kb\/262161\" hreflang=\"en\">magnifique bug<\/a> (parmi de nombreux autres) existe dans Internet Explorer (IE6, IE7, IE8).<\/p>\n<p>IE6, IE7, IE8 ne supportent pas plus de 31 fichiers <abbr title=\"Cascading StyleSheet\" lang=\"en\">CSS<\/abbr> li\u00e9s dans une page html (que se soit par tag <code>&lt;link rel=\"stylesheet\" ...&gt;<\/code> ou CSS <code>@import<\/code>).<\/p>\n<p>Toutes les <strong>CSS venant apr\u00e8s la 31\u00e8me seront simplement ignor\u00e9es<\/strong>&nbsp;!<\/p>\n<p>Ok, \u00e7a n&#8217;est pas id\u00e9al, d&#8217;un point de vue performance, de splitter ses CSS mais des fois nous n&#8217;avons pas le choix. (Ex&nbsp;: D\u00e9veloppement Drupal avec quelques modules rajoutant chacun sa propre CSS).<\/p>\n<h3>La solution pour Drupal&nbsp;:<\/h3>\n<p>Un module existe (il ne loade pas de CSS propre)&nbsp;: <strong><a href=\"\/\/drupal.org\/project\/ie_css_optimizer\">IE CSS Optimizer<\/a><\/strong> concat\u00e8ne les CSS trouv\u00e9es dans les r\u00e9pertoires <code>\/modules\/<\/code> d&#8217;un projet Drupal une fois configur\u00e9 et activ\u00e9.<\/p>\n<h3>Et si je n&#8217;emploie pas Drupal&nbsp;?&nbsp;:<\/h3>\n<p>Comme Microsoft le sugg\u00e8re <small>[<a href=\"\/blog\/bug-ie-rendu-css-drupal\/#ft-note-drupa-perf-01\">1<\/a>]<\/small>&nbsp;:<\/p>\n<p><cite lang=\"en\">To work around this limitation, combine multiple classes into a single style tag.<\/cite><\/p>\n<p><cite>Pour contourner cette limitation, combinez les diff\u00e9rentes classes dans un seul tag style.<\/cite><\/p>\n<p>Le plus simple est de v\u00e9rifier si les CSS li\u00e9es sont vraiment n\u00e9cessaires et en supprimer si besoin. D&#8217;autres solutions de concat\u00e9nation existent (voir la <a href=\"\/\/code.google.com\/p\/minify\/\" hreflang=\"en\">librairie Minify<\/a>) <\/p>\n<h4>Liens relatifs&nbsp;:<\/h4>\n<ul>\n<li><a href=\"\/\/john.albin.net\/ie-css-limits\/link-test.html\" hreflang=\"en\">Testcase des diff\u00e9rentes solutions envisageables<\/a><\/li>\n<li><a href=\"\/\/drupal.org\/project\/ie_css_optimizer\" hreflang=\"en\">Drupal IE CSS Optimizer Module<\/a><\/li>\n<li>via <a href=\"\/\/john.albin.net\/css\/ie-stylesheets-not-loading\" hreflang=\"en\">John Albin<\/a><\/li>\n<li><small>[1]<\/small>&nbsp;: <a href=\"\/\/support.microsoft.com\/kb\/262161\" hreflang=\"en\" id=\"ft-note-drupa-perf-01\">R\u00e9solution propos\u00e9e par Microsoft<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>IE6, IE7, IE8 ne supportent pas la gestion de plus de 31 CSS dans une page web&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[87,34,63,51,113,119],"tags":[157,160,173,158,92,155,156,124,159,186],"class_list":["post-325","post","type-post","status-publish","format-standard","hentry","category-browsers","category-css","category-debogage","category-html","category-internet-explorer","category-performances","tag-bug","tag-concatenate","tag-css","tag-drupal","tag-ie","tag-ie6","tag-ie7","tag-ie8","tag-minify","tag-performances"],"_links":{"self":[{"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/posts\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/comments?post=325"}],"version-history":[{"count":0,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/posts\/325\/revisions"}],"wp:attachment":[{"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/media?parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/categories?post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/tags?post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}