{"action":"created","issue":{"url":"https://api.github.com/repos/csscomb/csscomb.js/issues/415","repository_url":"https://api.github.com/repos/csscomb/csscomb.js","labels_url":"https://api.github.com/repos/csscomb/csscomb.js/issues/415/labels{/name}","comments_url":"https://api.github.com/repos/csscomb/csscomb.js/issues/415/comments","events_url":"https://api.github.com/repos/csscomb/csscomb.js/issues/415/events","html_url":"https://github.com/csscomb/csscomb.js/issues/415","id":100491028,"number":415,"title":"PostCSS support","user":{"login":"hudochenkov","id":654597,"avatar_url":"https://avatars.githubusercontent.com/u/654597?v=3","gravatar_id":"","url":"https://api.github.com/users/hudochenkov","html_url":"https://github.com/hudochenkov","followers_url":"https://api.github.com/users/hudochenkov/followers","following_url":"https://api.github.com/users/hudochenkov/following{/other_user}","gists_url":"https://api.github.com/users/hudochenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/hudochenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hudochenkov/subscriptions","organizations_url":"https://api.github.com/users/hudochenkov/orgs","repos_url":"https://api.github.com/users/hudochenkov/repos","events_url":"https://api.github.com/users/hudochenkov/events{/privacy}","received_events_url":"https://api.github.com/users/hudochenkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-08-12T08:13:52Z","updated_at":"2016-05-15T19:07:22Z","closed_at":null,"body":"[PostCSS](https://github.com/postcss/postcss) now is a big player at CSS processors market. More and more peoples start using it, and, I sure, many of them wants to use CSScomb with it. In many cases CSScomb in SCSS mode can process CSS with PostCSS plugins syntax, but sometimes it's fails and can't parse file.\r\n\r\nPostCSS and CSScomb both going to their big releases. PostCSS 5.0 will [support custom parsers](https://github.com/postcss/postcss/issues/140). CSScomb 4.0, as I know, is heavy refactored. Maybe it's time to drop Gonzales PE and use PostCSS parsers for CSScomb?\r\n\r\nPostCSS syntax can be very different because of used plugins and developers wants to have their source files organized.\r\n\r\nThis is example of PostCSS code, that current CSScomb (in Sublime Text) fails to process:\r\n\r\n```css\r\n.button {\r\n    height: 40px;\r\n    border: solid transparent;\r\n    border-width: 2px;\r\n    border-radius: calc(@height / 2);\r\n    line-height: calc(@height - @border-width * 2);\r\n}\r\n```\r\n\r\nFails because of `@` in `calc()`. Used PostCSS plugins: [postcss-property-lookup](https://github.com/simonsmith/postcss-property-lookup) and [postcss-calc](https://github.com/postcss/postcss-calc).\r\n\r\nMore PostCSS-plugins syntaxes. [Mixins](https://github.com/postcss/postcss-mixins) are different from SCSS, for example, and there in no way to sort them now like we did it recently in [this PR](https://github.com/csscomb/csscomb.js/pull/392):\r\n\r\n```css\r\n@define-mixin icon $name {\r\n    padding-left: 16px;\r\n    &::after {\r\n        content: \"\";\r\n        background-url: url(/icons/$(name).png);\r\n    }\r\n}\r\n\r\n.search {\r\n    @mixin icon search;\r\n}\r\n```\r\n\r\nFollowing code taken from [cssnext](http://cssnext.io/features/):\r\n\r\n```css\r\n/* custom properties & var() */\r\n\r\n:root {\r\n    --fontSize: 1rem;\r\n}\r\nh1 {\r\n    font-size: calc(var(--fontSize) * 2);\r\n}\r\n\r\n/* custom media queries */\r\n\r\n@custom-media --small-viewport (max-width: 30em);\r\n\r\n@media (--small-viewport) {\r\n    /* styles for small viewport */\r\n}\r\n\r\n/* media queries ranges */\r\n\r\nAllows to replace min-/max- with <= & >= (syntax easier to read)\r\n\r\n@media (width >= 500px) and (width <= 1200px) {\r\n    /* your styles */\r\n}\r\n\r\n/* or coupled with custom media queries */\r\n\r\n@custom-media --only-medium-screen (width >= 500px) and (width <= 1200px);\r\n\r\n@media (--only-medium-screen) {\r\n    /* your styles */\r\n}\r\n```\r\n\r\nWhat you think about it, @tonyganch and @ai?\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25675165-postcss-support?utm_campaign=plugin&utm_content=tracker%2F214563&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F214563&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/csscomb/csscomb.js/issues/comments/219304284","html_url":"https://github.com/csscomb/csscomb.js/issues/415#issuecomment-219304284","issue_url":"https://api.github.com/repos/csscomb/csscomb.js/issues/415","id":219304284,"user":{"login":"danielbayley","id":7797479,"avatar_url":"https://avatars.githubusercontent.com/u/7797479?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbayley","html_url":"https://github.com/danielbayley","followers_url":"https://api.github.com/users/danielbayley/followers","following_url":"https://api.github.com/users/danielbayley/following{/other_user}","gists_url":"https://api.github.com/users/danielbayley/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbayley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbayley/subscriptions","organizations_url":"https://api.github.com/users/danielbayley/orgs","repos_url":"https://api.github.com/users/danielbayley/repos","events_url":"https://api.github.com/users/danielbayley/events{/privacy}","received_events_url":"https://api.github.com/users/danielbayley/received_events","type":"User","site_admin":false},"created_at":"2016-05-15T19:07:22Z","updated_at":"2016-05-15T19:07:22Z","body":"@ai Doesn't [postcss-sorting](https://github.com/hudochenkov/postcss-sorting) effectively replace CSScomb?"}}