tijsverkoyen / CssToInlineStyles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very usefull when you're sending emails.
BSD 3-Clause "New" or "Revised" License
5.8k stars 187 forks source link

Merging of Attributes #228

Open DemigodCode opened 2 years ago

DemigodCode commented 2 years ago

I've done a port of Bootstrap-Email (https://github.com/bootstrap-email/bootstrap-email) to PHP.

There's some different behavior between this package and the ruby inlining package.

If I have lets say:

.btn { border: 1px solid transparent; } .btn-colored { border-color: #fff; }

I would expect the ruby result:

border: 1px solid #fff;

What this package generates:

border: 1px solid transparent; border-color: #fff

That will lead to a broken button without border in Outlook and it's duplicated anyway with "transparent" AND "#fff".

Any thoughts?