{"action":"created","issue":{"url":"https://api.github.com/repos/bem/bem-forum-content-ru/issues/653","labels_url":"https://api.github.com/repos/bem/bem-forum-content-ru/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/bem/bem-forum-content-ru/issues/653/comments","events_url":"https://api.github.com/repos/bem/bem-forum-content-ru/issues/653/events","html_url":"https://github.com/bem/bem-forum-content-ru/issues/653","id":112328060,"number":653,"title":"Замечание к CSS при переопределении [проблемы которых у тебя может не быть]","user":{"login":"pavelpower","id":301646,"avatar_url":"https://avatars.githubusercontent.com/u/301646?v=3","gravatar_id":"","url":"https://api.github.com/users/pavelpower","html_url":"https://github.com/pavelpower","followers_url":"https://api.github.com/users/pavelpower/followers","following_url":"https://api.github.com/users/pavelpower/following{/other_user}","gists_url":"https://api.github.com/users/pavelpower/gists{/gist_id}","starred_url":"https://api.github.com/users/pavelpower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavelpower/subscriptions","organizations_url":"https://api.github.com/users/pavelpower/orgs","repos_url":"https://api.github.com/users/pavelpower/repos","events_url":"https://api.github.com/users/pavelpower/events{/privacy}","received_events_url":"https://api.github.com/users/pavelpower/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bem/bem-forum-content-ru/labels/borschik","name":"borschik","color":"bfe5bf"},{"url":"https://api.github.com/repos/bem/bem-forum-content-ru/labels/css","name":"css","color":"c7def8"},{"url":"https://api.github.com/repos/bem/bem-forum-content-ru/labels/enb","name":"enb","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-20T09:51:12Z","updated_at":"2015-10-20T11:39:34Z","closed_at":null,"body":"В нашем проекте где используем БЭМ заметили интересное поведение для некоторых свойств CSS при переопределении и при семантическом объединении борщиком.\r\n\r\n```javascript\r\n[borschik,\r\n   techOptions: {\r\n       semanticMerging: true\r\n   },\r\n//...\r\n]\r\n```\r\n\r\nЭто проявляется на старых браузерах или браузере с обрезанным функционалом.\r\n\r\nЕсли свойство, к примеру `background` объявить в обобщенном виде, а не отдельно по параметрам, пример:\r\n\r\n```css\r\n.block {\r\n    background: url(i/arrow.png) center center no-repeat;\r\n}\r\n```\r\n\r\nПри это в дальнейшем переопределить одно из указанных свойств\r\n\r\n```css\r\n.block {\r\n    background-image: url(i/yellow-arrow.png);\r\n}\r\n```\r\n\r\nТо переопределение может сработать не корректно, и часто поведение (особенно на short-браузерах) будет похоже на гейзенбаг.\r\n\r\nРешение пока нашли в том, что все свойства объявляем подробно:\r\n\r\n```css\r\n.block {\r\n    background-image: url(i/arrow.png);\r\n    background-position: center center;\r\n    background-prepeat: no-repeat;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/bem/bem-forum-content-ru/issues/comments/149535058","html_url":"https://github.com/bem/bem-forum-content-ru/issues/653#issuecomment-149535058","issue_url":"https://api.github.com/repos/bem/bem-forum-content-ru/issues/653","id":149535058,"user":{"login":"tadatuta","id":475746,"avatar_url":"https://avatars.githubusercontent.com/u/475746?v=3","gravatar_id":"","url":"https://api.github.com/users/tadatuta","html_url":"https://github.com/tadatuta","followers_url":"https://api.github.com/users/tadatuta/followers","following_url":"https://api.github.com/users/tadatuta/following{/other_user}","gists_url":"https://api.github.com/users/tadatuta/gists{/gist_id}","starred_url":"https://api.github.com/users/tadatuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadatuta/subscriptions","organizations_url":"https://api.github.com/users/tadatuta/orgs","repos_url":"https://api.github.com/users/tadatuta/repos","events_url":"https://api.github.com/users/tadatuta/events{/privacy}","received_events_url":"https://api.github.com/users/tadatuta/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T11:39:34Z","updated_at":"2015-10-20T11:39:34Z","body":"Уточнение: эта проблема не про `borschik`, а про используемый оптимизатор CSS (например, `CSSO` или `cleancss`, вызываемые под капотом). В случае с `cleancss` есть опция про совместимость со старыми браузерами (https://www.npmjs.com/package/clean-css#how-to-set-a-compatibility-mode), попробуй ее."}}