csso icon indicating copy to clipboard operation
csso copied to clipboard

Background declarations don't merging as expected

Open psywalker opened this issue 8 years ago • 2 comments

В шаблоне в файле "style.sass" пишу следующее:

`@import "root/root.sass" @import "page/page.sass" @import "header/header.sass"

body background: green

a color: #fff display: flex

body background: blue`

При минификации в итоговый css-файл попадают сразу два правила одного свойства: https://monosnap.com/file/c2IqC8trfhE29LjAmIDjBfMQrSo2Xa

body{background:green;background:#00f}

А ведь по идее сюда должно попадать только лишь последнее правило из этих двух:background:#00f}?

psywalker avatar Apr 02 '17 10:04 psywalker

The smallest code to reproduce an issue:

body {
  background: green;
  background: blue;
}

CSSO avoids to merge background declarations because this property is too complex for merge. This will be improved in the future.

lahmatiy avatar Apr 02 '17 10:04 lahmatiy

Ясно, Рома, спасибо!

psywalker avatar Apr 02 '17 10:04 psywalker