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

Two same CSS properties on same dom element does not work #368

Open
seawerst opened this issue Oct 4, 2023 · 3 comments
Open

Two same CSS properties on same dom element does not work #368

seawerst opened this issue Oct 4, 2023 · 3 comments

Comments

@seawerst
Copy link

seawerst commented Oct 4, 2023

This code is perfectly valid CSS:

 .emailsender {
    font-size: medium;
    font-size: max(16px, 1rem);
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%; width: 100%;
}

but because there are two of the same properties (font-size), Premailer will only take the second one and ignore the first one.

@jasekiw
Copy link
Collaborator

jasekiw commented Oct 4, 2023

Hi @seawerst

Are you expecting it do add both for a graceful fallback when max is not supported?

Thanks!

@seawerst
Copy link
Author

seawerst commented Oct 6, 2023

@jasekiw Yes, and I understand that this is not a simple ask, the CssAttributeCollection class has a key uniqueness build into it.

@jasekiw
Copy link
Collaborator

jasekiw commented Nov 24, 2023

@seawerst The part that I'm thinking about is how many entries for a property should be inlined? CSS properties can be overridden many times. Including them all could cause the size of the email to inflate. I imagine there needs to be some sort of cutoff if the library were to be changed to allow this functionality.

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