{"action":"created","issue":{"url":"https://api.github.com/repos/addyosmani/critical/issues/106","labels_url":"https://api.github.com/repos/addyosmani/critical/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/addyosmani/critical/issues/106/comments","events_url":"https://api.github.com/repos/addyosmani/critical/issues/106/events","html_url":"https://github.com/addyosmani/critical/issues/106","id":113176059,"number":106,"title":"loadCSS style not honored in subdirectories","user":{"login":"yahreen","id":830370,"avatar_url":"https://avatars.githubusercontent.com/u/830370?v=3","gravatar_id":"","url":"https://api.github.com/users/yahreen","html_url":"https://github.com/yahreen","followers_url":"https://api.github.com/users/yahreen/followers","following_url":"https://api.github.com/users/yahreen/following{/other_user}","gists_url":"https://api.github.com/users/yahreen/gists{/gist_id}","starred_url":"https://api.github.com/users/yahreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahreen/subscriptions","organizations_url":"https://api.github.com/users/yahreen/orgs","repos_url":"https://api.github.com/users/yahreen/repos","events_url":"https://api.github.com/users/yahreen/events{/privacy}","received_events_url":"https://api.github.com/users/yahreen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-24T18:28:49Z","updated_at":"2015-11-02T04:46:35Z","closed_at":null,"body":"Here is my Grunt task:\r\n\r\n```\r\ntest: {\r\n    options: {\r\n      base: '<%= buildDir %>',\r\n      css: [\r\n        '<%= buildDir %>assets/css/main.min.css'\r\n      ],\r\n      width: 320,\r\n      height: 480,\r\n      inline: true,\r\n      minify: true\r\n    },\r\n    pathPrefix: '<%= buildDir %>',\r\n    src: '<%= buildDir %>**/*.html',\r\n    dest: '<%= buildDir %>'\r\n  }\r\n};\r\n```\r\n\r\nWhich outouts the following on my homepage `mysite.com/` and works as intended:\r\n\r\n```\r\n<style type=\"text/css\">\r\nhtml{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;overflow-y:scroll}footer,header,main,nav{display:block}a{background-color:transparent;color:#fff;text-decoration:none}button{font:inherit;overflow:visible;text-transform:none;-webkit-appearance:button;cursor:pointer;background:0 0;border:none}.header-nav__item,h3,h4{font-family:Replica-Bold,Helvetica,Roboto,Arial,sans-serif;text-transform:uppercase}button::-moz-focus-inner{border:0;padding:0}button,h3,h4,li,ul{padding:0;margin:0}li{list-style:none}button,html{color:#222}body{margin:0;font-size:1em;line-height:1.4;background-color:#fff}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.header,.main{position:relative}body.is-framed,html{height:100%}body.is-framed .main{height:calc(100vh - 75pt);min-height:calc(100vh - 75pt)}@media (min-width:850px){body.is-framed{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}body.is-framed .main{height:88vh;min-height:88vh}}.main{z-index:4;background-color:#e93e80;padding:20px;min-height:calc(100vh - 50px)}@media (min-width:600px){.main{padding:40px}}@media (min-width:850px){.main{padding:5pc;z-index:88;min-height:calc(100vh - (8vh + 20px + 1.5em))}}@media (min-width:1130px){.main{padding:95px}}@media (min-width:1400px){.main{padding:95px}}@font-face{font-family:Replica-Bold;src:url(/assets/fonts/replica/replica-pro-bold.eot);src:url(/assets/fonts/replica/replica-pro-bold.eot?#iefix)format(\"embedded-opentype\"),url(/assets/fonts/replica/replica-pro-bold.woff2)format(\"woff2\"),url(/assets/fonts/replica/replica-pro-bold.woff)format(\"woff\"),url(/assets/fonts/replica/replica-pro-bold.ttf)format(\"truetype\")}h3,h4{color:#e93e80;line-height:1em;font-size:1pc;font-size:1rem;font-weight:400;font-style:normal}\r\n</style>\r\n<script>\r\n(function(u){function loadCSS(e,t,n){\"use strict\";function r(){for(var t,i=0;i<d.length;i++)d[i].href&&d[i].href.indexOf(e)>-1&&(t=!0);t?o.media=n||\"all\":setTimeout(r)}var o=window.document.createElement(\"link\"),i=t||window.document.getElementsByTagName(\"script\")[0],d=window.document.styleSheets;return o.rel=\"stylesheet\",o.href=e,o.media=\"only x\",i.parentNode.insertBefore(o,i),r(),o}for(var i in u){loadCSS(u[i]);}}(['assets/css/main.min.css']));\r\n</script>\r\n<noscript>\r\n<link href=\"assets/css/main.min.css\" rel=\"stylesheet\" type=\"text/css\">\r\n</noscript>\r\n```\r\n\r\nHowever, on a subdirectory such as `mysite.com/clients/`, the following is output:\r\n\r\n```\r\n<style type=\"text/css\">\r\nh3,h4,label,select{font-size:1pc}footer,header,label,main,nav,section{display:block}a,label{color:#fff}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;overflow-y:scroll}a{background-color:transparent;text-decoration:none}button,select{color:inherit;font:inherit;margin:0;text-transform:none}.filter__content-item,.header-nav__item,h3,h4,label,select{font-family:Replica-Bold,Helvetica,Roboto,Arial,sans-serif;text-transform:uppercase}button{overflow:visible;-webkit-appearance:button;cursor:pointer;background:0 0;border:none}button::-moz-focus-inner{border:0;padding:0}button,h3,h4,li,ul{padding:0;margin:0}li{list-style:none}button,html,select{color:#222}h3,h4,select{color:#e93e80}body{margin:0;font-size:1em;line-height:1.4;background-color:#fff}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.header,.main{position:relative}html{height:100%}.main{z-index:4;background-color:#e93e80;padding:20px;min-height:calc(100vh - 50px)}@media (min-width:600px){.main{padding:40px}}@media (min-width:850px){.main{padding:5pc;z-index:88;min-height:calc(100vh - (8vh + 20px + 1.5em))}}@media (min-width:1130px){.main{padding:95px}}@media (min-width:1400px){.main{padding:95px}}@font-face{font-family:Replica-Bold;src:url(/assets/fonts/replica/replica-pro-bold.eot);src:url(/assets/fonts/replica/replica-pro-bold.eot?#iefix)format(\"embedded-opentype\"),url(/assets/fonts/replica/replica-pro-bold.woff2)format(\"woff2\"),url(/assets/fonts/replica/replica-pro-bold.woff)format(\"woff\"),url(/assets/fonts/replica/replica-pro-bold.ttf)format(\"truetype\")}\r\n</style>\r\n<script>\r\n(function(u){function loadCSS(e,t,n){\"use strict\";function r(){for(var t,i=0;i<d.length;i++)d[i].href&&d[i].href.indexOf(e)>-1&&(t=!0);t?o.media=n||\"all\":setTimeout(r)}var o=window.document.createElement(\"link\"),i=t||window.document.getElementsByTagName(\"script\")[0],d=window.document.styleSheets;return o.rel=\"stylesheet\",o.href=e,o.media=\"only x\",i.parentNode.insertBefore(o,i),r(),o}for(var i in u){loadCSS(u[i]);}}(['../assets/css/main.min.css']));\r\n</script>\r\n<noscript>\r\n<link href=\"../assets/css/main.min.css\" rel=\"stylesheet\" type=\"text/css\">\r\n</noscript>\r\n```\r\n\r\nThe styles in `main.min.css` that have not been inlined are not honored on the page including `:hover`, etc.\r\n\r\n`main.min.css` loads fine and no errors are reported."},"comment":{"url":"https://api.github.com/repos/addyosmani/critical/issues/comments/152911439","html_url":"https://github.com/addyosmani/critical/issues/106#issuecomment-152911439","issue_url":"https://api.github.com/repos/addyosmani/critical/issues/106","id":152911439,"user":{"login":"bezoerb","id":1697800,"avatar_url":"https://avatars.githubusercontent.com/u/1697800?v=3","gravatar_id":"","url":"https://api.github.com/users/bezoerb","html_url":"https://github.com/bezoerb","followers_url":"https://api.github.com/users/bezoerb/followers","following_url":"https://api.github.com/users/bezoerb/following{/other_user}","gists_url":"https://api.github.com/users/bezoerb/gists{/gist_id}","starred_url":"https://api.github.com/users/bezoerb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bezoerb/subscriptions","organizations_url":"https://api.github.com/users/bezoerb/orgs","repos_url":"https://api.github.com/users/bezoerb/repos","events_url":"https://api.github.com/users/bezoerb/events{/privacy}","received_events_url":"https://api.github.com/users/bezoerb/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T04:46:35Z","updated_at":"2015-11-02T04:46:35Z","body":"@yahreen i can't see anything unusual in the provided output. Is there another stylesheet loaded after main.min.css? can you provide a link to your page or a gist with the `<head>` section?"}}