css / csso

CSS minifier with structural optimizations
https://css.github.io/csso/csso.html
MIT License
3.75k stars 188 forks source link

Duplicate content property removed #471

Open JDrizzy opened 1 year ago

JDrizzy commented 1 year ago

The content property allows for an alternative text value which is not supported in Firefox and Safari. A library that I'm using works around this issue by including a content value twice. This is to ensure a sort icon is always displayed regardless of browser support.

Using the latest version of CSSO (5.0.5) breaks this icon display for all browsers since the duplicate content value is removed.

Input

.test:before {
  content: "▲";
  content: "▲"/"";
}

Output

.test:before{content:"▲"/""}

Expected

.test:before{content:"▲";content:"▲"/""}