Skip to content

whitelist duplicated declarations #106

@tbela99

Description

@tbela99

RFC: enable duplicate declarations removal white allowing a whitelist

import {transform} from '@tbela99/css-parser';

const css = `

.table {

    width: 100%;
    width: calc(100% + 40px);
    margin-left: 20px;
    margin-left: min(100% , 20px)
}
    
`;
const result = await transform(css, {

    beautify: true,
    validation: true,
    removeDuplicateDeclarations: ['width']
}
);

console.log(result.code);

expected result

.table {
 width: 100%;
 width: calc(100% + 40px);
 margin-left: min(100%,20px)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions