Skip to content

Instantly share code, notes, and snippets.

@Blazing-Mike
Last active October 7, 2025 15:17
Show Gist options
  • Save Blazing-Mike/ebc1c0c3daed17e598dd840d624f499d to your computer and use it in GitHub Desktop.
Save Blazing-Mike/ebc1c0c3daed17e598dd840d624f499d to your computer and use it in GitHub Desktop.
/*
* Staipy Email Templates - Unified CSS
* Generated from Pug templates for backend integration
* Compatible with major email clients (Gmail, Outlook, Apple Mail, etc.)
*
* Based on templates: verify-email, password-reset, receiver-invoice, transaction,
* invoice-sent, invoice-completed, invoice-incompleted
*/
/* Reset and Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family:
"Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
color: #121314;
background-color: #f9fafb;
}
/* Main Container Styles - From Pug templates */
.email-container {
max-width: 512px; /* max-w-lg */
margin: 32px auto; /* mx-auto my-8 */
overflow: hidden;
border: 1px solid #e5e7eb; /* border-gray-200 */
font-weight: 500; /* font-medium */
border-radius: 8px; /* rounded-lg */
background: #fafafa;
}
/* Header Styles */
.email-header {
border-bottom: 1px solid #f3f4f6; /* border-gray-100 border-b */
background-color: #ffffff; /* bg-white */
padding: 24px; /* px-6 py-4 */
}
.flex {
display: flex;
}
.email-header .flex {
display: flex;
align-items: center;
justify-content: space-between;
}
.email-header .logo {
height: 18px; /* h-[18px] */
}
.email-header .powered-by {
color: #6b7280; /* text-gray-500 */
font-size: 14px; /* text-sm */
}
/* Body Styles */
.email-body {
padding: 24px; /* px-6 py-6 */
}
/* Typography */
.email-greeting {
margin-bottom: 8px; /* mb-2 */
font-size: 14px; /* text-sm */
color: #858a8e;
}
.email-title {
font-weight: 600; /* font-semibold */
font-size: 18px; /* text-lg */
margin-bottom: 16px;
color: #121314;
}
.email-paragraph {
margin-top: 12px; /* mt-3 */
font-size: 14px; /* text-sm */
line-height: 1.625; /* leading-relaxed */
color: #121314;
}
.email-paragraph.secondary {
color: #111827; /* text-gray-900 */
}
/* Content Sections */
.content-section {
margin-bottom: 16px; /* mb-4 */
}
.content-section.large {
margin-bottom: 24px; /* mb-6 */
}
/* Invoice/Transaction Card */
.invoice-card {
margin-bottom: 24px; /* mb-6 */
border-radius: 8px; /* rounded-lg */
border: 1px solid #e6e8ea;
padding: 16px; /* p-4 */
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
background: #ffffff;
}
.invoice-card .card-label {
margin-bottom: 8px; /* mb-2 */
font-weight: 500; /* font-medium */
font-size: 14px; /* text-sm */
color: #9ca3af; /* text-gray-400 */
}
.invoice-card .user-info {
display: flex;
flex-direction: column;
gap: 8px; /* space-y-2 */
}
.invoice-card .user-avatar {
display: flex;
height: 40px; /* h-10 */
width: 40px; /* w-10 */
align-items: center;
justify-content: center;
border-radius: 50%; /* rounded-full */
background: linear-gradient(135deg, #f87171, #ec4899); /* bg-gradient-to-br from-red-400 to-pink-500 */
}
.invoice-card .user-avatar span {
font-weight: 600; /* font-semibold */
font-size: 14px; /* text-sm */
color: #ffffff; /* text-white */
}
.invoice-card .user-details {
display: flex;
flex-direction: column;
gap: 8px; /* space-y-2 */
padding-bottom: 8px; /* pb-2 */
}
.invoice-card .user-label {
font-size: 12px; /* text-xs */
color: #9ca3af; /* text-gray-400 */
}
.invoice-card .user-name {
font-weight: 500; /* font-medium */
font-size: 14px; /* text-sm */
color: #111827; /* text-gray-900 */
}
.invoice-card .divider {
border-top: 1px solid #e6e8ea;
padding-top: 24px; /* pt-6 */
}
.invoice-card .payment-info {
display: flex;
align-items: center;
justify-content: space-between;
}
.invoice-card .payment-status {
display: flex;
align-items: center;
gap: 8px; /* gap-2 */
}
.invoice-card .status-text {
font-weight: 500; /* font-medium */
font-size: 14px; /* text-sm */
color: #6b7280; /* text-gray-500 */
}
.invoice-card .amount {
font-weight: 700; /* font-bold */
font-size: 24px; /* text-2xl */
color: #111827; /* text-gray-900 */
}
.invoice-card .amount-usd {
font-size: 14px; /* text-sm */
color: #9ca3af; /* text-gray-400 */
}
.invoice-card .due-date {
text-align: right;
font-weight: 500; /* font-medium */
font-size: 14px; /* text-sm */
color: #ef4444; /* text-red-500 */
}
/* Status Icons */
.status-icon-success {
width: 16px;
height: 17px;
fill: #1b9d4d;
}
.status-icon-error {
width: 14px;
height: 15px;
fill: #f5365c;
}
/* Details Section */
.details-section {
margin-bottom: 24px; /* mb-6 */
display: flex;
flex-direction: column;
gap: 16px; /* space-y-4 */
}
.detail-item .detail-label {
margin-bottom: 4px; /* mb-1 */
font-weight: 500; /* font-medium */
font-size: 14px; /* text-sm */
color: #6b7280; /* text-gray-500 */
}
.detail-item .detail-value {
font-size: 14px; /* text-sm */
color: #111827; /* text-gray-900 */
}
.detail-item .detail-value.bold {
font-weight: 700; /* font-bold */
}
/* CTA Button */
.cta-section {
margin-bottom: 24px; /* mb-6 */
}
.cta-button {
display: flex;
height: 36px; /* h-9 */
width: 100%; /* w-full */
align-items: center;
justify-content: center;
gap: 8px; /* gap-2 */
border-radius: 9999px; /* rounded-full */
padding: 12px 16px; /* px-4 py-3 */
font-weight: 500; /* font-medium */
color: #ffffff; /* text-white */
transition: background-color 0.2s; /* transition-colors duration-200 */
background: #007aff;
border: none;
cursor: pointer;
text-decoration: none;
}
.cta-button:hover {
background-color: #0056cc; /* hover:bg-blue-700 */
}
/* Alternative button style for some templates */
.cta-button-alt {
display: flex;
height: 36px;
width: 100%;
align-items: center;
justify-content: center;
gap: 8px;
padding: 12px 16px;
font-weight: 500;
color: #ffffff;
transition: background-color 0.2s;
background: #007aff;
border-radius: 32px; /* border-radius:2rem from inline styles */
border: none;
cursor: pointer;
text-decoration: none;
}
/* Additional Text Styles */
.link-text {
color: #3b82f6; /* text-blue-500 */
text-decoration: none;
}
.link-text:hover {
color: #1d4ed8; /* hover:text-blue-700 */
text-decoration: underline;
}
/* Signature Section */
.signature-section {
margin: 16px 0; /* my-4 */
display: flex;
flex-direction: column;
gap: 8px; /* space-y-2 */
}
.signature-section.mb-4 {
margin-bottom: 16px;
}
.signature-label {
margin-bottom: 4px; /* mb-1 */
font-weight: 500; /* font-medium */
font-size: 14px; /* text-sm */
color: #6b7280; /* text-gray-500 */
}
.signature-name {
font-size: 14px; /* text-sm */
color: #111827; /* text-gray-900 */
}
/* Social Links Section */
.socials-section {
border-color: #f3f4f6; /* border-gray-100 */
}
.socials-label {
margin-bottom: 12px; /* mb-3 */
font-weight: 500; /* font-medium */
font-size: 14px; /* text-sm */
color: #6b7280; /* text-gray-500 */
}
.socials-container {
display: flex;
align-items: center;
gap: 16px; /* space-x-4 */
}
.social-button {
display: flex;
height: 32px; /* h-8 */
width: 32px; /* w-8 */
align-items: center;
justify-content: center;
border-radius: 50%; /* rounded-full */
background-color: #ffffff; /* bg-white */
transition: background-color 0.2s; /* transition-colors */
border: none;
cursor: pointer;
}
.social-button:hover {
background-color: #e5e7eb; /* hover:bg-gray-200 */
}
.social-icon {
height: 16px; /* h-4 */
width: 16px; /* w-4 */
color: #4b5563; /* text-gray-600 */
fill: currentColor;
}
/* Footer Styles */
.email-footer {
border-top: 1px solid #e5e7eb;
padding: 8px 24px; /* px-6 py-2 */
background: #fafafa;
}
.footer-content {
text-align: center;
}
.footer-text {
font-weight: 500; /* font-medium */
font-size: 14px; /* text-sm */
color: #858a8e;
}
/* Utility Classes from Tailwind patterns */
.items-center {
align-items: center;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.gap-2 {
gap: 8px;
}
.space-y-2 > * + * {
margin-top: 8px;
}
.space-y-4 > * + * {
margin-top: 16px;
}
.space-x-4 > * + * {
margin-left: 16px;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
/* Margin utilities */
.mb-1 {
margin-bottom: 4px;
}
.mb-2 {
margin-bottom: 8px;
}
.mb-3 {
margin-bottom: 12px;
}
.mb-4 {
margin-bottom: 16px;
}
.mb-6 {
margin-bottom: 24px;
}
.mt-3 {
margin-top: 12px;
}
.mt-4 {
margin-top: 16px;
}
.mt-6 {
margin-top: 24px;
}
.my-4 {
margin: 16px 0;
}
.my-8 {
margin: 32px 0;
}
.mx-auto {
margin-left: auto;
margin-right: auto;
}
/* Padding utilities */
.p-4 {
padding: 16px;
}
.px-4 {
padding-left: 16px;
padding-right: 16px;
}
.px-6 {
padding-left: 24px;
padding-right: 24px;
}
.py-2 {
padding-top: 8px;
padding-bottom: 8px;
}
.py-3 {
padding-top: 12px;
padding-bottom: 12px;
}
.py-4 {
padding-top: 16px;
padding-bottom: 16px;
}
.py-6 {
padding-top: 24px;
padding-bottom: 24px;
}
.pt-6 {
padding-top: 24px;
}
.pb-2 {
padding-bottom: 8px;
}
/* Width utilities */
.w-full {
width: 100%;
}
.w-8 {
width: 32px;
}
.w-10 {
width: 40px;
}
.max-w-lg {
max-width: 512px;
}
/* Height utilities */
.h-8 {
height: 32px;
}
.h-9 {
height: 36px;
}
.h-10 {
height: 40px;
}
.h-4 {
height: 16px;
}
/* Font utilities */
.font-medium {
font-weight: 500;
}
.font-semibold {
font-weight: 600;
}
.font-bold {
font-weight: 700;
}
.text-xs {
font-size: 12px;
}
.text-sm {
font-size: 14px;
}
.text-lg {
font-size: 18px;
}
.text-2xl {
font-size: 24px;
}
/* Color utilities */
.text-white {
color: #ffffff;
}
.text-gray-400 {
color: #9ca3af;
}
.text-gray-500 {
color: #6b7280;
}
.text-gray-600 {
color: #4b5563;
}
.text-gray-900 {
color: #111827;
}
.text-red-500 {
color: #ef4444;
}
.text-blue-500 {
color: #3b82f6;
}
.text-blue-700 {
color: #1d4ed8;
}
.bg-white {
background-color: #ffffff;
}
.bg-gray-200 {
background-color: #e5e7eb;
}
/* Border utilities */
.border {
border-width: 1px;
}
.border-t {
border-top-width: 1px;
}
.border-b {
border-bottom-width: 1px;
}
.border-gray-100 {
border-color: #f3f4f6;
}
.border-gray-200 {
border-color: #e5e7eb;
}
.rounded-lg {
border-radius: 8px;
}
.rounded-full {
border-radius: 9999px;
}
/* Display utilities */
.overflow-hidden {
overflow: hidden;
}
/* Special gradient backgrounds */
.bg-gradient-to-br {
background-image: linear-gradient(135deg, var(--tw-gradient-stops));
}
.from-red-400 {
--tw-gradient-from: #f87171;
--tw-gradient-stops:
var(--tw-gradient-from), var(--tw-gradient-to, rgba(248, 113, 113, 0));
}
.to-pink-500 {
--tw-gradient-to: #ec4899;
}
/* Hover states */
.hover\:bg-blue-700:hover {
background-color: #1d4ed8;
}
.hover\:bg-gray-200:hover {
background-color: #e5e7eb;
}
.hover\:text-blue-700:hover {
color: #1d4ed8;
}
/* Transition utilities */
.transition-colors {
transition-property:
color, background-color, border-color, text-decoration-color, fill, stroke;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}
.duration-200 {
transition-duration: 200ms;
}
/* Line height utilities */
.leading-relaxed {
line-height: 1.625;
}
/* Shadow utilities */
.shadow-sm {
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
/* Responsive Design */
@media only screen and (max-width: 600px) {
.email-container {
margin: 16px;
max-width: calc(100% - 32px);
}
.email-header,
.email-body,
.email-footer {
padding-left: 16px;
padding-right: 16px;
}
.email-title {
font-size: 16px;
}
.invoice-card .amount {
font-size: 20px;
}
.cta-button,
.cta-button-alt {
width: 100%;
display: block;
margin: 8px 0;
}
.invoice-card .payment-info {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.invoice-card .due-date {
text-align: left;
}
}
/* Email Client Specific Fixes */
/* Table-based layout for better email client compatibility */
.email-table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
}
.email-table td {
padding: 0;
vertical-align: top;
}
/* WebKit specific fixes */
.webkit-fix {
-webkit-text-size-adjust: 100%;
}
/* Print styles */
@media print {
.email-container {
max-width: none;
margin: 0;
box-shadow: none;
border: 1px solid #ccc;
}
.social-button {
display: none;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment