* @author WooThemes * @package WooCommerce/Templates/Emails * @version 2.3.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly // Load colours $bg = get_option('woocommerce_email_background_color'); $body = get_option('woocommerce_email_body_background_color'); $base = get_option('woocommerce_email_base_color'); $base_text = wc_light_or_dark($base, '#202020', '#ffffff'); $text = get_option('woocommerce_email_text_color'); $bg_darker_10 = wc_hex_darker($bg, 10); $body_darker_10 = wc_hex_darker($body, 10); $base_lighter_20 = wc_hex_lighter($base, 20); $base_lighter_40 = wc_hex_lighter($base, 40); $text_lighter_20 = wc_hex_lighter($text, 20); // !important; is a gmail hack to prevent styles being stripped if it doesn't like something. ?> #wrapper { background-color: <?php echo esc_attr($bg); ?> ; margin: 0; padding: 70px 0 70px 0; -webkit-text-size-adjust: none !important; width: 100%; }
* * @author WooThemes * @package WooCommerce/Templates/Emails * @version 2.3.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly // Load colours $bg = get_option('woocommerce_email_background_color'); $body = get_option('woocommerce_email_body_background_color'); $base = get_option('woocommerce_email_base_color'); $base_text = wc_light_or_dark($base, '#202020', '#ffffff'); $text = get_option('woocommerce_email_text_color'); $bg_darker_10 = wc_hex_darker($bg, 10); $base_lighter_20 = wc_hex_lighter($base, 20); $text_lighter_20 = wc_hex_lighter($text, 20); // !important; is a gmail hack to prevent styles being stripped if it doesn't like something. ?> #wrapper { background-color: <?php echo esc_attr($bg); ?> ; margin: 0; padding: 70px 0 70px 0; -webkit-text-size-adjust: none !important; width: 100%; }
/** * Test wc_hex_darker(). * * @since 2.2 */ public function test_wc_hex_darker() { $this->assertEquals('#004178', wc_hex_darker('005dab')); $this->assertEquals('#004178', wc_hex_darker('#005dab')); }
/** * @deprecated */ function woocommerce_hex_darker($color, $factor = 30) { return wc_hex_darker($color, $factor); }
.wrapper { font-family: Arial, sans-serif; font-size: <?php echo $body_text_size; ?> px; color: <?php echo $body_text_color; ?> ; background-color: <?php echo esc_attr($back_bg_color); ?> ; width:100%; -webkit-text-size-adjust:none !important; margin:0; padding: 50px 0 50px 0;} .main-body { font-family: Arial, sans-serif; box-shadow: 0 3px 9px rgba(0, 0, 0, 0.03); border-radius: <?php echo $email_border_radius; ?> px !important; overflow: hidden; background-color: #ffffff; border: 1px solid <?php echo wc_hex_darker($back_bg_color, 10); ?> ; width: <?php echo $email_width; ?> px;} .template_header { font-family: Arial, sans-serif; background-color:<?php echo esc_attr($header_bg_color); ?> ; color: <?php echo $header_text_color; ?> ; border-top-left-radius:2px !important; border-top-right-radius:2px !important; border-bottom: 1px solid <?php echo $header_border_bottom_color; ?>