You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`svelte-email-tailwind` enables you to code, preview and test-send email templates with Svelte and Tailwind classes and render them to HTML or plain text.
11
13
12
-
- This package adds a Tailwind post-processor to the original [svelte-email](https://github.com/carstenlebek/svelte-email) package.
13
-
- Tailwind classes are converted to inline styles on built-time using a Vite plugin.
14
+
- This package adds a Tailwind post-processor to the original [svelte-email](https://github.com/carstenlebek/svelte-email) package.
15
+
- Tailwind classes are converted to inline styles on built-time using a Vite plugin.
14
16
- In earlier versions, this process took place every time an email was sent (not very efficient).
15
17
- This package also provides a Svelte preview component, including utility functions for the server (SvelteKit only).
## 3. Start developing your emails via the route you've chosen.
@@ -247,22 +259,33 @@ A set of standard components to help you build amazing emails without having to
247
259
- Row
248
260
- Custom
249
261
250
-
# HEADS UP!
262
+
# HEADS UP! (Limitations & Syntax requirements)
263
+
264
+
## Limitations & Syntax requirements
251
265
252
266
- Always include the `<Head />` component.
253
267
- For now, class attribute/prop interpolation/variable references will not work (this won't work: `class={someTwClassName}`, `class={`${someTwClassName} w-full`}`, this will work: `class="w-full"`).
254
-
- When using arbitrary Tailwind classes that use multiple values, separate them using underscores (example: p-[0_30px_12px_5px]).
268
+
- When using arbitrary Tailwind classes that use multiple values, separate them using underscores (example: p-[0_30px_12px_5px]).
255
269
- In Svelte email components, stick to the designated components if you use Tailwind classes. If you need custom HTML, use the `<Custom />` component and the "as" property to define the tag. This component defaults to a `<div/>`. Tailwind classes on regular html nodes will not be processed.
270
+
- There are ultra-rare cases where the text inside your email component results in syntax errors under the hood. This could happen when you're using code characters such as brackets, or certain strings that break the Vite script. This would require you to change up your text content.
271
+
272
+
## Ignore "node_invalid_placement_ssr" warnings
273
+
274
+
`node_invalid_placement_ssr: `<html>` (src/lib/components/Html.svelte:12:0) needs a valid parent element
275
+
276
+
This can cause content to shift around as the browser repairs the HTML, and will likely result in a `hydration_mismatch` warning.`
277
+
278
+
You can ignore these warnings, because Svelte thinks you're building for the web and doesn't know you're building emails - so the warnings are not applicable.
0 commit comments