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

Keeping double properties #168

Open
PreVaDu opened this issue Feb 23, 2017 · 1 comment
Open

Keeping double properties #168

PreVaDu opened this issue Feb 23, 2017 · 1 comment

Comments

@PreVaDu
Copy link

PreVaDu commented Feb 23, 2017

In my case of use I have to set e.g. text-decoration property twice to make it correct in all target supported mail clients. It means my links have text-decoration: none; text-decoration: none !important;.

Inliner gets logically only last value, it means link in inlineCssOnElement function has $inlineProperties['text-decoration'] = "none !important".

It isn't problem to edit function to keep original styles and only add not included:

...
foreach (/*array_merge(*/$cssProperties/*, $inlineProperties)*/ as $property) {
    $rules[] = $property->toString();
}
$element->setAttribute('style', $element->getAttribute('style').implode(' ', $rules));
...

but which way is optimal for keeping both properties from style tag? Generally I need to add important or non-important version of property if miss in inline.

Has anyone idea?

Thanks in advance!

@osbre
Copy link

osbre commented May 18, 2021

Hi @PreVaDu. Any updates on this? Have you found a solution/alternative?

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

No branches or pull requests

2 participants