{"action":"created","issue":{"url":"https://api.github.com/repos/canjs/canjs/issues/2469","repository_url":"https://api.github.com/repos/canjs/canjs","labels_url":"https://api.github.com/repos/canjs/canjs/issues/2469/labels{/name}","comments_url":"https://api.github.com/repos/canjs/canjs/issues/2469/comments","events_url":"https://api.github.com/repos/canjs/canjs/issues/2469/events","html_url":"https://github.com/canjs/canjs/issues/2469","id":174757077,"number":2469,"title":"can-import self closing tag on css/less","user":{"login":"MarcGodard","id":5016637,"avatar_url":"https://avatars.githubusercontent.com/u/5016637?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcGodard","html_url":"https://github.com/MarcGodard","followers_url":"https://api.github.com/users/MarcGodard/followers","following_url":"https://api.github.com/users/MarcGodard/following{/other_user}","gists_url":"https://api.github.com/users/MarcGodard/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcGodard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcGodard/subscriptions","organizations_url":"https://api.github.com/users/MarcGodard/orgs","repos_url":"https://api.github.com/users/MarcGodard/repos","events_url":"https://api.github.com/users/MarcGodard/events{/privacy}","received_events_url":"https://api.github.com/users/MarcGodard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2016-09-02T13:14:59Z","updated_at":"2016-09-07T01:24:33Z","closed_at":"2016-09-05T20:14:57Z","body":"A self-closing tag should be accepted for css/less\r\n\r\n```\r\n<can-import from=\"somfile.less!\"></can-import>\r\n```\r\nto\r\n```\r\n<can-import from=\"somfile.less!\"/>\r\n```\r\n\r\nThere will never be content.\r\n\r\nCurrently if you do this:\r\n```\r\n{{#if xyz}}\r\n<can-import from=\"somfile.less!\"/>\r\n{{/if}}\r\n```\r\n\r\nThe css/less file is loaded even when ```xyz``` is false, unless you don't use a self closing tag."},"comment":{"url":"https://api.github.com/repos/canjs/canjs/issues/comments/245147442","html_url":"https://github.com/canjs/canjs/issues/2469#issuecomment-245147442","issue_url":"https://api.github.com/repos/canjs/canjs/issues/2469","id":245147442,"user":{"login":"matthewp","id":361671,"avatar_url":"https://avatars.githubusercontent.com/u/361671?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewp","html_url":"https://github.com/matthewp","followers_url":"https://api.github.com/users/matthewp/followers","following_url":"https://api.github.com/users/matthewp/following{/other_user}","gists_url":"https://api.github.com/users/matthewp/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewp/subscriptions","organizations_url":"https://api.github.com/users/matthewp/orgs","repos_url":"https://api.github.com/users/matthewp/repos","events_url":"https://api.github.com/users/matthewp/events{/privacy}","received_events_url":"https://api.github.com/users/matthewp/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T01:24:33Z","updated_at":"2016-09-07T01:24:33Z","body":"@justinbmeyer \r\n\r\n> @matthewp I'm confused why we can't make dynamic <can-import></can-import> of styles able to remove the stylesheet when the element is removed?\r\n\r\nWe might be able to, but I was answering the larger point about this issue which removing the stylesheet doesn't solve, and the problems that have prompted https://github.com/stealjs/steal-css/issues/16, and https://github.com/stealjs/steal-bundler and https://github.com/donejs/done-component, etc.\r\n\r\nTo your point though, I'm not sure how to do this without special casing CSS. \r\n\r\nRoughly speaking, any dynamic can-import translates into:\r\n\r\n```js\r\nvar from = el.getAttribute('from');\r\nSystem.import(from);\r\n```\r\n\r\nI'm not sure what removal is supposed to trigger? Let's say it did this:\r\n\r\n```js\r\nSystem.delete(from);\r\n```\r\n\r\nAnd somehow steal-css was able to know about this through a hook (that doesn't exist at the moment), you wouldn't want this anyways in the case of JavaScript imports which also happen within conditionals.\r\n\r\nSo, I don't think the use-case fits well into any existing Steal lifecycle hooks.\r\n\r\n> `<can-import>`'s behavior, imo, should be relatively divorced from steal's behavior. It's a layer that uses steal, but it's steal itself. It can have it's own behaviors and abilities.\r\n\r\nI'm not sure what this is referencing, did something I said make you think that I want Steal to be aware of can-import?  If so that wasn't my intent.\r\n\r\nWhat I was saying is that can-import is not a great fit for CSS because of the reasons I outlined above, and how normal `<link>` solves both problems outlined here but isn't useable in this context because steal-tools can't trace page dependencies."}}
{"actor":{"display_login":"matthewp"}}