PluginProbe ʕ •ᴥ•ʔ
FrontBlocks for Gutenberg/GeneratePress / 1.3.1
FrontBlocks for Gutenberg/GeneratePress v1.3.1
trunk 0.2.0 0.2.1 0.2.2 0.2.3 0.2.4 0.2.5 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.1.0 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 ci-artifacts
frontblocks / assets / shape-animations / frontblocks-shape-animations.css
frontblocks / assets / shape-animations Last commit date
frontblocks-shape-animation-option.js 7 months ago frontblocks-shape-animations.css 7 months ago frontblocks-shape-animations.js 7 months ago
frontblocks-shape-animations.css
135 lines
1 /**
2 * FrontBlocks Custom SVG Animations
3 * Base styles for custom SVG animations via JSON
4 */
5
6 /* Base animation class */
7 .frbl-custom-svg-animation {
8 display: inline-block;
9 animation-fill-mode: both;
10 animation-timing-function: ease-in-out;
11 }
12
13 /* Hover trigger: pause animation until hover */
14 .frbl-custom-svg-animation.frbl-shape-trigger-hover {
15 animation-play-state: paused;
16 }
17
18 .frbl-custom-svg-animation.frbl-shape-trigger-hover:hover {
19 animation-play-state: running;
20 }
21
22 /* Respect user's motion preferences */
23 @media (prefers-reduced-motion: reduce) {
24 .frbl-custom-svg-animation,
25 .frbl-custom-svg-animation:hover {
26 animation: none !important;
27 transition: none !important;
28 }
29 }
30
31 /* Editor preview support */
32 .block-editor-block-list__block .frbl-custom-svg-animation.frbl-shape-trigger-load {
33 animation-play-state: running;
34 }
35
36 /* Show hover state in editor for better UX */
37 .block-editor-block-list__block.is-selected .frbl-custom-svg-animation.frbl-shape-trigger-hover {
38 opacity: 0.9;
39 }
40
41 /* Ensure SVG inherits size from parent */
42 .frbl-custom-svg-animation svg {
43 width: 100%;
44 height: 100%;
45 display: block;
46 }
47
48 /* ========================================
49 LOTTIE ANIMATIONS
50 ======================================== */
51
52 /* Lottie animation container */
53 .frbl-lottie-animation {
54 display: block;
55 position: relative;
56 opacity: 0;
57 transition: opacity 0.1s ease-in;
58 }
59
60 /* Show Lottie after color is applied */
61 .frbl-lottie-animation.frbl-color-applied {
62 opacity: 1;
63 }
64
65 /* Lottie preview in editor */
66 .frbl-lottie-preview {
67 display: block;
68 position: relative;
69 width: 100%;
70 height: 100%;
71 min-width: 48px;
72 min-height: 48px;
73 opacity: 1 !important;
74 }
75
76 /* Wrapper for blocks with Lottie */
77 .frbl-has-lottie-animation {
78 display: inline-block;
79 }
80
81 /* Hide original Shape SVG when Lottie is active (frontend) */
82 .frbl-has-lottie-animation .gb-shape > svg {
83 display: none !important;
84 }
85
86 /* Hide original Shape SVG when Lottie preview is active (editor) */
87 .block-editor-block-list__block .gb-shape:has(.frbl-lottie-preview) > svg {
88 display: none !important;
89 }
90
91 /* Ensure Lottie SVG scales properly and inherits size */
92 .frbl-lottie-animation svg,
93 .frbl-lottie-preview svg {
94 width: 100% !important;
95 height: 100% !important;
96 max-width: 100%;
97 max-height: 100%;
98 }
99
100 /* Color inheritance for Lottie - Base rule (will be overridden by JS for better control) */
101 .frbl-lottie-animation path[fill]:not([fill="none"]),
102 .frbl-lottie-animation ellipse[fill]:not([fill="none"]),
103 .frbl-lottie-animation circle[fill]:not([fill="none"]),
104 .frbl-lottie-animation rect[fill]:not([fill="none"]),
105 .frbl-lottie-animation polygon[fill]:not([fill="none"]),
106 .frbl-lottie-animation polyline[fill]:not([fill="none"]),
107 .frbl-lottie-preview path[fill]:not([fill="none"]),
108 .frbl-lottie-preview ellipse[fill]:not([fill="none"]),
109 .frbl-lottie-preview circle[fill]:not([fill="none"]),
110 .frbl-lottie-preview rect[fill]:not([fill="none"]),
111 .frbl-lottie-preview polygon[fill]:not([fill="none"]),
112 .frbl-lottie-preview polyline[fill]:not([fill="none"]) {
113 fill: var(--lottie-color, currentColor) !important;
114 }
115
116 /* Editor preview support for Lottie */
117 .block-editor-block-list__block .frbl-lottie-animation {
118 pointer-events: auto;
119 }
120
121 /* Respect user's motion preferences for Lottie */
122 @media (prefers-reduced-motion: reduce) {
123 .frbl-lottie-animation {
124 display: none;
125 }
126
127 /* Show a fallback or warning */
128 .frbl-has-lottie-animation::before {
129 content: "Animation disabled (motion preferences)";
130 font-size: 12px;
131 color: #666;
132 display: block;
133 }
134 }
135