
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
tailwind-to-inline
Advanced tools
Convert HTML templates with Tailwind CSS classes to inline styles. Ideal for email templates, making Tailwind-styled emails compatible with major email clients.
Converts Tailwind CSS classes to inline styles for email-ready HTML templates.
npm install tailwind-to-inline
import { makeStylesInline } from 'tailwind-to-inline';
const htmlTemplate = await makeStylesInline('templates/welcome-email.html', {
name: 'John',
cta_text: 'Complete Profile'
});
Parameters:
templatePath — Path to the template file.placeholderValues (optional) — A key-value pair object to replace dynamic content in the template.import { makeStylesInlineFromString } from 'tailwind-to-inline';
const html = `<div class="pt-10 text-yellow-300">Hello, {{name}}</div>`;
const htmlTemplate = await makeStylesInlineFromString(html, {
name: 'John',
});
Parameters:
templateString — A raw HTML string containing Tailwind CSS classes.data (optional) — A key-value pair object to replace dynamic content in the template.welcome-email.html:<html>
<body class="bg-gray-800">
<div class="pt-10 mb-4 pl-4 max-w-[512px] relative z-20">
<span class="mr-5 text-yellow-300">Welcome, {{name}}</span>
</div>
<div>
<a href="https://example.com/complete-profile" class="bg-blue-500">
{{cta_text}}
</a>
</div>
</body>
</html>
<html>
<body style="background-color: #1f2937;">
<div style="position: relative; z-index: 20; max-width: 512px; margin-bottom: 1rem; padding-left: 1rem; padding-top: 2.5rem;">
<span style="margin-right: 1.25rem; color: #fde047;">Welcome, John</span>
</div>
<div>
<a href="https://example.com/complete-profile" style="background-color: #3b82f6;">
Complete Profile
</a>
</div>
</body>
</html>
Contributions, issues, and feature requests are welcome!
This project is MIT licensed.
FAQs
Convert HTML templates with Tailwind CSS classes to inline styles. Ideal for email templates, making Tailwind-styled emails compatible with major email clients.
The npm package tailwind-to-inline receives a total of 31 weekly downloads. As such, tailwind-to-inline popularity was classified as not popular.
We found that tailwind-to-inline demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.