{"action":"created","issue":{"url":"https://api.github.com/repos/sass/sass/issues/1094","labels_url":"https://api.github.com/repos/sass/sass/issues/1094/labels{/name}","comments_url":"https://api.github.com/repos/sass/sass/issues/1094/comments","events_url":"https://api.github.com/repos/sass/sass/issues/1094/events","html_url":"https://github.com/sass/sass/issues/1094","id":26572897,"number":1094,"title":"@import v2 wishlist compilation","user":{"login":"JulienCabanes","id":3443052,"avatar_url":"https://avatars.githubusercontent.com/u/3443052?v=3","gravatar_id":"","url":"https://api.github.com/users/JulienCabanes","html_url":"https://github.com/JulienCabanes","followers_url":"https://api.github.com/users/JulienCabanes/followers","following_url":"https://api.github.com/users/JulienCabanes/following{/other_user}","gists_url":"https://api.github.com/users/JulienCabanes/gists{/gist_id}","starred_url":"https://api.github.com/users/JulienCabanes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JulienCabanes/subscriptions","organizations_url":"https://api.github.com/users/JulienCabanes/orgs","repos_url":"https://api.github.com/users/JulienCabanes/repos","events_url":"https://api.github.com/users/JulienCabanes/events{/privacy}","received_events_url":"https://api.github.com/users/JulienCabanes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sass/sass/labels/@import%20v2","name":"@import v2","color":"DDDDDD"},{"url":"https://api.github.com/repos/sass/sass/labels/Feature","name":"Feature","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":50,"created_at":"2014-01-30T03:32:02Z","updated_at":"2015-11-05T06:27:51Z","closed_at":null,"body":"This is a compilation of issues and wishes about @import\r\n\r\n### Import CSS files #556\r\n\r\n```scss\r\n@import \"normalize\";\r\n```\r\n\r\nWould import sass, scss or **css** file\r\n> There's a [plugin](https://github.com/chriseppstein/sass-css-importer) for that\r\n\r\n\r\n### Import Once #139\r\n\r\n```scss\r\n@import-once \"foo\";\r\n@import \"foo\" !once;\r\n@depend \"foo\";\r\n```\r\n\r\nMultiple syntax suggestions for one time import\r\n> There is a [plugin](https://github.com/chriseppstein/compass/tree/master/import-once) for that\r\n\r\n\r\n### Import Directory #690\r\n\r\n```@import \"foo\";```\r\n\r\nIf \"foo\" is a folder than it tries to import \"foo/_module.scss\"\r\n> reasonable\r\n\r\n### Namespaces and Aliases #353\r\n\r\n```scss\r\n@import \"foo\" as \"bar\";\r\n```\r\n\r\nThis would put every \"foo\" components (mixins, vars, placeholders...) in a \"bar\" package.\r\n\r\nWhat would be the separator ? ```.``` or ```/``` or ```\\``` or ```::``` ?\r\nWhere would go the ```$``` and ```%``` ? Before or after the namespace ?\r\nWhat it would look like :\r\n\r\n```scss\r\n// Mixins\r\n@include bar.baz();\r\nor\r\n@include bar/baz();\r\n\r\n// Variables\r\ncolor: $bar.baz;\r\nor\r\ncolor: bar.$baz;\r\nor\r\ncolor: $bar/baz;\r\nor\r\ncolor: bar/$baz;\r\n\r\n// Placeholders\r\ndiv { @extend %bar.baz; }\r\nor\r\ndiv { @extend bar.%baz; }\r\nor\r\ndiv { @extend %bar/baz; }\r\nor\r\ndiv { @extend bar/%baz; }\r\n\r\n// Functions\r\ncolor: bar.baz();\r\nor\r\ncolor: bar/baz();\r\n```\r\n\r\n\r\n### Non-transitive imports [#353](https://github.com/nex3/sass/issues/353#issuecomment-5146513)\r\n\r\n> if A imports B and B imports C, A shouldn't necessarily see everything from C.\r\n> A way of getting around non-transitive imports.\r\n\r\n\r\n### Renaming classes [#353](https://github.com/nex3/sass/issues/353#issuecomment-5146513)\r\n\r\n> This isn't something I'm 100% sold on, but it has been requested. Maybe the correct way to do this is some combination of namespacing and @extend.\r\n\r\n### Disabling CSS output [#353](https://github.com/nex3/sass/issues/353#issuecomment-5146513)\r\n\r\n> Both selectively and wholesale. The importer may want to @extend the rules in the importee but not have them concretely present, or it may want to suppress rules matching a certain selector.\r\n\r\nThis is also related to #320 :\r\n```scss\r\n// A.scss\r\n.foo {...}\r\n.bar {...}\r\n\r\n// B.scss\r\n@use \"A\";\r\n.baz { @extend .foo; }\r\n```\r\n\r\nB output would not contain ```.foo``` & ```.bar``` definition but only ```.baz```;\r\n\r\n### Conditional imports #451\r\n\r\n```scss\r\n@if true {\r\n\t@import \"foo\";\r\n}\r\n```\r\n\r\nIt \"worked\" before but never intended.\r\n\r\n### Paths\r\n\r\nA way to setup shortcut paths (like [Require.js](https://github.com/jrburke/r.js/blob/master/build/example.build.js#L46-L49)) \r\n\r\n```scss\r\n// No syntax intended, only the purpose\r\n@paths (\r\n\t\"bootstrap\": \"../components/bootstrap-sass/vendor/assets/stylesheets/bootstrap\"\r\n);\r\n\r\n@import \"bootstrap\";\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/sass/sass/issues/comments/153968239","html_url":"https://github.com/sass/sass/issues/1094#issuecomment-153968239","issue_url":"https://api.github.com/repos/sass/sass/issues/1094","id":153968239,"user":{"login":"amster","id":129252,"avatar_url":"https://avatars.githubusercontent.com/u/129252?v=3","gravatar_id":"","url":"https://api.github.com/users/amster","html_url":"https://github.com/amster","followers_url":"https://api.github.com/users/amster/followers","following_url":"https://api.github.com/users/amster/following{/other_user}","gists_url":"https://api.github.com/users/amster/gists{/gist_id}","starred_url":"https://api.github.com/users/amster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amster/subscriptions","organizations_url":"https://api.github.com/users/amster/orgs","repos_url":"https://api.github.com/users/amster/repos","events_url":"https://api.github.com/users/amster/events{/privacy}","received_events_url":"https://api.github.com/users/amster/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T06:27:50Z","updated_at":"2015-11-05T06:27:50Z","body":"Hi, I thought I just saw @hcatlin present on the new `@use` to pull a file in such that\r\n\r\n    @use \"somefile\";\r\n    \r\n    .someclass {\r\n      color: $somefile.somevariable;\r\n    }\r\n\r\nI guess I find it it weird that `\"somefile\"` would turn into a variable of the same name. What if the filename has characters in it that can't turn into a variable name? Might it be clearer to extend the `@import` syntax to explicitly tell the reader what variable to use?\r\n\r\n    @import \"somefile\" as $somefile;\r\n    .someclass { color: $somefile.somevariable; }\r\n    \r\n    // or\r\n    \r\n    @import \"somefile\" as $globals-in-a-file;\r\n    .someclass { color: $globals-in-a-file.somevariable; }\r\n"}}