{"action":"created","issue":{"url":"https://api.github.com/repos/postcss/postcss/issues/165","labels_url":"https://api.github.com/repos/postcss/postcss/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/postcss/postcss/issues/165/comments","events_url":"https://api.github.com/repos/postcss/postcss/issues/165/events","html_url":"https://github.com/postcss/postcss/issues/165","id":53950495,"number":165,"title":"White space normalization in v4.0.0","user":{"login":"hail2u","id":68940,"avatar_url":"https://avatars.githubusercontent.com/u/68940?v=3","gravatar_id":"","url":"https://api.github.com/users/hail2u","html_url":"https://github.com/hail2u","followers_url":"https://api.github.com/users/hail2u/followers","following_url":"https://api.github.com/users/hail2u/following{/other_user}","gists_url":"https://api.github.com/users/hail2u/gists{/gist_id}","starred_url":"https://api.github.com/users/hail2u/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hail2u/subscriptions","organizations_url":"https://api.github.com/users/hail2u/orgs","repos_url":"https://api.github.com/users/hail2u/repos","events_url":"https://api.github.com/users/hail2u/events{/privacy}","received_events_url":"https://api.github.com/users/hail2u/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-10T07:46:34Z","updated_at":"2015-01-10T13:06:19Z","closed_at":"2015-01-10T13:06:19Z","body":"I'm updating dependencies in [CSS MQPacker][1]. However white space normalization in v4.0.0 looks very different to v3.x.x. Sometimes v4.0.0 removes [`after`][2], sometimes removes [`between`][3]. Both expected results updated for passing test with v4.0.0.\r\n\r\nI want to know what PostCSS v4.0.0 will and will not do to white spaces when moving nodes.\r\n\r\n\r\n[1]: https://github.com/hail2u/node-css-mqpacker/tree/postcss-v4\r\n[2]: https://github.com/hail2u/node-css-mqpacker/blob/postcss-v4/test/expected/multiple-queries.css#L8\r\n[3]: https://github.com/hail2u/node-css-mqpacker/blob/postcss-v4/test/expected/other-at-rule.css#L14"},"comment":{"url":"https://api.github.com/repos/postcss/postcss/issues/comments/69455114","html_url":"https://github.com/postcss/postcss/issues/165#issuecomment-69455114","issue_url":"https://api.github.com/repos/postcss/postcss/issues/165","id":69455114,"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-01-10T13:06:19Z","updated_at":"2015-01-10T13:06:19Z","body":"Remove:\r\n\r\n1. When you `clone()` node, PostCSS will remove all style properties (`after`, `before`, `between`).\r\n2. When you move node to other CSS root (by `moveTo()`), it will also remove all style properties.\r\n3. When you move node to same CSS root, it will remove only `before` and `after`.\r\n\r\nSet new:\r\n\r\n1. When you insert node before some node, PostCSS will copy `before` from existed node to new one.\r\n2. When you try to stringify some node and it has no `between`, PostCSS willl try to find node with same type and copy `between` from this other node.\r\n3. When you try to stringify some node and it has no `before` or `after`, [PostCSS will try](https://github.com/postcss/postcss/blob/master/lib/node.js#L321) to find what is indent that you use in your CSS by other nodes, which has `before`. Then PostCSS will calc current node depth and will calc `before`.\r\n4. If PostCSS can’t find other nodes to copy `before`, etc it will use [default style properties](https://github.com/postcss/postcss/blob/master/lib/node.js#L405)."}}