#How do email views get styled?

5 messages · Page 1 of 1 (latest)

minor plover
#

Emails and mail based notifications derive from this layout view.

https://github.com/laravel/framework/blob/11.x/src/Illuminate/Mail/resources/views/html/layout.blade.php

Within that view and some of its components, there are classes that are set on elements. When looking at the sent mail in a mail client, it has a lot of inline styling. Are these classes expanded at some point in the mail sending process? Where? There doesn’t seem to be any linked css as far as I can tell.

GitHub

The Laravel Framework. Contribute to laravel/framework development by creating an account on GitHub.

scenic badge
#

BTW I just searched the Illuminate/Mail folder for css .

minor plover
#

Is that only for markdown though? In the email layout it coverts specific sections to markdown, but maybe not the entire thing.

In the screenshot it’s rendering a section as markdown specifically but class is outside of it?

#

Looking at the Illuminate\Mail\Markdown class more it does look to be rendering the html views, strange considering only certain parts are parsed as markdown, thank you though!