{"action":"created","issue":{"url":"https://api.github.com/repos/less/less.js/issues/2433","labels_url":"https://api.github.com/repos/less/less.js/issues/2433/labels{/name}","comments_url":"https://api.github.com/repos/less/less.js/issues/2433/comments","events_url":"https://api.github.com/repos/less/less.js/issues/2433/events","html_url":"https://github.com/less/less.js/issues/2433","id":56375257,"number":2433,"title":"Feature request: Property lookup (from Stylus)","user":{"login":"krnlde","id":1087002,"avatar_url":"https://avatars.githubusercontent.com/u/1087002?v=3","gravatar_id":"","url":"https://api.github.com/users/krnlde","html_url":"https://github.com/krnlde","followers_url":"https://api.github.com/users/krnlde/followers","following_url":"https://api.github.com/users/krnlde/following{/other_user}","gists_url":"https://api.github.com/users/krnlde/gists{/gist_id}","starred_url":"https://api.github.com/users/krnlde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krnlde/subscriptions","organizations_url":"https://api.github.com/users/krnlde/orgs","repos_url":"https://api.github.com/users/krnlde/repos","events_url":"https://api.github.com/users/krnlde/events{/privacy}","received_events_url":"https://api.github.com/users/krnlde/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/less/less.js/labels/Feature%20Request","name":"Feature Request","color":"fe9400"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-02-03T13:09:03Z","updated_at":"2015-02-04T19:40:21Z","closed_at":null,"body":"I found a pretty neat feature in Stylus recently, a **property lookup** which allows you to use properties in the current or closest parent ancestor and use it for calculations.\r\n\r\nIn [Stylus](http://csspre.com/variables#property-lookup) this would look like this:\r\n\r\n```stylus\r\n.test\r\n  foo: 200\r\n  bar: (@foo/2)\r\n  .child\r\n    baz: @foo\r\n```\r\n\r\nwhich produces this CSS:\r\n\r\n```css\r\n.test {\r\n  foo: 200;\r\n  bar: 100;\r\n}\r\n.test .child {\r\n  baz: 200;\r\n}\r\n```\r\n\r\nFor less we could use the $-sign or maybe brackets to select properties. It then would look something similar to this:\r\n\r\n```less\r\n.test {\r\n  foo: 200;\r\n  bar: $foo / 2;\r\n  .child {\r\n    baz: $foo;\r\n  }\r\n}\r\n```\r\n\r\nor this respectively: \r\n\r\n```less\r\n.test {\r\n  foo: 200;\r\n  bar: [foo] / 2;\r\n  .child {\r\n    baz: [foo];\r\n  }\r\n}\r\n```\r\n\r\nThoughts on this?"},"comment":{"url":"https://api.github.com/repos/less/less.js/issues/comments/72923423","html_url":"https://github.com/less/less.js/issues/2433#issuecomment-72923423","issue_url":"https://api.github.com/repos/less/less.js/issues/2433","id":72923423,"user":{"login":"krnlde","id":1087002,"avatar_url":"https://avatars.githubusercontent.com/u/1087002?v=3","gravatar_id":"","url":"https://api.github.com/users/krnlde","html_url":"https://github.com/krnlde","followers_url":"https://api.github.com/users/krnlde/followers","following_url":"https://api.github.com/users/krnlde/following{/other_user}","gists_url":"https://api.github.com/users/krnlde/gists{/gist_id}","starred_url":"https://api.github.com/users/krnlde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krnlde/subscriptions","organizations_url":"https://api.github.com/users/krnlde/orgs","repos_url":"https://api.github.com/users/krnlde/repos","events_url":"https://api.github.com/users/krnlde/events{/privacy}","received_events_url":"https://api.github.com/users/krnlde/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T19:40:21Z","updated_at":"2015-02-04T19:40:21Z","body":"I like `${color}`. "}}