mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
🐛 Fixed bookmark card author/publisher spacing in member emails (#12134)
closes #12078 - Root cause was that pseudo class .kg-bookmark-author:after was not getting inlined to email newsletter or its preview. - That is where the margin and bullet-point content are added between author and publisher. - Dependency juice supports an option inlinePseudoElements which is false by default. - Fix was to set inlinePseudoElements to true when serializing post email. Co-authored-by: Jeremy Davidson <jeremy@crossingcontour.com>
This commit is contained in:
parent
9f291b2d10
commit
681c96b5e9
1 changed files with 3 additions and 1 deletions
|
@ -132,7 +132,9 @@ const serialize = async (postModel, options = {isBrowserPreview: false}) => {
|
|||
htmlTemplate = htmlTemplate.replace('%recipient.unsubscribe_url%', previewUnsubscribeUrl);
|
||||
}
|
||||
|
||||
let juicedHtml = juice(htmlTemplate);
|
||||
// Inline css to style attributes, turn on support for pseudo classes.
|
||||
const juiceOptions = {inlinePseudoElements: true};
|
||||
let juicedHtml = juice(htmlTemplate, juiceOptions);
|
||||
|
||||
// Force all links to open in new tab
|
||||
let _cheerio = cheerio.load(juicedHtml);
|
||||
|
|
Loading…
Reference in a new issue