Problem/Motivation

We’re currently hardcoding our CSS in our email.html.twig

https://www.drupal.org/docs/contributed-modules/drupal-symfony-mailer/ge...

The documentation states we’re better of using a library called email in our active theme.
This will be used in

class DefaultsEmailAdjuster extends EmailAdjusterBase {

  /**
   * {@inheritdoc}
   */
  public function build(EmailInterface $email) {
    $theme = $email->getTheme();
    $email->setSender('<site>')
      ->addTextHeader('X-Mailer', 'Drupal')
      ->addLibrary("$theme/email");

    if ($default_transport = MailerTransport::loadDefault()) {
      $email->setTransportDsn($default_transport->getDsn());
    }
  }

}

Proposed resolution

Move the CSS out of the template in to a library.

Issue fork socialbase-3406149

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ronaldtebrake created an issue. See original summary.

ronaldtebrake’s picture

Status: Active » Needs review
ronaldtebrake’s picture

Status: Needs review » Closed (won't fix)
ronaldtebrake’s picture

For now we're trying a different route, as this has issues with the customizability of the theme using the color module and others.