{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/framework/issues/234","labels_url":"https://api.github.com/repos/aurelia/framework/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/framework/issues/234/comments","events_url":"https://api.github.com/repos/aurelia/framework/issues/234/events","html_url":"https://github.com/aurelia/framework/issues/234","id":113610333,"number":234,"title":"require css as scoped not working","user":{"login":"genadis","id":6747147,"avatar_url":"https://avatars.githubusercontent.com/u/6747147?v=3","gravatar_id":"","url":"https://api.github.com/users/genadis","html_url":"https://github.com/genadis","followers_url":"https://api.github.com/users/genadis/followers","following_url":"https://api.github.com/users/genadis/following{/other_user}","gists_url":"https://api.github.com/users/genadis/gists{/gist_id}","starred_url":"https://api.github.com/users/genadis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genadis/subscriptions","organizations_url":"https://api.github.com/users/genadis/orgs","repos_url":"https://api.github.com/users/genadis/repos","events_url":"https://api.github.com/users/genadis/events{/privacy}","received_events_url":"https://api.github.com/users/genadis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-27T15:24:50Z","updated_at":"2015-10-28T16:49:34Z","closed_at":"2015-10-28T00:08:48Z","body":"tried to test\r\n```\r\n<require from=\"my-view.css\" as=\"scoped\"></require>\r\n```\r\nas mentioned in [#50](https://github.com/aurelia/framework/issues/50) and [early-september-release-notes](http://blog.durandal.io/2015/09/05/aurelia-early-september-release-notes/)\r\n\r\ntested with skeleton-navigation, welcome.html\r\nTried with ```@useShadowDom()``` on ```welcome.js``` and without.\r\n\r\nExpected to see the ```<style>``` with ```scoped``` attribute.\r\nWith ShadowDom decoration, ```<style>``` is added under ```<router-view>```.\r\nWithout ShadowDom ```<style>``` is added in the header.\r\n\r\n##### In both cases though, no ```scoped``` attribute.\r\n\r\nMy [Fork](https://github.com/genadis/skeleton-navigation) contains the test.\r\n\r\nPlease advise, what am I missing?\r\n\r\nUsing Chrome and latest skeleton-navigation.\r\n\r\n#### About the test\r\nIn index.html I'm loading css. with one color set.\r\nadding element(button) to nav-bar that uses the styling.\r\n\r\nin welcome.html loading another css using scoped require with same classes but second color set.\r\nadding element to welcome that uses the styling.\r\n\r\nExpecting the element  in nav-bar to have color from first color set, and in welcome to have color from second set.\r\n\r\nResult: after load both elements have same second color set. "},"comment":{"url":"https://api.github.com/repos/aurelia/framework/issues/comments/151906802","html_url":"https://github.com/aurelia/framework/issues/234#issuecomment-151906802","issue_url":"https://api.github.com/repos/aurelia/framework/issues/234","id":151906802,"user":{"login":"EisenbergEffect","id":131485,"avatar_url":"https://avatars.githubusercontent.com/u/131485?v=3","gravatar_id":"","url":"https://api.github.com/users/EisenbergEffect","html_url":"https://github.com/EisenbergEffect","followers_url":"https://api.github.com/users/EisenbergEffect/followers","following_url":"https://api.github.com/users/EisenbergEffect/following{/other_user}","gists_url":"https://api.github.com/users/EisenbergEffect/gists{/gist_id}","starred_url":"https://api.github.com/users/EisenbergEffect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EisenbergEffect/subscriptions","organizations_url":"https://api.github.com/users/EisenbergEffect/orgs","repos_url":"https://api.github.com/users/EisenbergEffect/repos","events_url":"https://api.github.com/users/EisenbergEffect/events{/privacy}","received_events_url":"https://api.github.com/users/EisenbergEffect/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T16:49:33Z","updated_at":"2015-10-28T16:49:33Z","body":"I'm not sure it makes sense to add a scoped attribute when the styles are\nin the shadow dom, since that scopes them automatically. I don't know of a\nsure fire way to pollyfill this. Recommendations are welcome.\n\nOn Wed, Oct 28, 2015 at 9:10 AM, Genadi <notifications@github.com> wrote:\n\n> Thank you for the detailed answer.\n> Indeed in Firefox scoped attribute is added and style is placed under the\n> correct element.\n>\n> I understand the compatibility issues, but it would be great if the\n> behavior of aurelia would be consistent across browsers, so if a developer\n> decides to use polyfilling or some other solution such as jQuery plugin\n> <https://github.com/thingsinjars/jQuery-Scoped-CSS-plugin> he would have\n> the option to do so.\n>\n> Currently for Chrome, IE, etc, the style is added to header (for non\n> shadowDOM) and no scoped attribute is added.\n> For shadowDOM the style tag is added in the right element, but again no\n> scoped attribute.\n> For Firefox the style tag is always in the right place and scoped is\n> added.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/aurelia/framework/issues/234#issuecomment-151895555>.\n>\n\n\n\n-- \nRob Eisenberg,\nPresident - Blue Spire\naurelia.io\n"}}