PluginProbe
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor / 2.0.6
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor v2.0.6
2.0.13 2.0.12 2.0.11 2.0.10 2.0.9 trunk 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8
blockenberg / blocks / before-after / style.css

style.css in Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor 2.0.6, at blocks/before-after/style.css

545 lines 11.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* ========================================
2 Before/After Slider
3 ======================================== */
4
5 /* Some themes add borders/outlines to block wrappers; keep it clean by default. */
6 .wp-block-blockenberg-before-after,
7 .wp-block-blockenberg-before-after .bkbg-ba-wrap {
8 border: 0;
9 outline: 0;
10 }
11
12 .bkbg-ba-wrap {
13 --bkbg-ba-pos: 50%;
14 --bkbg-ba-radius: 12px;
15 --bkbg-ba-handle-size: 44px;
16 --bkbg-ba-handle-bg: #007cba;
17 --bkbg-ba-handle-color: #ffffff;
18 --bkbg-ba-line-color: rgba(255, 255, 255, 0.95);
19 --bkbg-ba-line-width: 2px;
20
21 --bkbg-ba-label-bg: rgba(0, 0, 0, 0.55);
22 --bkbg-ba-label-color: #ffffff;
23 --bkbg-ba-label-size: 13px;
24 --bkbg-ba-label-radius: 6px;
25
26 --bkbg-ba-min-height: 260px;
27
28 width: 100%;
29 }
30
31 .bkbg-ba-aspect {
32 width: 100%;
33 }
34
35 .bkbg-ba-inner {
36 position: relative;
37 width: 100%;
38 min-height: var(--bkbg-ba-min-height);
39 border-radius: var(--bkbg-ba-radius);
40 overflow: hidden;
41 background: #f3f4f6;
42 user-select: none;
43 touch-action: none;
44 }
45
46 .bkbg-ba-wrap.has-shadow .bkbg-ba-inner {
47 box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
48 }
49
50 .bkbg-ba-layer {
51 position: absolute;
52 inset: 0;
53 }
54
55 .bkbg-ba-layer img {
56 width: 100%;
57 height: 100%;
58 object-fit: cover;
59 display: block;
60 }
61
62 /* After overlay */
63 .bkbg-ba-after {
64 /* Keep the layer full-size and clip it instead of resizing it,
65 so the image never stretches while the slider moves. */
66 clip-path: inset(0 0 0 0);
67 }
68
69 .bkbg-ba-wrap.is-horizontal .bkbg-ba-after {
70 clip-path: inset(0 calc(100% - var(--bkbg-ba-pos)) 0 0);
71 }
72
73 .bkbg-ba-wrap.is-vertical .bkbg-ba-after {
74 clip-path: inset(0 0 calc(100% - var(--bkbg-ba-pos)) 0);
75 }
76
77 /* Divider line + handle */
78 .bkbg-ba-divider {
79 position: absolute;
80 top: 0;
81 bottom: 0;
82 left: 0;
83 right: 0;
84 pointer-events: auto;
85 }
86
87 .bkbg-ba-wrap.is-horizontal .bkbg-ba-divider {
88 top: 0;
89 bottom: 0;
90 left: calc(var(--bkbg-ba-pos) - (var(--bkbg-ba-line-width) / 2));
91 width: var(--bkbg-ba-line-width);
92 right: auto;
93 }
94
95 .bkbg-ba-wrap.is-vertical .bkbg-ba-divider {
96 left: 0;
97 right: 0;
98 top: calc(var(--bkbg-ba-pos) - (var(--bkbg-ba-line-width) / 2));
99 height: var(--bkbg-ba-line-width);
100 bottom: auto;
101 }
102
103 .bkbg-ba-divider::before {
104 content: '';
105 position: absolute;
106 inset: 0;
107 background: var(--bkbg-ba-line-color);
108 pointer-events: none;
109 }
110
111 .bkbg-ba-handle {
112 position: absolute;
113 left: 50%;
114 top: 50%;
115 width: var(--bkbg-ba-handle-size);
116 height: var(--bkbg-ba-handle-size);
117 transform: translate(-50%, -50%);
118 cursor: grab;
119 }
120
121 .bkbg-ba-handle-surface {
122 position: relative;
123 width: 100%;
124 height: 100%;
125 display: block;
126 transition: transform 160ms ease;
127 }
128
129 .bkbg-ba-handle-anim {
130 position: absolute;
131 inset: 0;
132 display: flex;
133 align-items: center;
134 justify-content: center;
135 background: var(--bkbg-ba-handle-bg);
136 color: var(--bkbg-ba-handle-color);
137 box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
138 }
139
140 .bkbg-ba-handle-hover {
141 display: inline-flex;
142 align-items: center;
143 justify-content: center;
144 }
145
146 .bkbg-ba-wrap.has-handle-hover .bkbg-ba-handle:hover .bkbg-ba-handle-surface {
147 transform: scale(var(--bkbg-ba-handle-hover-scale));
148 }
149
150 .bkbg-ba-wrap:active .bkbg-ba-handle {
151 cursor: grabbing;
152 }
153
154 .bkbg-ba-handle.is-circle {
155 border-radius: 999px;
156 }
157
158 .bkbg-ba-handle.is-square {
159 border-radius: 10px;
160 }
161
162 .bkbg-ba-handle.is-circle .bkbg-ba-handle-anim {
163 border-radius: 999px;
164 }
165
166 .bkbg-ba-handle.is-square .bkbg-ba-handle-anim {
167 border-radius: 10px;
168 }
169
170 .bkbg-ba-handle-icon {
171 font-size: var(--bkbg-ba-handle-icon-size);
172 width: var(--bkbg-ba-handle-icon-size);
173 height: var(--bkbg-ba-handle-icon-size);
174 line-height: 1;
175 }
176
177 .bkbg-ba-handle-img {
178 width: var(--bkbg-ba-handle-icon-size);
179 height: var(--bkbg-ba-handle-icon-size);
180 object-fit: contain;
181 display: block;
182 filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
183 }
184
185 /* Handle hover animations */
186 .bkbg-ba-wrap.has-handle-anim .bkbg-ba-handle-anim {
187 animation-duration: var(--bkbg-ba-handle-anim-dur);
188 animation-timing-function: ease-in-out;
189 animation-iteration-count: infinite;
190 }
191
192 /* Do not animate while hovering/dragging the handle */
193 .bkbg-ba-wrap.has-handle-anim .bkbg-ba-handle:hover .bkbg-ba-handle-anim,
194 .bkbg-ba-wrap.has-handle-anim .bkbg-ba-handle:active .bkbg-ba-handle-anim {
195 animation-play-state: paused;
196 }
197
198 .bkbg-ba-wrap.has-handle-anim.is-handle-anim-pulse .bkbg-ba-handle-anim {
199 animation-name: bkbgBaPulse;
200 }
201
202 .bkbg-ba-wrap.has-handle-anim.is-handle-anim-wiggle .bkbg-ba-handle-anim {
203 animation-name: bkbgBaWiggle;
204 }
205
206 .bkbg-ba-wrap.has-handle-anim.is-handle-anim-bounce .bkbg-ba-handle-anim {
207 animation-name: bkbgBaBounce;
208 }
209
210 .bkbg-ba-wrap.has-handle-anim.is-handle-anim-glow .bkbg-ba-handle-anim {
211 animation-name: bkbgBaGlow;
212 }
213
214 @keyframes bkbgBaPulse {
215 0%, 100% { transform: scale(1); }
216 50% { transform: scale(1.08); }
217 }
218
219 @keyframes bkbgBaWiggle {
220 0%, 100% { transform: rotate(0deg); }
221 25% { transform: rotate(-10deg); }
222 75% { transform: rotate(10deg); }
223 }
224
225 @keyframes bkbgBaBounce {
226 0%, 100% { transform: translateY(0) scale(1); }
227 40% { transform: translateY(-8px) scale(1.04); }
228 60% { transform: translateY(3px) scale(0.98); }
229 }
230
231 @keyframes bkbgBaGlow {
232 0%, 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }
233 50% { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), 0 0 0 10px rgba(255,255,255,0.12); }
234 }
235
236 /* Labels */
237 .bkbg-ba-labels {
238 position: absolute;
239 left: 0;
240 right: 0;
241 display: flex;
242 justify-content: space-between;
243 padding: 14px;
244 pointer-events: none;
245 z-index: 2;
246 }
247
248 .bkbg-ba-labels.is-top {
249 top: 0;
250 }
251
252 .bkbg-ba-labels.is-bottom {
253 bottom: 0;
254 }
255
256 .bkbg-ba-label {
257 background: var(--bkbg-ba-label-bg);
258 color: var(--bkbg-ba-label-color);
259 font-size: var(--bkbg-ba-label-size);
260 font-weight: 600;
261 padding: 6px 10px;
262 border-radius: var(--bkbg-ba-label-radius);
263 max-width: 48%;
264 overflow: hidden;
265 text-overflow: ellipsis;
266 white-space: nowrap;
267 }
268
269 /* Accessible range input (covers the whole slider) */
270 .bkbg-ba-range {
271 position: absolute;
272 inset: 0;
273 width: 100%;
274 height: 100%;
275 opacity: 0;
276 cursor: ew-resize;
277 pointer-events: none;
278 }
279
280 .bkbg-ba-wrap.is-vertical .bkbg-ba-range {
281 cursor: ns-resize;
282 }
283
284 /* ========================================
285 Editor UI
286 ======================================== */
287
288 .editor-styles-wrapper .bkbg-ba-inner {
289 outline: 1px dashed rgba(0, 124, 186, 0.2);
290 outline-offset: -1px;
291 }
292
293 .editor-styles-wrapper .bkbg-ba-inner:hover {
294 outline-color: rgba(0, 124, 186, 0.4);
295 }
296
297 .bkbg-ba-empty-inner {
298 background: #f8fafc;
299 }
300
301 .bkbg-ba-empty-grid {
302 position: absolute;
303 inset: 0;
304 display: grid;
305 grid-template-columns: 1fr 1fr;
306 }
307
308 .bkbg-ba-empty-panel {
309 display: flex;
310 flex-direction: column;
311 align-items: center;
312 justify-content: center;
313 gap: 10px;
314 padding: 18px;
315 text-align: center;
316 color: #334155;
317 }
318
319 .bkbg-ba-empty-panel.is-before {
320 border-right: 1px dashed rgba(0, 0, 0, 0.18);
321 }
322
323 .bkbg-ba-empty-panel-title {
324 font-weight: 800;
325 font-size: 14px;
326 letter-spacing: 0.02em;
327 text-transform: uppercase;
328 color: rgba(15, 23, 42, 0.75);
329 }
330
331 .bkbg-ba-empty-copy {
332 font-weight: 600;
333 color: rgba(15, 23, 42, 0.7);
334 }
335
336 .bkbg-ba-empty-thumb {
337 width: min(320px, 90%);
338 height: 140px;
339 object-fit: cover;
340 border-radius: 10px;
341 border: 1px solid rgba(0,0,0,0.12);
342 background: #fff;
343 }
344
345 /* Inspector */
346 .bkbg-ba-media-row {
347 display: grid;
348 grid-template-columns: 1fr 1fr;
349 gap: 12px;
350 }
351
352 .bkbg-ba-media-title {
353 font-size: 12px;
354 font-weight: 600;
355 color: #334155;
356 margin-bottom: 6px;
357 }
358
359 .bkbg-ba-media-thumb {
360 width: 100%;
361 height: 90px;
362 object-fit: cover;
363 border-radius: 8px;
364 border: 1px solid rgba(0,0,0,0.1);
365 margin-bottom: 8px;
366 }
367
368 .bkbg-ba-media-placeholder {
369 width: 100%;
370 height: 90px;
371 border-radius: 8px;
372 border: 1px dashed rgba(0,0,0,0.2);
373 background: rgba(0,0,0,0.03);
374 display: flex;
375 align-items: center;
376 justify-content: center;
377 margin-bottom: 8px;
378 color: rgba(0,0,0,0.6);
379 font-size: 12px;
380 }
381
382 .bkbg-ba-color-row {
383 display: flex;
384 align-items: center;
385 justify-content: space-between;
386 gap: 12px;
387 margin-top: 10px;
388 }
389
390 .bkbg-ba-color-btn {
391 width: 30px;
392 height: 30px;
393 border-radius: 999px;
394 border: 2px solid #fff;
395 box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
396 cursor: pointer;
397 }
398
399 /* ========================================
400 Handle icon picker (editor)
401 ======================================== */
402
403 .bkbg-ba-icon-row {
404 display: flex;
405 align-items: center;
406 justify-content: space-between;
407 gap: 12px;
408 margin-top: 10px;
409 position: relative;
410 }
411
412 .bkbg-ba-icon-popover-anchor {
413 position: absolute;
414 width: 0;
415 height: 0;
416 overflow: visible;
417 right: 0;
418 top: 0;
419 }
420
421 .bkbg-ba-icon-row-label {
422 font-size: 13px;
423 }
424
425 .bkbg-ba-icon-picker-btn {
426 width: 40px;
427 height: 40px;
428 border-radius: 10px;
429 border: 1px solid rgba(0,0,0,0.12);
430 background: #fff;
431 display: inline-flex;
432 align-items: center;
433 justify-content: center;
434 cursor: pointer;
435 }
436
437 .bkbg-ba-icon-picker-btn .dashicons {
438 font-size: 18px;
439 width: 18px;
440 height: 18px;
441 }
442
443 .bkbg-ba-icon-btn-img {
444 width: 22px;
445 height: 22px;
446 object-fit: contain;
447 }
448
449 .bkbg-ba-icon-btn-none {
450 font-size: 11px;
451 font-weight: 700;
452 color: rgba(0,0,0,0.6);
453 }
454
455 .bkbg-ba-icon-popover .components-popover__content {
456 padding: 0;
457 }
458
459 .bkbg-ba-icon-picker-modal {
460 width: 360px;
461 max-width: 70vw;
462 }
463
464 .bkbg-ba-icon-picker-header {
465 display: flex;
466 align-items: center;
467 justify-content: space-between;
468 padding: 12px 12px 8px;
469 border-bottom: 1px solid rgba(0,0,0,0.08);
470 }
471
472 .bkbg-ba-icon-picker-header h3 {
473 margin: 0;
474 font-size: 14px;
475 }
476
477 .bkbg-ba-icon-actions {
478 display: flex;
479 gap: 8px;
480 padding: 12px 12px 0;
481 }
482
483 .bkbg-ba-icon-search {
484 padding: 8px 12px 0;
485 }
486
487 .bkbg-ba-dashicons-grid {
488 padding: 12px;
489 display: grid;
490 grid-template-columns: repeat(8, 1fr);
491 gap: 6px;
492 max-height: 280px;
493 overflow: auto;
494 }
495
496 .bkbg-ba-dashicon-btn {
497 width: 34px;
498 height: 34px;
499 border-radius: 8px;
500 border: 1px solid rgba(0,0,0,0.08);
501 background: #fff;
502 cursor: pointer;
503 display: inline-flex;
504 align-items: center;
505 justify-content: center;
506 }
507
508 .bkbg-ba-dashicon-btn.is-active {
509 border-color: rgba(0, 124, 186, 0.85);
510 box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.18);
511 }
512
513 .bkbg-ba-dashicon-btn .dashicons {
514 font-size: 18px;
515 width: 18px;
516 height: 18px;
517 }
518
519 .bkbg-ba-media-panel {
520 padding: 12px;
521 }
522
523 .bkbg-ba-current-media {
524 display: flex;
525 align-items: center;
526 justify-content: space-between;
527 gap: 12px;
528 margin-bottom: 10px;
529 }
530
531 .bkbg-ba-current-media img {
532 width: 56px;
533 height: 56px;
534 object-fit: contain;
535 background: #fff;
536 border: 1px solid rgba(0,0,0,0.12);
537 border-radius: 10px;
538 }
539
540 .bkbg-ba-media-hint {
541 margin: 10px 0 0;
542 font-size: 12px;
543 color: rgba(0,0,0,0.6);
544 }
545