This is certainly the same problem @mistic100 fixed in 9cc816d364 and then in efbc08e537
We have to fix it in the latest version of Smarty too.
This is certainly the same problem @mistic100 fixed in 9cc816d364057828cecc26dc1432448a57f261e9 and then in efbc08e537e26dde5f1bd98de4f8608ad6e81501
We have to fix it in the latest version of Smarty too.
<!-- github-comment-id:173578944 -->
The strip is intended for html where removing all white space is intended and desired.
I used it first time for inlined javascript properly checking that it works. Others used it for css which is obviously broken.
I think that ideally :
strip should work as initially designed
we could add smarty blocks for minifying inline css and javascript based on css and js minifiers but this is going to be bad for performance (more php code loaded, lots of regex and js/css parsing would make the page be slower) ...
The strip is intended for html where removing all white space is intended and desired.
I used it first time for inlined javascript properly checking that it works. Others used it for css which is obviously broken.
I think that ideally :
- strip should work as initially designed
- we could add smarty blocks for minifying inline css and javascript based on css and js minifiers but this is going to be bad for performance (more php code loaded, lots of regex and js/css parsing would make the page be slower) ...
<!-- github-comment-id:173935353 -->
If the "problem" is only for "stripped" CSS in email templates (themes/default/template/mail/text/html/css), then I think we would just drop these {strip} instructions. Considering emogrifier will move CSS rules as inline attributes, {strip} is not really useful.
If the "problem" is only for "stripped" CSS in email templates (themes/default/template/mail/text/html/_css_), then I think we would just drop these {strip} instructions. Considering emogrifier will move CSS rules as inline attributes, {strip} is not really useful.
<!-- github-comment-id:173946248 -->
You are totally right. I think I added the {strip} tags in the early development of the new email templates, when I didn't know that webmailers require inline CSS.
You are totally right. I think I added the {strip} tags in the early development of the new email templates, when I didn't know that webmailers require inline CSS.
<!-- github-comment-id:173979896 -->
OK, I reverted the change on Smarty and removed the {strip} instruction for email CSS. See branch bug/405-css-emails
My test goes fine, I have style in emails.
OK, I reverted the change on Smarty and removed the {strip} instruction for email CSS. See branch bug/405-css-emails
My test goes fine, I have style in emails.
<!-- github-comment-id:174046797 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Since I updated Smarty to version 3.1.28 (for compatibility with PHP 7), emails have lost their style.
This is certainly the same problem @mistic100 fixed in
9cc816d364and then inefbc08e537We have to fix it in the latest version of Smarty too.
We should check what is the real impact of this and notify Smarty team.
The strip is intended for html where removing all white space is intended and desired.
I used it first time for inlined javascript properly checking that it works. Others used it for css which is obviously broken.
I think that ideally :
If the "problem" is only for "stripped" CSS in email templates (themes/default/template/mail/text/html/css), then I think we would just drop these {strip} instructions. Considering emogrifier will move CSS rules as inline attributes, {strip} is not really useful.
You are totally right. I think I added the {strip} tags in the early development of the new email templates, when I didn't know that webmailers require inline CSS.
OK, I reverted the change on Smarty and removed the {strip} instruction for email CSS. See branch bug/405-css-emails
My test goes fine, I have style in emails.