8000 Duplicate css variable initialization not removed in minify · Issue #1283 · clean-css/clean-css · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Duplicate css variable initialization not removed in minify #1283
Open
@subi-ksha97

Description

@subi-ksha97

Environment

  • clean-css version - 5.3.3:
  • node.js version - v16.20.2:
  • operating system: macOs Sonoma

Configuration options

var CleanCSS = require('clean-css');
new CleanCSS({
  level : {
      2: {
          all: true,
          removeDuplicateVariableAssignments: true
      }
 }
})

Input CSS

:root {
  --main-bg-color: brown;
  --main-bg-color: blue;
}
p{
  background-color: var(--main-bg-color);
}

Actual output CSS

:root{--main-bg-color:brown;--main-bg-color:blue}p{background-color:var(--main-bg-color)}

Expected output CSS

:root{--main-bg-color:blue}p{background-color:var(--main-bg-color)}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0