Skip to content

Remove duplicate properties from markup #36

@TheJaredWilcurt

Description

@TheJaredWilcurt

This would be handled by a top level boolean on a task ({ removeDuplicateProperties: true }).

Currently this

.cow {
    padding: 4px;
}
.dog {
    padding: 8px;
}
<div class="dog cow"></div>

outputs this

.rp__padding__--COLON4px { padding: 4px; }
.rp__padding__--COLON8px { padding: 8px; }
<div class="rp__padding__--COLON8px rp__padding__--COLON4px"></div>

The actual outcome is the div will have a padding of 8px because that rule comes later in the CSS file.

It would be nice to automatically remove the rp__padding__--COLON4px from the markup if it isn't used. This would reduce the markup file size, and could also reduce the CSS size if we have a feature to remove unused CSS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedWaiting on another issue to be resolvedenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions