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

Dedupe duplicate properties #5830

Merged
merged 4 commits into from
Oct 21, 2021
Merged

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Oct 19, 2021

This PR will cleanup the final css

This will allow us to remove duplicate declarations. This can occur when you are using @apply for example (see #5806).

The reason I implemented it as a separate step, is because this doesn't only happen for @apply, but it also happens if you do something like:

addComponents({ '.tw-btn-blue, .tw-btn-red': { padding: '10px' } })

So instead of tracking down every place this is happening, it now happens at the very end.


Fixes #5806

This will allow us to remove duplicate declarations. This occurs when
you are using `@apply` for example.

The reason I implemented it as a separate step, is because this doesn't
only happen for `@apply`, but it also happens if you do something like:

```js
addComponents({ '.btn-blue, .btm-red': { padding: '10px' } })
```

So instead of tracking down every place this is happening, it now
happens at the very end.
@RobinMalfait RobinMalfait changed the title cleanup duplicate properties Cleanup duplicate properties Oct 19, 2021
@RobinMalfait RobinMalfait changed the title Cleanup duplicate properties Dedupe duplicate properties Oct 21, 2021
@RobinMalfait RobinMalfait merged commit ea6f14a into master Oct 21, 2021
@RobinMalfait RobinMalfait deleted the cleanup-duplicate-properties branch October 21, 2021 09:54
@RobinMalfait
Copy link
Member Author

This PR results in a small performance hit on big codebases. I will tackle those in a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[JIT] apply: duplicate transform properties
1 participant