{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/polymer/issues/3364","repository_url":"https://api.github.com/repos/Polymer/polymer","labels_url":"https://api.github.com/repos/Polymer/polymer/issues/3364/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/polymer/issues/3364/comments","events_url":"https://api.github.com/repos/Polymer/polymer/issues/3364/events","html_url":"https://github.com/Polymer/polymer/issues/3364","id":131149273,"number":3364,"title":"<template> doesn't bind to class attribute in Shady DOM","user":{"login":"Saulis","id":1039468,"avatar_url":"https://avatars.githubusercontent.com/u/1039468?v=3","gravatar_id":"","url":"https://api.github.com/users/Saulis","html_url":"https://github.com/Saulis","followers_url":"https://api.github.com/users/Saulis/followers","following_url":"https://api.github.com/users/Saulis/following{/other_user}","gists_url":"https://api.github.com/users/Saulis/gists{/gist_id}","starred_url":"https://api.github.com/users/Saulis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Saulis/subscriptions","organizations_url":"https://api.github.com/users/Saulis/orgs","repos_url":"https://api.github.com/users/Saulis/repos","events_url":"https://api.github.com/users/Saulis/events{/privacy}","received_events_url":"https://api.github.com/users/Saulis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Polymer/polymer/labels/css","name":"css","color":"fbca04"},{"url":"https://api.github.com/repos/Polymer/polymer/labels/needs%20investigation","name":"needs investigation","color":"fef2c0"},{"url":"https://api.github.com/repos/Polymer/polymer/labels/p1","name":"p1","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-03T20:53:13Z","updated_at":"2016-02-12T22:41:16Z","closed_at":null,"body":"Hi!\r\n\r\nIt seems that when a `<template>` is used without a parent scope, binding a value to `class` attribute doesn't work correctly in Shady DOM. Based on my testing, also the Shadow DOM polyfill works incorrectly. Native Shadow DOM on Chrome **works** perfectly.\r\n\r\nAs an example,\r\n\r\n````html\r\n<body>\r\n  <template is=\"dom-repeat\" items='[\"foo\", \"bar\"]'>\r\n    <div class$=[[item]] clazz$=\"[[item]]\">[[item]]</div>\r\n  </template>\r\n</body>\r\n````\r\n\r\nactually renders:\r\n\r\n````html\r\n<div clazz=\"foo\">foo</div>\r\n<div clazz=\"bar\">bar</div>\r\n````\r\n\r\nWhile as:\r\n\r\n````html\r\n<body>\r\n  <template is=\"dom-bind\">\r\n    <template is=\"dom-repeat\" items='[\"foo\", \"bar\"]'>\r\n      <div class$=[[item]] clazz$=\"[[item]]\">[[item]]</div>\r\n    </template>\r\n  </template>\r\n</body>\r\n```` \r\n\r\nrenders correctly:\r\n\r\n````html\r\n<div class=\"foo\" clazz=\"foo\">foo</div>\r\n<div class=\"bar\" clazz=\"bar\">bar</div>\r\n````\r\n\r\nSimilarly, any component using templates like `iron-list` fails to render the `class` attribute correctly if it not nested under another component or `dom-bind`:\r\n\r\n````html\r\n<body>\r\n  <iron-list items='[\"foo\", \"bar\"]'>\r\n    <template>\r\n      <div class$=[[item]] clazz$=\"[[item]]\">[[item]]</div>\r\n    </template>\r\n  </iron-list>\r\n</body>\r\n````\r\n\r\nI've created a simple jsbin here: http://jsbin.com/mayexiditu/edit?html,output\r\n\r\nTested on Chrome 47, Polymer v1.2.4. (and also v1.0.0, v1.1.0, v1.2.0)\r\n\r\nI can manage using a `dom-bind` as a workaround, but any help would be highly appreciated!\r\n\r\np.s. might be related with #2434. "},"comment":{"url":"https://api.github.com/repos/Polymer/polymer/issues/comments/183514845","html_url":"https://github.com/Polymer/polymer/issues/3364#issuecomment-183514845","issue_url":"https://api.github.com/repos/Polymer/polymer/issues/3364","id":183514845,"user":{"login":"TimvdLippe","id":5948271,"avatar_url":"https://avatars.githubusercontent.com/u/5948271?v=3","gravatar_id":"","url":"https://api.github.com/users/TimvdLippe","html_url":"https://github.com/TimvdLippe","followers_url":"https://api.github.com/users/TimvdLippe/followers","following_url":"https://api.github.com/users/TimvdLippe/following{/other_user}","gists_url":"https://api.github.com/users/TimvdLippe/gists{/gist_id}","starred_url":"https://api.github.com/users/TimvdLippe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimvdLippe/subscriptions","organizations_url":"https://api.github.com/users/TimvdLippe/orgs","repos_url":"https://api.github.com/users/TimvdLippe/repos","events_url":"https://api.github.com/users/TimvdLippe/events{/privacy}","received_events_url":"https://api.github.com/users/TimvdLippe/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T22:41:16Z","updated_at":"2016-02-12T22:41:16Z","body":"I can investigate this issue tomorrow"}}