{"action":"created","issue":{"url":"https://api.github.com/repos/sass/sass/issues/2312","repository_url":"https://api.github.com/repos/sass/sass","labels_url":"https://api.github.com/repos/sass/sass/issues/2312/labels{/name}","comments_url":"https://api.github.com/repos/sass/sass/issues/2312/comments","events_url":"https://api.github.com/repos/sass/sass/issues/2312/events","html_url":"https://github.com/sass/sass/issues/2312","id":235165503,"node_id":"MDU6SXNzdWUyMzUxNjU1MDM=","number":2312,"title":"@clone handle to copy/clone properties","user":{"login":"caneco","id":502041,"node_id":"MDQ6VXNlcjUwMjA0MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/502041?v=4","gravatar_id":"","url":"https://api.github.com/users/caneco","html_url":"https://github.com/caneco","followers_url":"https://api.github.com/users/caneco/followers","following_url":"https://api.github.com/users/caneco/following{/other_user}","gists_url":"https://api.github.com/users/caneco/gists{/gist_id}","starred_url":"https://api.github.com/users/caneco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caneco/subscriptions","organizations_url":"https://api.github.com/users/caneco/orgs","repos_url":"https://api.github.com/users/caneco/repos","events_url":"https://api.github.com/users/caneco/events{/privacy}","received_events_url":"https://api.github.com/users/caneco/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2017-06-12T08:59:47Z","updated_at":"2018-11-14T09:50:54Z","closed_at":"2017-06-14T22:20:51Z","author_association":"NONE","body":"After start reading this [thread](https://twitter.com/adamwathan/status/872851073815457793) from **@adamwathan** I got to wonder if something could be done like this.\r\n\r\nSo **@adamwathan** points out a missing possibility to copy out the properties from a class rather than extending it, helping out the possibility of creating utilities and inject them in components easily, _\"mixin'_ free some of the most popular CSS frameworks out there.\r\n\r\nI've found that this feature was being addressed back in 2015 at #1852 , but it was with another a purpose (maybe that why it was closed?)\r\n\r\n---\r\n\r\nSo normally we @extend SASS like this:\r\n```SCSS\r\n.foo {\r\n    @extend .baz;\r\n    background-color: green;\r\n}\r\n.bar {\r\n    color: blue;\r\n}\r\n.baz {\r\n    color: red;\r\n}\r\n```\r\nThat outputs the the following CSS:\r\n```CSS\r\n.foo {\r\n    background-color: green;\r\n}\r\n.bar {\r\n    color: blue;\r\n}\r\n.baz, .foo {\r\n    color: red;\r\n}\r\n```\r\n\r\n---\r\n\r\nBut what if we can @clone another class properties, pretty much like LESS?\r\n```SCSS\r\n.foo {\r\n    @clone .baz; // or @copy .baz;\r\n    background-color: green;\r\n}\r\n.bar {\r\n    color: blue;\r\n}\r\n.baz {\r\n    color: red;\r\n}\r\n```\r\n\r\nThat the will output this:\r\n```CSS\r\n.foo {\r\n    color: red;\r\n    background-color: green;\r\n\r\n}\r\n.bar {\r\n    color: blue;\r\n}\r\n.baz {\r\n    color: red;\r\n}\r\n```\r\n---"},"comment":{"url":"https://api.github.com/repos/sass/sass/issues/comments/438602726","html_url":"https://github.com/sass/sass/issues/2312#issuecomment-438602726","issue_url":"https://api.github.com/repos/sass/sass/issues/2312","id":438602726,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODYwMjcyNg==","user":{"login":"gavinhewitt","id":1969103,"node_id":"MDQ6VXNlcjE5NjkxMDM=","avatar_url":"https://avatars0.githubusercontent.com/u/1969103?v=4","gravatar_id":"","url":"https://api.github.com/users/gavinhewitt","html_url":"https://github.com/gavinhewitt","followers_url":"https://api.github.com/users/gavinhewitt/followers","following_url":"https://api.github.com/users/gavinhewitt/following{/other_user}","gists_url":"https://api.github.com/users/gavinhewitt/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinhewitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinhewitt/subscriptions","organizations_url":"https://api.github.com/users/gavinhewitt/orgs","repos_url":"https://api.github.com/users/gavinhewitt/repos","events_url":"https://api.github.com/users/gavinhewitt/events{/privacy}","received_events_url":"https://api.github.com/users/gavinhewitt/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T09:50:54Z","updated_at":"2018-11-14T09:50:54Z","author_association":"NONE","body":"It’s just a useful feature that the community asks for. That it’s there does not mean you have to use it if you don’t like the idea of copying over styles. I don’t understand the resistance. "}}
{"actor":{"display_login":"gavinhewitt"}}