Closed sanpii closed 6 years ago
Can you add support for both version?
With something like that:
if (method_exists($this->cssToInlineStyles, 'setCSS')) {
// old code
} else {
// new code
}
?
@sanpii exactly. Then in composer "tijsverkoyen/css-to-inline-styles": "^1.5 || ^ 2.0"
. If you update your PR I will merge and release 3.0.1, thank you!
Done :smiley:
Ok @sanpii I added a new commit. Can you pull, squash into just one commit ad force push?
@gremo done.
Thanks. I can't test it right now but it should be ok, isn't it? Have you tested your branch?
Yes, I wrote a little script. Here the diff between the 1.5 and 2.0 output:
--- expected.txt 2018-03-23 09:57:37.374268310 +0100
+++ actual.txt 2018-03-23 12:23:11.449703293 +0100
@@ -69,10 +69,10 @@
<tr>
<td valign="top" style="border-collapse: collapse;">
<div mc:edit="std_content00" style="color: #505050; font-family: Arial; font-size: 12px; line-height: 150%; text-align: left;">
- <h1 class="h1" style="color: #202020; display: block; font-family: Arial; font-size: 34px; font-weight: bold; line-height: 100%; margin-bottom: 10px; margin-left: 0; margin-right: 0; margin-top: 0; text-align: left;">Heading 1</h1>
- <h2 class="h2" style="color: #202020; display: block; font-family: Arial; font-size: 30px; font-weight: bold; line-height: 100%; margin-bottom: 10px; margin-left: 0; margin-right: 0; margin-top: 0; text-align: left;">Heading 2</h2>
- <h3 class="h3" style="color: #202020; display: block; font-family: Arial; font-size: 26px; font-weight: bold; line-height: 100%; margin-bottom: 10px; margin-left: 0; margin-right: 0; margin-top: 0; text-align: left;">Heading 3</h3>
- <h4 class="h4" style="color: #202020; display: block; font-family: Arial; font-size: 22px; font-weight: bold; line-height: 100%; margin-bottom: 10px; margin-left: 0; margin-right: 0; margin-top: 0; text-align: left;">Heading 4</h4>
+ <h1 class="h1" style="color: #202020; display: block; font-family: Arial; font-size: 34px; font-weight: bold; line-height: 100%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; text-align: left;">Heading 1</h1>
+ <h2 class="h2" style="color: #202020; display: block; font-family: Arial; font-size: 30px; font-weight: bold; line-height: 100%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; text-align: left;">Heading 2</h2>
+ <h3 class="h3" style="color: #202020; display: block; font-family: Arial; font-size: 26px; font-weight: bold; line-height: 100%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; text-align: left;">Heading 3</h3>
+ <h4 class="h4" style="color: #202020; display: block; font-family: Arial; font-size: 22px; font-weight: bold; line-height: 100%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; text-align: left;">Heading 4</h4>
<strong>Getting started:</strong> Customize your template by clicking on the style editor tabs up above. Set your fonts, colors, and styles. After setting your styling is all done you can click here in this area, delete the text, and start adding your own awesome content!
<br>
<br>
@@ -146,4 +146,4 @@
</table>
</center>
</body>
-</html>
+</html>
\ No newline at end of file
v3.0.1 created, thanks!
Can you add support for both version?