gulp-inline-css icon indicating copy to clipboard operation
gulp-inline-css copied to clipboard

Using the same property multiple times

Open koen-dev opened this issue 6 years ago • 5 comments

I would like to inline the same property multiple times for a e-mail template. Is this possible and if so how?

Example:

.w100p {
    display:inline-block;
    vertical-align:top;
    text-align:left;
    width:100%;
    min-width:285px;
    max-width:100%;
    width:-webkit-calc(230400px - 48000%);
    min-width:-webkit-calc(100%);
    width:calc(230400px - 48000%);
    min-width:calc(100%);
}

Should result in:

<td style="display: inline-block; vertical-align:top; text-align:left; width:100%; width:calc(230400px - 48000%); min-width:285px; min-width:-webkit-calc(100%); min-width:calc(100%); max-width:100%;"></td>

koen-dev avatar Apr 30 '18 08:04 koen-dev

It should inline the class everywhere it finds it.

jonkemp avatar Apr 30 '18 13:04 jonkemp

@jonkemp It should but it doesn't. It takes the first value it finds.

ghost avatar May 07 '18 17:05 ghost

Maybe it is a bug caused by the use of calc. Just guessing here.

jonkemp avatar May 07 '18 17:05 jonkemp

@jonkemp I tested it using font-size.

ghost avatar May 07 '18 17:05 ghost

@jonkemp Right, so if you have a link and a style tag both with the same styles, the external stylesheet takes precedence even though the inline styles come after it.

ghost avatar May 07 '18 18:05 ghost