{"action":"created","issue":{"url":"https://api.github.com/repos/postcss/postcss/issues/348","labels_url":"https://api.github.com/repos/postcss/postcss/issues/348/labels{/name}","comments_url":"https://api.github.com/repos/postcss/postcss/issues/348/comments","events_url":"https://api.github.com/repos/postcss/postcss/issues/348/events","html_url":"https://github.com/postcss/postcss/issues/348","id":81243680,"number":348,"title":"Add options for granular positioning to warn and error functions","user":{"login":"davidtheclark","id":628431,"avatar_url":"https://avatars.githubusercontent.com/u/628431?v=3","gravatar_id":"","url":"https://api.github.com/users/davidtheclark","html_url":"https://github.com/davidtheclark","followers_url":"https://api.github.com/users/davidtheclark/followers","following_url":"https://api.github.com/users/davidtheclark/following{/other_user}","gists_url":"https://api.github.com/users/davidtheclark/gists{/gist_id}","starred_url":"https://api.github.com/users/davidtheclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidtheclark/subscriptions","organizations_url":"https://api.github.com/users/davidtheclark/orgs","repos_url":"https://api.github.com/users/davidtheclark/repos","events_url":"https://api.github.com/users/davidtheclark/events{/privacy}","received_events_url":"https://api.github.com/users/davidtheclark/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/postcss/postcss/labels/4.2","name":"4.2","color":"009800"},{"url":"https://api.github.com/repos/postcss/postcss/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":39,"created_at":"2015-05-27T02:51:54Z","updated_at":"2015-08-02T20:17:04Z","closed_at":null,"body":"Re: https://github.com/stylelint/stylelint/issues/133\r\n\r\nRight now the positions reported by errors or warnings rely on the `node` option; therefore, the position is approximate but not exact, since a node might contain any number of lines, and the warning/error might not relate to the *first* line.\r\n\r\nTo increase accuracy, a few things could be done:\r\n\r\n- Add an `index` option to the functions (alongside `node`), which would allow us to register an exact index for the item *relative to the specified node*. PostCSS would then calculate a line/column position based on the node's raw string value and this reported index.\r\n- Add `line` and `column` options, so that whoever is registering the warning/error can dictate exactly what position gets reported.\r\n\r\nAny other ideas?"},"comment":{"url":"https://api.github.com/repos/postcss/postcss/issues/comments/127066142","html_url":"https://github.com/postcss/postcss/issues/348#issuecomment-127066142","issue_url":"https://api.github.com/repos/postcss/postcss/issues/348","id":127066142,"user":{"login":"ai","id":19343,"avatar_url":"https://avatars.githubusercontent.com/u/19343?v=3","gravatar_id":"","url":"https://api.github.com/users/ai","html_url":"https://github.com/ai","followers_url":"https://api.github.com/users/ai/followers","following_url":"https://api.github.com/users/ai/following{/other_user}","gists_url":"https://api.github.com/users/ai/gists{/gist_id}","starred_url":"https://api.github.com/users/ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ai/subscriptions","organizations_url":"https://api.github.com/users/ai/orgs","repos_url":"https://api.github.com/users/ai/repos","events_url":"https://api.github.com/users/ai/events{/privacy}","received_events_url":"https://api.github.com/users/ai/received_events","type":"User","site_admin":false},"created_at":"2015-08-02T20:17:04Z","updated_at":"2015-08-02T20:17:04Z","body":"`line` an `column` props is better to have same API as `CssSyntaxError`."}}