premailer / css_parser

Ruby CSS Parser
Other
279 stars 110 forks source link

[QUESTION] Same property with diferent size units #83

Open marocas opened 7 years ago

marocas commented 7 years ago

Hello, im starting to use rem instead of px, and i found that with premailer, the style inline only goes with rem units, is there a way to have the fallback to px on the inline version, since some emails like outlook don't use rem?

Exemple: h1{ font-size:32px; font-size:3.2rem; }

It only uses the font-size: 3.2rem, it would be good to use both.

#305

Thanks in advance, Mário Silva.

marocas commented 6 years ago

Any development on this question?

grosser commented 6 years ago

can try pinging someone who worked on areas around rems if there are any ... or dive into the code to see how it's handled

marocas commented 6 years ago

In fact, every property that can have multiple units, can have the fallback to px. Saying this:

font-size: 0px;
font-size: 0em;
font-size: 0rem;
font-size: 0pt;

line-height: 0px;
line-height: 0em;
line-height: 0rem;
line-height: 0pt;

padding: 0px;
padding: 0em;
padding: 0rem;
padding: 0pt;

margin: 0px;
margin: 0em;
margin: 0rem;
margin: 0pt;

I don't know ruby, I already been looking to the code but still didn't find the place where equal keys are striped out.