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

Combine expanded CSS properties to shorthand properties (where possible) #480

Open
zoliszabo opened this issue Jan 10, 2018 · 2 comments
Open
Milestone

Comments

@zoliszabo
Copy link
Contributor

Emogrifier may produce inline styles that are redundant.

For example:

<style>
    p {margin: 10px 0}
    p.c {margin-left: 5px; margin-right: 5px}
</style>
<p class="c"></p>

After the above is emogrified, it would look like this:

<p class="c" style="margin: 10px 0; margin-left: 5px; margin-right: 5px"></p>

But it could be simplified like this:

<p class="c" style="margin: 10px 5px"></p>
@oliverklee
Copy link
Contributor

I propose we do this in Emogrifier 4.0.0 by using some library that can shorten CSS. (I don't know whether there is such a library on Packagist, but I'm fairly confident.)

What do you think?

@zoliszabo
Copy link
Contributor Author

It sounds reasonable to me, there's no hurry with this one.

@zoliszabo zoliszabo added this to the 4.0.0 milestone Jan 10, 2018
@oliverklee oliverklee modified the milestones: 4.0.0, 5.0.0 Jun 11, 2020
@oliverklee oliverklee modified the milestones: 5.0.0, 6.0.0, Backlog Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants