| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Helper for IvyForms frontend inline styles |
| 5 |
* @copyright © Melograno Venture Studio. All rights reserved. |
| 6 |
* @licence See LICENCE.md for license details. |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace IvyForms\Services\Shortcode; |
| 10 |
|
| 11 |
// phpcs:disable PSR1.Files.SideEffects |
| 12 |
if (!defined('ABSPATH')) { |
| 13 |
exit; // Exit if accessed directly |
| 14 |
} |
| 15 |
class InlineStyleHelper |
| 16 |
{ |
| 17 |
/** |
| 18 |
* Returns the inline CSS for IvyForms frontend |
| 19 |
* @return string |
| 20 |
*/ |
| 21 |
public static function getFrontendInlineCss(): string |
| 22 |
{ |
| 23 |
return '.ivyforms-skeleton { |
| 24 |
width: 100%; |
| 25 |
max-width: 720px; |
| 26 |
margin: 0 auto; |
| 27 |
} |
| 28 |
|
| 29 |
.ivyforms-skeleton-title { |
| 30 |
height: 28px; |
| 31 |
width: 40%; |
| 32 |
background: #dbdee3; |
| 33 |
margin-bottom: 12px; |
| 34 |
} |
| 35 |
|
| 36 |
.ivyforms-skeleton-field { |
| 37 |
margin-bottom: 16px; |
| 38 |
} |
| 39 |
|
| 40 |
.ivyforms-skeleton-label { |
| 41 |
height: 22px; |
| 42 |
width: 20%; |
| 43 |
background: #dbdee3; |
| 44 |
font-size: 14px; |
| 45 |
border-radius: 4px; |
| 46 |
margin-bottom: 4px; |
| 47 |
} |
| 48 |
|
| 49 |
.ivyforms-skeleton-input { |
| 50 |
line-height: 22px; |
| 51 |
font-size: 16px; |
| 52 |
background: #dbdee3; |
| 53 |
border-radius: 8px; |
| 54 |
width: 100%; |
| 55 |
} |
| 56 |
|
| 57 |
.ivyforms-skeleton-email, |
| 58 |
.ivyforms-skeleton-textarea, |
| 59 |
.ivyforms-skeleton-text, |
| 60 |
.ivyforms-skeleton-number, |
| 61 |
.ivyforms-skeleton-phone { |
| 62 |
height: 40px; |
| 63 |
} |
| 64 |
|
| 65 |
.ivyforms-skeleton-textarea { |
| 66 |
height: 60px; |
| 67 |
} |
| 68 |
|
| 69 |
.ivyforms-skeleton-button { |
| 70 |
height: 40px; |
| 71 |
width: 100px; |
| 72 |
background: #c0c5cb; |
| 73 |
border-radius: 6px; |
| 74 |
margin-top: 12px; |
| 75 |
} |
| 76 |
|
| 77 |
.ivyforms-skeleton-animate { |
| 78 |
animation: pulse 1.5s infinite ease-in-out; |
| 79 |
} |
| 80 |
|
| 81 |
@keyframes pulse { |
| 82 |
0%, 100% { |
| 83 |
opacity: 1; |
| 84 |
} |
| 85 |
50% { |
| 86 |
opacity: 0.4; |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
.ivyforms-preview { |
| 91 |
width: 100%; |
| 92 |
max-width: 720px; |
| 93 |
margin: 0 auto; |
| 94 |
background: #fff; |
| 95 |
padding: 40px; |
| 96 |
} |
| 97 |
|
| 98 |
.ivyforms-preview h1 { |
| 99 |
font-size: 50px !important; |
| 100 |
font-weight: normal !important; |
| 101 |
margin-top: 0 !important; |
| 102 |
margin-left: 0 !important; |
| 103 |
margin-bottom: 20px !important; |
| 104 |
padding: 0 !important; |
| 105 |
}'; |
| 106 |
} |
| 107 |
} |
| 108 |
|