| 1 |
<?php |
| 2 |
/** |
| 3 |
* Email Styles |
| 4 |
*/ |
| 5 |
|
| 6 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 7 |
|
| 8 |
$settings = weforms_get_settings( 'email_settings', array( |
| 9 |
'background_color' => '#f5f5f5', |
| 10 |
'body_background_color' => '#ffffff', |
| 11 |
'base_color' => '#444444', |
| 12 |
'text_color' => '#444444' |
| 13 |
) ); |
| 14 |
|
| 15 |
// Load colours |
| 16 |
$bg = $settings['background_color']; |
| 17 |
$body = $settings['body_background_color']; |
| 18 |
$base = $settings['base_color']; |
| 19 |
$base_text = '#202020'; |
| 20 |
$text = $settings['text_color']; |
| 21 |
|
| 22 |
$text_lighter_20 = '#555555'; |
| 23 |
|
| 24 |
// !important; is a gmail hack to prevent styles being stripped if it doesn't like something. |
| 25 |
?> |
| 26 |
#wrapper { |
| 27 |
background-color: <?php echo esc_attr( $bg ); ?>; |
| 28 |
margin: 0; |
| 29 |
padding: 40px 0 0 0; |
| 30 |
-webkit-text-size-adjust: none !important; |
| 31 |
width: 100%; |
| 32 |
} |
| 33 |
|
| 34 |
.button { |
| 35 |
background-color:#4CAF50; |
| 36 |
border-radius:3px; |
| 37 |
color:#ffffff; |
| 38 |
display:inline-block; |
| 39 |
font-family:sans-serif; |
| 40 |
font-size:13px; |
| 41 |
font-weight:bold; |
| 42 |
line-height: 150%; |
| 43 |
text-align:center; |
| 44 |
text-decoration:none; |
| 45 |
-webkit-text-size-adjust:none; |
| 46 |
padding: 8px 20px; |
| 47 |
} |
| 48 |
|
| 49 |
.button.sm { |
| 50 |
padding: 5px 10px; |
| 51 |
} |
| 52 |
|
| 53 |
.button.green { |
| 54 |
background-color: #4CAF50; |
| 55 |
} |
| 56 |
|
| 57 |
.button.orange { |
| 58 |
background-color: #FF9800; |
| 59 |
} |
| 60 |
|
| 61 |
.button.blue { |
| 62 |
background-color: #2196F3; |
| 63 |
} |
| 64 |
|
| 65 |
#template_container { |
| 66 |
background-color: <?php echo esc_attr( $body ); ?>; |
| 67 |
border: 1px solid #eee; |
| 68 |
margin-bottom: 25px; |
| 69 |
} |
| 70 |
|
| 71 |
#template_header { |
| 72 |
color: #444; |
| 73 |
border-bottom: 0; |
| 74 |
font-weight: bold; |
| 75 |
line-height: 100%; |
| 76 |
vertical-align: middle; |
| 77 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 78 |
} |
| 79 |
|
| 80 |
#template_footer td { |
| 81 |
padding: 0; |
| 82 |
} |
| 83 |
|
| 84 |
#template_footer #credit { |
| 85 |
border:0; |
| 86 |
color: #999; |
| 87 |
font-family: Arial; |
| 88 |
font-size:12px; |
| 89 |
line-height:125%; |
| 90 |
text-align:center; |
| 91 |
padding: 0 48px 48px 48px; |
| 92 |
} |
| 93 |
|
| 94 |
#body_content { |
| 95 |
background-color: <?php echo esc_attr( $body ); ?>; |
| 96 |
} |
| 97 |
|
| 98 |
#body_content table td { |
| 99 |
padding: 20px 20px; |
| 100 |
} |
| 101 |
|
| 102 |
#body_content table td td { |
| 103 |
padding: 12px; |
| 104 |
} |
| 105 |
|
| 106 |
#body_content table td th { |
| 107 |
padding: 12px; |
| 108 |
} |
| 109 |
|
| 110 |
#body_content p { |
| 111 |
margin: 0 0 20px; |
| 112 |
} |
| 113 |
|
| 114 |
#body_content_inner { |
| 115 |
color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 116 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 117 |
font-size: 14px; |
| 118 |
line-height: 170%; |
| 119 |
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 120 |
} |
| 121 |
|
| 122 |
.td { |
| 123 |
color: <?php echo esc_attr( $text_lighter_20 ); ?>; |
| 124 |
border: none; |
| 125 |
} |
| 126 |
|
| 127 |
.text { |
| 128 |
color: <?php echo esc_attr( $text ); ?>; |
| 129 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 130 |
} |
| 131 |
|
| 132 |
#body_content_inner tr.field-label th { |
| 133 |
padding: 6px 12px; |
| 134 |
background-color: #f8f8f8; |
| 135 |
} |
| 136 |
|
| 137 |
#body_content_inner tr.field-value td { |
| 138 |
padding: 6px 12px 12px 12px; |
| 139 |
} |
| 140 |
|
| 141 |
.link { |
| 142 |
color: <?php echo esc_attr( $base ); ?>; |
| 143 |
} |
| 144 |
|
| 145 |
#header_wrapper { |
| 146 |
padding: 36px 48px 0; |
| 147 |
display: block; |
| 148 |
} |
| 149 |
|
| 150 |
h1 { |
| 151 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 152 |
font-size: 30px; |
| 153 |
font-weight: 300; |
| 154 |
line-height: 150%; |
| 155 |
margin: 0; |
| 156 |
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 157 |
-webkit-font-smoothing: antialiased; |
| 158 |
} |
| 159 |
|
| 160 |
h2 { |
| 161 |
color: <?php echo esc_attr( $base ); ?>; |
| 162 |
display: block; |
| 163 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 164 |
font-size: 18px; |
| 165 |
font-weight: bold; |
| 166 |
line-height: 130%; |
| 167 |
margin: .5em 0; |
| 168 |
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 169 |
} |
| 170 |
|
| 171 |
h3 { |
| 172 |
color: <?php echo esc_attr( $base ); ?>; |
| 173 |
display: block; |
| 174 |
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; |
| 175 |
font-size: 16px; |
| 176 |
font-weight: bold; |
| 177 |
line-height: 130%; |
| 178 |
margin: .5em 0; |
| 179 |
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>; |
| 180 |
} |
| 181 |
|
| 182 |
#body_content_inner h1 { |
| 183 |
margin: 0 0 .5em 0; |
| 184 |
} |
| 185 |
|
| 186 |
#body_content_inner p + h1, |
| 187 |
#body_content_inner p + h2, |
| 188 |
#body_content_inner p + h3, |
| 189 |
#body_content_inner p + h4 { |
| 190 |
margin-top: 2em; |
| 191 |
} |
| 192 |
|
| 193 |
a { |
| 194 |
color: <?php echo esc_attr( $base ); ?>; |
| 195 |
font-weight: normal; |
| 196 |
text-decoration: underline; |
| 197 |
} |
| 198 |
|
| 199 |
img { |
| 200 |
border: none; |
| 201 |
display: inline; |
| 202 |
font-size: 14px; |
| 203 |
font-weight: bold; |
| 204 |
height: auto; |
| 205 |
line-height: 100%; |
| 206 |
outline: none; |
| 207 |
text-decoration: none; |
| 208 |
text-transform: capitalize; |
| 209 |
} |
| 210 |
|