plain
6 years ago
admin-cancelled-order.php
6 years ago
admin-failed-order.php
6 years ago
admin-new-order.php
6 years ago
customer-completed-order.php
6 years ago
customer-invoice.php
6 years ago
customer-new-account.php
6 years ago
customer-note.php
6 years ago
customer-on-hold-order.php
6 years ago
customer-processing-order.php
6 years ago
customer-refunded-order.php
6 years ago
customer-reset-password.php
6 years ago
email-addresses.php
6 years ago
email-customer-details.php
6 years ago
email-downloads.php
8 years ago
email-footer.php
6 years ago
email-header.php
7 years ago
email-order-details.php
6 years ago
email-order-items.php
6 years ago
email-styles.php
6 years ago
email-styles.php
227 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Email Styles |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-styles.php. |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://docs.woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce/Templates/Emails |
| 15 | * @version 3.3.0 |
| 16 | */ |
| 17 | |
| 18 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | exit; |
| 20 | } |
| 21 | |
| 22 | // Load colors. |
| 23 | $bg = get_option( 'woocommerce_email_background_color' ); |
| 24 | $body = get_option( 'woocommerce_email_body_background_color' ); |
| 25 | $base = get_option( 'woocommerce_email_base_color' ); |
| 26 | $base_text = wc_light_or_dark( $base, '#202020', '#ffffff' ); |
| 27 | $text = get_option( 'woocommerce_email_text_color' ); |
| 28 | |
| 29 | // Pick a contrasting color for links. |
| 30 | $link_color = wc_hex_is_light( $base ) ? $base : $base_text; |
| 31 | |
| 32 | if ( wc_hex_is_light( $body ) ) { |
| 33 | $link_color = wc_hex_is_light( $base ) ? $base_text : $base; |
| 34 | } |
| 35 | |
| 36 | $bg_darker_10 = wc_hex_darker( $bg, 10 ); |
| 37 | $body_darker_10 = wc_hex_darker( $body, 10 ); |
| 38 | $base_lighter_20 = wc_hex_lighter( $base, 20 ); |
| 39 | $base_lighter_40 = wc_hex_lighter( $base, 40 ); |
| 40 | $text_lighter_20 = wc_hex_lighter( $text, 20 ); |
| 41 | $text_lighter_40 = wc_hex_lighter( $text, 40 ); |
| 42 | |
| 43 | // !important; is a gmail hack to prevent styles being stripped if it doesn't like something. |
| 44 | // body{padding: 0;} ensures proper scale/positioning of the email in the iOS native email app. |
| 45 | ?> |
| 46 | body { |
| 47 | padding: 0; |
| 48 | } |
| 49 | |
| 50 | #wrapper { |
| 51 | background-color: <?php echo esc_attr( $bg ); ?>; |
| 52 | margin: 0; |
| 53 | padding: 70px 0; |
| 54 | -webkit-text-size-adjust: none !important; |
| 55 | width: 100%; |
| 56 | } |
| 57 | |
| 58 | #template_container { |
| 59 | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important; |
| 60 | background-color: <?php echo esc_attr( $body ); ?>; |
| 61 | border: 1px solid <?php echo esc_attr( $bg_darker_10 ); ?>; |
| 62 | border-radius: 3px !important; |
| 63 | } |
| 64 | |
| 65 | #template_header { |
| 66 | background-color: <?php echo esc_attr( $base ); ?>; |
| 67 | border-radius: 3px 3px 0 0 !important; |
| 68 | color: <?php echo esc_attr( $base_text ); ?>; |
| 69 | border-bottom: 0; |
| 70 | font-weight: bold; |
| 71 | line-height: 100%; |
| 72 | vertical-align: middle; |
| 73 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 74 | } |
| 75 | |
| 76 | #template_header h1, |
| 77 | #template_header h1 a { |
| 78 | color: <?php echo esc_attr( $base_text ); ?>; |
| 79 | } |
| 80 | |
| 81 | #template_header_image img { |
| 82 | margin-left: 0; |
| 83 | margin-right: 0; |
| 84 | } |
| 85 | |
| 86 | #template_footer td { |
| 87 | padding: 0; |
| 88 | border-radius: 6px; |
| 89 | } |
| 90 | |
| 91 | #template_footer #credit { |
| 92 | border: 0; |
| 93 | color: <?php echo esc_attr( $text_lighter_40 ); ?>; |
| 94 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 95 | font-size: 12px; |
| 96 | line-height: 150%; |
| 97 | text-align: center; |
| 98 | padding: 24px 0; |
| 99 | } |
| 100 | |
| 101 | #template_footer #credit p { |
| 102 | margin: 0 0 16px; |
| 103 | } |
| 104 | |
| 105 | #body_content { |
| 106 | background-color: <?php echo esc_attr( $body ); ?>; |
| 107 | } |
| 108 | |
| 109 | #body_content table td { |
| 110 | padding: 48px 48px 32px; |
| 111 | } |
| 112 | |
| 113 | #body_content table td td { |
| 114 | padding: 12px; |
| 115 | } |
| 116 | |
| 117 | #body_content table td th { |
| 118 | padding: 12px; |
| 119 | } |
| 120 | |
| 121 | #body_content td ul.wc-item-meta { |
| 122 | font-size: small; |
| 123 | margin: 1em 0 0; |
| 124 | padding: 0; |
| 125 | list-style: none; |
| 126 | } |
| 127 | |
| 128 | #body_content td ul.wc-item-meta li { |
| 129 | margin: 0.5em 0 0; |
| 130 | padding: 0; |
| 131 | } |
| 132 | |
| 133 | #body_content td ul.wc-item-meta li p { |
| 134 | margin: 0; |
| 135 | } |
| 136 | |
| 137 | #body_content p { |
| 138 | margin: 0 0 16px; |
| 139 | } |
| 140 | |
| 141 | #body_content_inner { |
| 142 | color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 143 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 144 | font-size: 14px; |
| 145 | line-height: 150%; |
| 146 | text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 147 | } |
| 148 | |
| 149 | .td { |
| 150 | color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 151 | border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>; |
| 152 | vertical-align: middle; |
| 153 | } |
| 154 | |
| 155 | .address { |
| 156 | padding: 12px; |
| 157 | color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 158 | border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>; |
| 159 | } |
| 160 | |
| 161 | .text { |
| 162 | color: <?php echo esc_attr( $text ); ?>; |
| 163 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 164 | } |
| 165 | |
| 166 | .link { |
| 167 | color: <?php echo esc_attr( $base ); ?>; |
| 168 | } |
| 169 | |
| 170 | #header_wrapper { |
| 171 | padding: 36px 48px; |
| 172 | display: block; |
| 173 | } |
| 174 | |
| 175 | h1 { |
| 176 | color: <?php echo esc_attr( $base ); ?>; |
| 177 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 178 | font-size: 30px; |
| 179 | font-weight: 300; |
| 180 | line-height: 150%; |
| 181 | margin: 0; |
| 182 | text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 183 | text-shadow: 0 1px 0 <?php echo esc_attr( $base_lighter_20 ); ?>; |
| 184 | } |
| 185 | |
| 186 | h2 { |
| 187 | color: <?php echo esc_attr( $base ); ?>; |
| 188 | display: block; |
| 189 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 190 | font-size: 18px; |
| 191 | font-weight: bold; |
| 192 | line-height: 130%; |
| 193 | margin: 0 0 18px; |
| 194 | text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 195 | } |
| 196 | |
| 197 | h3 { |
| 198 | color: <?php echo esc_attr( $base ); ?>; |
| 199 | display: block; |
| 200 | font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 201 | font-size: 16px; |
| 202 | font-weight: bold; |
| 203 | line-height: 130%; |
| 204 | margin: 16px 0 8px; |
| 205 | text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 206 | } |
| 207 | |
| 208 | a { |
| 209 | color: <?php echo esc_attr( $link_color ); ?>; |
| 210 | font-weight: normal; |
| 211 | text-decoration: underline; |
| 212 | } |
| 213 | |
| 214 | img { |
| 215 | border: none; |
| 216 | display: inline-block; |
| 217 | font-size: 14px; |
| 218 | font-weight: bold; |
| 219 | height: auto; |
| 220 | outline: none; |
| 221 | text-decoration: none; |
| 222 | text-transform: capitalize; |
| 223 | vertical-align: middle; |
| 224 | margin-<?php echo is_rtl() ? 'left' : 'right'; ?>: 10px; |
| 225 | } |
| 226 | <?php |
| 227 |