{"action":"created","issue":{"url":"https://api.github.com/repos/Rich-Harris/ramjet/issues/40","labels_url":"https://api.github.com/repos/Rich-Harris/ramjet/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/Rich-Harris/ramjet/issues/40/comments","events_url":"https://api.github.com/repos/Rich-Harris/ramjet/issues/40/events","html_url":"https://github.com/Rich-Harris/ramjet/issues/40","id":101227352,"number":40,"title":"Position:relative and/or margins mess up the position","user":{"login":"bfred-it","id":1402241,"avatar_url":"https://avatars.githubusercontent.com/u/1402241?v=3","gravatar_id":"","url":"https://api.github.com/users/bfred-it","html_url":"https://github.com/bfred-it","followers_url":"https://api.github.com/users/bfred-it/followers","following_url":"https://api.github.com/users/bfred-it/following{/other_user}","gists_url":"https://api.github.com/users/bfred-it/gists{/gist_id}","starred_url":"https://api.github.com/users/bfred-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfred-it/subscriptions","organizations_url":"https://api.github.com/users/bfred-it/orgs","repos_url":"https://api.github.com/users/bfred-it/repos","events_url":"https://api.github.com/users/bfred-it/events{/privacy}","received_events_url":"https://api.github.com/users/bfred-it/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-16T02:48:53Z","updated_at":"2015-08-17T18:41:49Z","closed_at":null,"body":"Here I was able to reproduce the issue without `position:relative`:\r\nhttp://codepen.io/anon/pen/zGQxBJ\r\n\r\nThen I saw your jsfiddle and I was only able to reproduce the bug with `position:relative`\r\nhttp://jsfiddle.net/ckmpv5gd/\r\n\r\nOn my current site I'm using `position:absolute` on one of the elements and have the same issue.\r\n\r\nThe issue should be on these lines: https://github.com/Rich-Harris/ramjet/blob/master/src/utils/node.js#L59-L60"},"comment":{"url":"https://api.github.com/repos/Rich-Harris/ramjet/issues/comments/131921162","html_url":"https://github.com/Rich-Harris/ramjet/issues/40#issuecomment-131921162","issue_url":"https://api.github.com/repos/Rich-Harris/ramjet/issues/40","id":131921162,"user":{"login":"bfred-it","id":1402241,"avatar_url":"https://avatars.githubusercontent.com/u/1402241?v=3","gravatar_id":"","url":"https://api.github.com/users/bfred-it","html_url":"https://github.com/bfred-it","followers_url":"https://api.github.com/users/bfred-it/followers","following_url":"https://api.github.com/users/bfred-it/following{/other_user}","gists_url":"https://api.github.com/users/bfred-it/gists{/gist_id}","starred_url":"https://api.github.com/users/bfred-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfred-it/subscriptions","organizations_url":"https://api.github.com/users/bfred-it/orgs","repos_url":"https://api.github.com/users/bfred-it/repos","events_url":"https://api.github.com/users/bfred-it/events{/privacy}","received_events_url":"https://api.github.com/users/bfred-it/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T18:41:49Z","updated_at":"2015-08-17T18:41:49Z","body":"This seems to work for me, although I haven't tested it thoroughly\r\n\r\n\t\tclone.style.top = top  - offsetParentBcr.top - parseInt( style.marginTop, 10 ) + 'px';\r\n\t\tclone.style.left = left  - offsetParentBcr.left - parseInt( style.marginLeft, 10 ) + 'px';"}}