Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate properties from markup #3

Open
TheJaredWilcurt opened this issue Dec 26, 2021 · 0 comments
Open

Remove duplicate properties from markup #3

TheJaredWilcurt opened this issue Dec 26, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@TheJaredWilcurt
Copy link
Member

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.

This will not be possible until we have an uglificationMap from red-perfume-css:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant