| @@ -18,13 +18,19 @@ | ||
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | $styles = $frm_style->get_all(); |
| 21 | 21 | $default_style = $frm_style->get_default_style( $styles ); |
| 22 | -$defaults = FrmStylesHelper::get_settings_for_output( $default_style ); | |
| 23 | -$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 24 | 22 | $pro_is_installed = FrmAppHelper::pro_is_installed(); |
| 25 | -$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 26 | 23 | |
| 24 | +if ( ! $pro_is_installed && $default_style ) { | |
| 25 | + // Per-form styles are a Pro feature, so only the default style is ever used without Pro. | |
| 26 | + $styles = array( $default_style->ID => $default_style ); | |
| 27 | +} | |
| 28 | + | |
| 29 | +$defaults = FrmStylesHelper::get_settings_for_output( $default_style ); | |
| 30 | +$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 31 | +$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 32 | + | |
| 27 | 33 | ?> |
| 28 | 34 | .with_frm_style{ |
| 29 | 35 | <?php FrmStylesHelper::output_vars( $defaults ); ?> |
| 30 | 36 | } |
| @@ -142,13 +148,14 @@ | ||
| 142 | 148 | color: var(--form-desc-color)<?php echo esc_html( $important ); ?>; |
| 143 | 149 | <?php } ?> |
| 144 | 150 | } |
| 145 | 151 | |
| 152 | +.with_frm_style .frm_form_field.frm_html_container{ | |
| 146 | 153 | <?php if ( ! empty( $defaults['form_desc_size'] ) ) { ?> |
| 147 | -.with_frm_style .frm_form_field.frm_html_container{ | |
| 148 | 154 | font-size: var(--form-desc-size)<?php echo esc_html( $important ); ?>; |
| 155 | +<?php } ?> | |
| 156 | + overflow-wrap: break-word<?php echo esc_html( $important ); ?>; | |
| 149 | 157 | } |
| 150 | -<?php } ?> | |
| 151 | 158 | |
| 152 | 159 | .with_frm_style .frm_form_field .frm_show_it{ |
| 153 | 160 | <?php if ( ! empty( $defaults['field_font_size'] ) ) { ?> |
| 154 | 161 | font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; |
| @@ -227,8 +234,13 @@ | ||
| 227 | 234 | outline: none<?php echo esc_html( $important ); ?>; |
| 228 | 235 | font-weight: var(--field-weight); |
| 229 | 236 | } |
| 230 | 237 | |
| 238 | +.with_frm_style input:-webkit-autofill:focus { | |
| 239 | + /* Prevent the user agent autofill background color from taking effect on focus. */ | |
| 240 | + transition: background-color 5000s ease-in-out 0s<?php echo esc_html( $important ); ?>; | |
| 241 | +} | |
| 242 | + | |
| 231 | 243 | <?php if ( $important ) : ?> |
| 232 | 244 | <?php if ( $use_chosen_js ) { ?> |
| 233 | 245 | .with_frm_style .chosen-container-multi .chosen-choices, |
| 234 | 246 | .with_frm_style .chosen-container-single .chosen-single, |
| @@ -562,9 +574,8 @@ | ||
| 562 | 574 | <?php } else { ?> |
| 563 | 575 | padding:5px; |
| 564 | 576 | <?php } ?> |
| 565 | 577 | <?php if ( ! empty( $defaults['border_radius'] ) ) { ?> |
| 566 | - border-radius:<?php echo esc_html( $defaults['border_radius'] . $important ); ?>; | |
| 567 | 578 | border-radius:var(--border-radius)<?php echo esc_html( $important ); ?>; |
| 568 | 579 | <?php } ?> |
| 569 | 580 | <?php if ( ! empty( $defaults['submit_font_size'] ) ) { ?> |
| 570 | 581 | font-size: var(--submit-font-size)<?php echo esc_html( $important ); ?>; |
| @@ -1351,105 +1362,8 @@ | ||
| 1351 | 1362 | .frm_grid .frm_checkbox, |
| 1352 | 1363 | .frm_grid_first .frm_checkbox, |
| 1353 | 1364 | .frm_grid_odd .frm_checkbox{ |
| 1354 | 1365 | display:inline; |
| 1355 | -} | |
| 1356 | - | |
| 1357 | -.frm_grid_2 .frm_radio, | |
| 1358 | -.frm_grid_2 .frm_checkbox, | |
| 1359 | -.frm_grid_2 .frm_primary_label{ | |
| 1360 | - width:48% !important; | |
| 1361 | -} | |
| 1362 | - | |
| 1363 | -.frm_grid_2 .frm_radio, | |
| 1364 | -.frm_grid_2 .frm_checkbox{ | |
| 1365 | - margin-right:4%; | |
| 1366 | -} | |
| 1367 | - | |
| 1368 | -.frm_grid_3 .frm_radio, | |
| 1369 | -.frm_grid_3 .frm_checkbox, | |
| 1370 | -.frm_grid_3 .frm_primary_label{ | |
| 1371 | - width:30% !important; | |
| 1372 | -} | |
| 1373 | - | |
| 1374 | -.frm_grid_3 .frm_radio, | |
| 1375 | -.frm_grid_3 .frm_checkbox{ | |
| 1376 | - margin-right:3%; | |
| 1377 | -} | |
| 1378 | - | |
| 1379 | -.frm_grid_4 .frm_radio, | |
| 1380 | -.frm_grid_4 .frm_checkbox{ | |
| 1381 | - width:20% !important; | |
| 1382 | -} | |
| 1383 | - | |
| 1384 | -.frm_grid_4 .frm_primary_label{ | |
| 1385 | - width:28% !important; | |
| 1386 | -} | |
| 1387 | - | |
| 1388 | -.frm_grid_4 .frm_radio, | |
| 1389 | -.frm_grid_4 .frm_checkbox{ | |
| 1390 | - margin-right:4%; | |
| 1391 | -} | |
| 1392 | - | |
| 1393 | -.frm_grid_5 .frm_primary_label, | |
| 1394 | -.frm_grid_7 .frm_primary_label{ | |
| 1395 | - width:24% !important; | |
| 1396 | -} | |
| 1397 | - | |
| 1398 | -.frm_grid_5 .frm_radio, | |
| 1399 | -.frm_grid_5 .frm_checkbox{ | |
| 1400 | - width:17% !important; | |
| 1401 | - margin-right:2%; | |
| 1402 | -} | |
| 1403 | - | |
| 1404 | -.frm_grid_6 .frm_primary_label{ | |
| 1405 | - width:25% !important; | |
| 1406 | -} | |
| 1407 | - | |
| 1408 | -.frm_grid_6 .frm_radio, | |
| 1409 | -.frm_grid_6 .frm_checkbox{ | |
| 1410 | - width:14% !important; | |
| 1411 | - margin-right:1%; | |
| 1412 | -} | |
| 1413 | - | |
| 1414 | -.frm_grid_7 .frm_primary_label{ | |
| 1415 | - width:22% !important; | |
| 1416 | -} | |
| 1417 | - | |
| 1418 | -.frm_grid_7 .frm_radio, | |
| 1419 | -.frm_grid_7 .frm_checkbox{ | |
| 1420 | - width:12% !important; | |
| 1421 | - margin-right:1%; | |
| 1422 | -} | |
| 1423 | - | |
| 1424 | -.frm_grid_8 .frm_primary_label{ | |
| 1425 | - width:23% !important; | |
| 1426 | -} | |
| 1427 | - | |
| 1428 | -.frm_grid_8 .frm_radio, | |
| 1429 | -.frm_grid_8 .frm_checkbox{ | |
| 1430 | - width:10% !important; | |
| 1431 | - margin-right:1%; | |
| 1432 | -} | |
| 1433 | - | |
| 1434 | -.frm_grid_9 .frm_primary_label{ | |
| 1435 | - width:20% !important; | |
| 1436 | -} | |
| 1437 | - | |
| 1438 | -.frm_grid_9 .frm_radio, | |
| 1439 | -.frm_grid_9 .frm_checkbox{ | |
| 1440 | - width:9% !important; | |
| 1441 | - margin-right:1%; | |
| 1442 | -} | |
| 1443 | - | |
| 1444 | -.frm_grid_10 .frm_primary_label{ | |
| 1445 | - width:19% !important; | |
| 1446 | -} | |
| 1447 | - | |
| 1448 | -.frm_grid_10 .frm_radio, | |
| 1449 | -.frm_grid_10 .frm_checkbox{ | |
| 1450 | - width:8% !important; | |
| 1451 | - margin-right:1%; | |
| 1452 | 1366 | } |
| 1453 | 1367 | |
| 1454 | 1368 | .frm_form_field.frm_inline_container .frm_opt_container, |
| 1455 | 1369 | .frm_form_field.frm_right_container .frm_opt_container, |