2017 © Pedro Peláez
 

typo3-cms-extension typo3-mail-css-inliner

CSS inliner for the TYPO3 mailer

image

pagemachine/typo3-mail-css-inliner

CSS inliner for the TYPO3 mailer

  • Thursday, July 12, 2018
  • by pagemachine
  • Repository
  • 4 Watchers
  • 2 Stars
  • 886 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 106 % Grown

The README.md

CSS inliner for the TYPO3 mailer CI

This extension integrates a CSS inliner into the TYPO3 core mailer., (*1)

Installation

This extension is installable from various sources:, (*2)

  1. Via Composer:, (*3)

    composer require pagemachine/typo3-mail-css-inliner
  2. From the TYPO3 Extension Repository, (*4)

After installing the extension registers itself automatically, no further configuration is necessary., (*5)

Purpose

Designing mails is hard. Especially requirements like table layouts and inline styles are complicated to handle and take a lot of time to get right. This extension takes one burden off your shoulders and takes care of turning a regular stylesheet to inline styles. See our blog post about Mail styling in TYPO3 now easier., (*6)

Before:, (*7)

<!doctype html>
<html>
    <head>
        <title>CSS Inline Test</title>
        <style>
            body {
                color: #333;
            }
            h1 {
                font-size: 36px;
            }
            a {
                color: #337ab7;
            }
        </style>
    </head>
    <body>
        <h1>Headline</h1>
        <p>Content with <a href="https://example.org">link</a>.</p>
    </body>
</html>

After:, (*8)

<html>
  <head>
  <title>CSS Inline Test</title>
  <style>
        body {
            color: #333;
        }
        h1 {
            font-size: 36px;
        }
        a {
            color: #337ab7;
        }
    </style>
    </head>
    <body style="color: #333;">
        <h1 style="font-size: 36px;">Headline</h1>
        <p>Content with <a href="https://example.org" style="color: #337ab7;" target="_blank">link</a>.</p>
    </body>
</html>

Currently only <style> elements are supported, external styles via <link> are not imported., (*9)

Testing

All tests can be executed with the shipped Docker Compose definition:, (*10)

docker compose run --rm app composer build

The Versions