PluginProbe
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor / 2.0.13
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor v2.0.13
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.13, at blocks/before-after/style.css

569 lines 13.0 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 padding: 6px 10px;
260 border-radius: var(--bkbg-ba-label-radius);
261 max-width: 48%;
262 overflow: hidden;
263 text-overflow: ellipsis;
264 white-space: nowrap;
265 font-family: var(--bkbg-ba-label-font-family, inherit);
266 font-size: var(--bkbg-ba-label-font-size-d, var(--bkbg-ba-label-font-size, 13px));
267 font-weight: var(--bkbg-ba-label-font-weight, 600);
268 font-style: var(--bkbg-ba-label-font-style, normal);
269 text-transform: var(--bkbg-ba-label-text-transform, none);
270 text-decoration: var(--bkbg-ba-label-text-decoration, none);
271 line-height: var(--bkbg-ba-label-line-height-d, var(--bkbg-ba-label-line-height, 1.3));
272 letter-spacing: var(--bkbg-ba-label-letter-spacing-d, var(--bkbg-ba-label-letter-spacing, normal));
273 word-spacing: var(--bkbg-ba-label-word-spacing-d, var(--bkbg-ba-label-word-spacing, normal));
274 }
275
276 /* Accessible range input (covers the whole slider) */
277 .bkbg-ba-range {
278 position: absolute;
279 inset: 0;
280 width: 100%;
281 height: 100%;
282 opacity: 0;
283 cursor: ew-resize;
284 pointer-events: none;
285 }
286
287 .bkbg-ba-wrap.is-vertical .bkbg-ba-range {
288 cursor: ns-resize;
289 }
290
291 /* ========================================
292 Editor UI
293 ======================================== */
294
295 .editor-styles-wrapper .bkbg-ba-inner {
296 outline: 1px dashed rgba(0, 124, 186, 0.2);
297 outline-offset: -1px;
298 }
299
300 .editor-styles-wrapper .bkbg-ba-inner:hover {
301 outline-color: rgba(0, 124, 186, 0.4);
302 }
303
304 .bkbg-ba-empty-inner {
305 background: #f8fafc;
306 }
307
308 .bkbg-ba-empty-grid {
309 position: absolute;
310 inset: 0;
311 display: grid;
312 grid-template-columns: 1fr 1fr;
313 }
314
315 .bkbg-ba-empty-panel {
316 display: flex;
317 flex-direction: column;
318 align-items: center;
319 justify-content: center;
320 gap: 10px;
321 padding: 18px;
322 text-align: center;
323 color: #334155;
324 }
325
326 .bkbg-ba-empty-panel.is-before {
327 border-right: 1px dashed rgba(0, 0, 0, 0.18);
328 }
329
330 .bkbg-ba-empty-panel-title {
331 font-weight: 800;
332 font-size: 14px;
333 letter-spacing: 0.02em;
334 text-transform: uppercase;
335 color: rgba(15, 23, 42, 0.75);
336 }
337
338 .bkbg-ba-empty-copy {
339 font-weight: 600;
340 color: rgba(15, 23, 42, 0.7);
341 }
342
343 .bkbg-ba-empty-thumb {
344 width: min(320px, 90%);
345 height: 140px;
346 object-fit: cover;
347 border-radius: 10px;
348 border: 1px solid rgba(0,0,0,0.12);
349 background: #fff;
350 }
351
352 /* Inspector */
353 .bkbg-ba-media-row {
354 display: grid;
355 grid-template-columns: 1fr 1fr;
356 gap: 12px;
357 }
358
359 .bkbg-ba-media-title {
360 font-size: 12px;
361 font-weight: 600;
362 color: #334155;
363 margin-bottom: 6px;
364 }
365
366 .bkbg-ba-media-thumb {
367 width: 100%;
368 height: 90px;
369 object-fit: cover;
370 border-radius: 8px;
371 border: 1px solid rgba(0,0,0,0.1);
372 margin-bottom: 8px;
373 }
374
375 .bkbg-ba-media-placeholder {
376 width: 100%;
377 height: 90px;
378 border-radius: 8px;
379 border: 1px dashed rgba(0,0,0,0.2);
380 background: rgba(0,0,0,0.03);
381 display: flex;
382 align-items: center;
383 justify-content: center;
384 margin-bottom: 8px;
385 color: rgba(0,0,0,0.6);
386 font-size: 12px;
387 }
388
389 .bkbg-ba-color-row {
390 display: flex;
391 align-items: center;
392 justify-content: space-between;
393 gap: 12px;
394 margin-top: 10px;
395 }
396
397 .bkbg-ba-color-btn {
398 width: 30px;
399 height: 30px;
400 border-radius: 999px;
401 border: 2px solid #fff;
402 box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
403 cursor: pointer;
404 }
405
406 /* ========================================
407 Handle icon picker (editor)
408 ======================================== */
409
410 .bkbg-ba-icon-row {
411 display: flex;
412 align-items: center;
413 justify-content: space-between;
414 gap: 12px;
415 margin-top: 10px;
416 position: relative;
417 }
418
419 .bkbg-ba-icon-popover-anchor {
420 position: absolute;
421 width: 0;
422 height: 0;
423 overflow: visible;
424 right: 0;
425 top: 0;
426 }
427
428 .bkbg-ba-icon-row-label {
429 font-size: 13px;
430 }
431
432 .bkbg-ba-icon-picker-btn {
433 width: 40px;
434 height: 40px;
435 border-radius: 10px;
436 border: 1px solid rgba(0,0,0,0.12);
437 background: #fff;
438 display: inline-flex;
439 align-items: center;
440 justify-content: center;
441 cursor: pointer;
442 }
443
444 .bkbg-ba-icon-picker-btn .dashicons {
445 font-size: 18px;
446 width: 18px;
447 height: 18px;
448 }
449
450 .bkbg-ba-icon-btn-img {
451 width: 22px;
452 height: 22px;
453 object-fit: contain;
454 }
455
456 .bkbg-ba-icon-btn-none {
457 font-size: 11px;
458 font-weight: 700;
459 color: rgba(0,0,0,0.6);
460 }
461
462 .bkbg-ba-icon-popover .components-popover__content {
463 padding: 0;
464 }
465
466 .bkbg-ba-icon-picker-modal {
467 width: 360px;
468 max-width: 70vw;
469 }
470
471 .bkbg-ba-icon-picker-header {
472 display: flex;
473 align-items: center;
474 justify-content: space-between;
475 padding: 12px 12px 8px;
476 border-bottom: 1px solid rgba(0,0,0,0.08);
477 }
478
479 .bkbg-ba-icon-picker-header h3 {
480 margin: 0;
481 font-size: 14px;
482 }
483
484 .bkbg-ba-icon-actions {
485 display: flex;
486 gap: 8px;
487 padding: 12px 12px 0;
488 }
489
490 .bkbg-ba-icon-search {
491 padding: 8px 12px 0;
492 }
493
494 .bkbg-ba-dashicons-grid {
495 padding: 12px;
496 display: grid;
497 grid-template-columns: repeat(8, 1fr);
498 gap: 6px;
499 max-height: 280px;
500 overflow: auto;
501 }
502
503 .bkbg-ba-dashicon-btn {
504 width: 34px;
505 height: 34px;
506 border-radius: 8px;
507 border: 1px solid rgba(0,0,0,0.08);
508 background: #fff;
509 cursor: pointer;
510 display: inline-flex;
511 align-items: center;
512 justify-content: center;
513 }
514
515 .bkbg-ba-dashicon-btn.is-active {
516 border-color: rgba(0, 124, 186, 0.85);
517 box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.18);
518 }
519
520 .bkbg-ba-dashicon-btn .dashicons {
521 font-size: 18px;
522 width: 18px;
523 height: 18px;
524 }
525
526 .bkbg-ba-media-panel {
527 padding: 12px;
528 }
529
530 .bkbg-ba-current-media {
531 display: flex;
532 align-items: center;
533 justify-content: space-between;
534 gap: 12px;
535 margin-bottom: 10px;
536 }
537
538 .bkbg-ba-current-media img {
539 width: 56px;
540 height: 56px;
541 object-fit: contain;
542 background: #fff;
543 border: 1px solid rgba(0,0,0,0.12);
544 border-radius: 10px;
545 }
546
547 .bkbg-ba-media-hint {
548 margin: 10px 0 0;
549 font-size: 12px;
550 color: rgba(0,0,0,0.6);
551 }
552
553 @media (max-width: 1024px) {
554 .bkbg-ba-label {
555 font-size: var(--bkbg-ba-label-font-size-t, var(--bkbg-ba-label-font-size-d, var(--bkbg-ba-label-font-size, 13px)));
556 line-height: var(--bkbg-ba-label-line-height-t, var(--bkbg-ba-label-line-height-d, var(--bkbg-ba-label-line-height, 1.3)));
557 letter-spacing: var(--bkbg-ba-label-letter-spacing-t, var(--bkbg-ba-label-letter-spacing-d, var(--bkbg-ba-label-letter-spacing, normal)));
558 word-spacing: var(--bkbg-ba-label-word-spacing-t, var(--bkbg-ba-label-word-spacing-d, var(--bkbg-ba-label-word-spacing, normal)));
559 }
560 }
561 @media (max-width: 767px) {
562 .bkbg-ba-label {
563 font-size: var(--bkbg-ba-label-font-size-m, var(--bkbg-ba-label-font-size-t, var(--bkbg-ba-label-font-size-d, var(--bkbg-ba-label-font-size, 13px))));
564 line-height: var(--bkbg-ba-label-line-height-m, var(--bkbg-ba-label-line-height-t, var(--bkbg-ba-label-line-height-d, var(--bkbg-ba-label-line-height, 1.3))));
565 letter-spacing: var(--bkbg-ba-label-letter-spacing-m, var(--bkbg-ba-label-letter-spacing-t, var(--bkbg-ba-label-letter-spacing-d, var(--bkbg-ba-label-letter-spacing, normal))));
566 word-spacing: var(--bkbg-ba-label-word-spacing-m, var(--bkbg-ba-label-word-spacing-t, var(--bkbg-ba-label-word-spacing-d, var(--bkbg-ba-label-word-spacing, normal))));
567 }
568 }
569