fix: Card success styling and ensure list support
Fixed two email rendering issues: 1. Card Success Styling - Was using hero gradient (purple) instead of green theme - Now uses proper green background (#f0fdf4) with green border - Info card: blue theme with border - Warning card: orange theme with border - Hero card: keeps gradient as intended 2. List Support Verification - MarkdownParser already supports bullet lists - Supports: *, -, •, ✓, ✔ as list markers - Properly converts to <ul><li> HTML - Works in both visual editor and email preview Card Types Now: - default: white background - hero: gradient background (purple) - success: green background with left border - info: blue background with left border - warning: orange background with left border
This commit is contained in:
@@ -349,8 +349,8 @@ class EmailRenderer {
|
||||
if ($type !== 'default') {
|
||||
$class .= ' card-' . esc_attr($type);
|
||||
|
||||
// Apply gradient and text color for hero/success cards
|
||||
if ($type === 'hero' || $type === 'success') {
|
||||
// Apply gradient and text color for hero cards
|
||||
if ($type === 'hero') {
|
||||
$style .= sprintf(
|
||||
' background: linear-gradient(135deg, %s 0%%, %s 100%%);',
|
||||
esc_attr($hero_gradient_start),
|
||||
@@ -365,6 +365,18 @@ class EmailRenderer {
|
||||
$content
|
||||
);
|
||||
}
|
||||
// Success card - green theme
|
||||
elseif ($type === 'success') {
|
||||
$style .= ' background-color: #f0fdf4; border-left: 4px solid #22c55e;';
|
||||
}
|
||||
// Info card - blue theme
|
||||
elseif ($type === 'info') {
|
||||
$style .= ' background-color: #f0f7ff; border-left: 4px solid #0071e3;';
|
||||
}
|
||||
// Warning card - orange theme
|
||||
elseif ($type === 'warning') {
|
||||
$style .= ' background-color: #fff8e1; border-left: 4px solid #ff9800;';
|
||||
}
|
||||
}
|
||||
|
||||
// Add background image
|
||||
|
||||
Reference in New Issue
Block a user