{"action":"created","issue":{"url":"https://api.github.com/repos/sass/libsass/issues/2291","repository_url":"https://api.github.com/repos/sass/libsass","labels_url":"https://api.github.com/repos/sass/libsass/issues/2291/labels{/name}","comments_url":"https://api.github.com/repos/sass/libsass/issues/2291/comments","events_url":"https://api.github.com/repos/sass/libsass/issues/2291/events","html_url":"https://github.com/sass/libsass/issues/2291","id":199869091,"number":2291,"title":"Interpolated parent selectors don't nest properly if parent is a list","user":{"login":"schmod","id":1102667,"avatar_url":"https://avatars.githubusercontent.com/u/1102667?v=3","gravatar_id":"","url":"https://api.github.com/users/schmod","html_url":"https://github.com/schmod","followers_url":"https://api.github.com/users/schmod/followers","following_url":"https://api.github.com/users/schmod/following{/other_user}","gists_url":"https://api.github.com/users/schmod/gists{/gist_id}","starred_url":"https://api.github.com/users/schmod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmod/subscriptions","organizations_url":"https://api.github.com/users/schmod/orgs","repos_url":"https://api.github.com/users/schmod/repos","events_url":"https://api.github.com/users/schmod/events{/privacy}","received_events_url":"https://api.github.com/users/schmod/received_events","type":"User","site_admin":false},"labels":[{"id":44453756,"url":"https://api.github.com/repos/sass/libsass/labels/Bug%20-%20Confirmed","name":"Bug - Confirmed","color":"e11d21","default":false},{"id":134842407,"url":"https://api.github.com/repos/sass/libsass/labels/Dev%20-%20Test%20Written","name":"Dev - Test Written","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":{"login":"mgreter","id":282293,"avatar_url":"https://avatars.githubusercontent.com/u/282293?v=3","gravatar_id":"","url":"https://api.github.com/users/mgreter","html_url":"https://github.com/mgreter","followers_url":"https://api.github.com/users/mgreter/followers","following_url":"https://api.github.com/users/mgreter/following{/other_user}","gists_url":"https://api.github.com/users/mgreter/gists{/gist_id}","starred_url":"https://api.github.com/users/mgreter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgreter/subscriptions","organizations_url":"https://api.github.com/users/mgreter/orgs","repos_url":"https://api.github.com/users/mgreter/repos","events_url":"https://api.github.com/users/mgreter/events{/privacy}","received_events_url":"https://api.github.com/users/mgreter/received_events","type":"User","site_admin":false},"assignees":[{"login":"mgreter","id":282293,"avatar_url":"https://avatars.githubusercontent.com/u/282293?v=3","gravatar_id":"","url":"https://api.github.com/users/mgreter","html_url":"https://github.com/mgreter","followers_url":"https://api.github.com/users/mgreter/followers","following_url":"https://api.github.com/users/mgreter/following{/other_user}","gists_url":"https://api.github.com/users/mgreter/gists{/gist_id}","starred_url":"https://api.github.com/users/mgreter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgreter/subscriptions","organizations_url":"https://api.github.com/users/mgreter/orgs","repos_url":"https://api.github.com/users/mgreter/repos","events_url":"https://api.github.com/users/mgreter/events{/privacy}","received_events_url":"https://api.github.com/users/mgreter/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-01-10T16:31:46Z","updated_at":"2017-01-11T01:37:52Z","closed_at":null,"body":"I would expect to be able to use interpolation to achieve the same results as [`&-suffix`](https://github.com/sass/sass/issues/1055) by writing `#{&}-suffix`.  \r\n\r\nThis does not work correctly if the parent that `&` is referencing is a list of selectors.  In the output, `-suffix` is only appended to the final selector in the list.\r\n\r\n## input.scss\r\n```scss\r\n.a {\r\n  .b, .c, .d {\r\n    color: blue;        \r\n    #{&}-foo {\r\n      color: red;\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n## Expected\r\n```css\r\n.a .b, .a .c, .a .d {\r\n  color: blue; }\r\n  .a .b-foo, .a .c-foo, .a .d-foo {\r\n    color: red; }\r\n```\r\nThis is the output I'd get (and would expect to get) if I substitute `#{&}-foo` for `&-foo` in the above example.\r\n\r\n## libsass 3.4.3\r\n```css\r\n.a .b, .a .c, .a .d {\r\n  color: blue; }\r\n  .a .b, .a .c, .a .d-foo {\r\n    color: red; }\r\n```\r\nThe nested selector references `.a .b` and `.a .c` -- one would reasonably expect these to be `.a .b-foo` and `.a .c-foo` instead.\r\n\r\n## ruby sass 3.4.21\r\n```css\r\n.a .b, .a .c, .a .d {\r\n  color: blue;\r\n}\r\n.a .b .a .b, .a .b .a .c, .a .b .a .d-foo, .a .c .a .b, .a .c .a .c, .a .c .a .d-foo, .a .d .a .b, .a .d .a .c, .a .d .a .d-foo {\r\n  color: red;\r\n}\r\n```\r\nDifferent... and also seemingly wrong!  I think I can understand why there might be some sort of combinatoric expansion happening with the fully-qualified parent selector, but would expect to see `.b-foo`, and `.c-foo` somewhere in the output if that were actually the case.\r\n\r\n## version info:\r\n```cmd\r\n$ sassc --version\r\n\r\nsassc: 3.4.1\r\nlibsass: 3.4.3\r\nsass2scss: 1.1.0\r\nsass: 3.4\r\n```\r\n\r\n---\r\n\r\nUnless I'm understanding the documentation incorrectly, in the above examples, I'd (roughly) expect `&-suffix` to produce the same output as `#{&}-suffix`.  However, the output that I get with the interpolation syntax seems like it would be difficult to justify or explain under any set of circumstances.\r\n\r\nThis is obviously a contrived example, as there is already a perfectly-acceptable workaround.  However, the current behavior seems difficult to justify, differs substantially from Ruby Sass, and may be causing issues elsewhere (where similar workarounds are not available).\r\n\r\n[Sassmeister link](http://www.sassmeister.com/gist/9c40d650a4e55155fb651997ee52d9f9)\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40810845-interpolated-parent-selectors-don-t-nest-properly-if-parent-is-a-list?utm_campaign=plugin&utm_content=tracker%2F283068&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F283068&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/sass/libsass/issues/comments/271753183","html_url":"https://github.com/sass/libsass/issues/2291#issuecomment-271753183","issue_url":"https://api.github.com/repos/sass/libsass/issues/2291","id":271753183,"user":{"login":"mgreter","id":282293,"avatar_url":"https://avatars.githubusercontent.com/u/282293?v=3","gravatar_id":"","url":"https://api.github.com/users/mgreter","html_url":"https://github.com/mgreter","followers_url":"https://api.github.com/users/mgreter/followers","following_url":"https://api.github.com/users/mgreter/following{/other_user}","gists_url":"https://api.github.com/users/mgreter/gists{/gist_id}","starred_url":"https://api.github.com/users/mgreter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgreter/subscriptions","organizations_url":"https://api.github.com/users/mgreter/orgs","repos_url":"https://api.github.com/users/mgreter/repos","events_url":"https://api.github.com/users/mgreter/events{/privacy}","received_events_url":"https://api.github.com/users/mgreter/received_events","type":"User","site_admin":false},"created_at":"2017-01-11T01:37:52Z","updated_at":"2017-01-11T01:37:52Z","body":"Note that sassmeister for libsass 3.3.6 produces:\r\n```css\r\n.a .b, .a .c, .a .d {\r\n  color: blue;\r\n}\r\n\r\n.a .b, .a .c, .a .d-foo {\r\n  color: red;\r\n}\r\n```\r\n\r\nSo this does not seem to be a regression. Fix is comming up!"}}
{"actor":{"display_login":"mgreter"}}