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 / flip-card / style.css

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

179 lines 5.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* ============================================================
2 Flip Card — style.css
3 Blockenberg plugin
4 ============================================================ */
5
6 /* ── Scene wrapper (alignment) ──────────────────────────── */
7 .bkbg-fc-scene {
8 display: flex;
9 width: 100%;
10 }
11
12 /* ── Outer: perspective container ───────────────────────── */
13 .bkbg-fc-outer {
14 width: var(--bkbg-fc-w, 280px);
15 height: var(--bkbg-fc-h, 320px);
16 perspective: 1000px;
17 cursor: pointer;
18 box-sizing: border-box;
19 }
20
21 /* Click-trigger: no special cursor difference needed */
22 /* .bkbg-fc-outer:focus {
23 outline: 2px solid #3b82f6;
24 outline-offset: 3px;
25 } */
26
27 /* ── Inner: the actual flipping element ─────────────────── */
28 .bkbg-fc-inner {
29 width: 100%;
30 height: 100%;
31 position: relative;
32 transform-style: preserve-3d;
33 transition: transform var(--bkbg-fc-speed, 500ms) ease;
34 border-radius: var(--bkbg-fc-radius, 16px);
35 box-shadow: var(--bkbg-fc-shadow, 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06));
36 }
37
38 /* ── Hover trigger ──────────────────────────────────────── */
39 .bkbg-fc-outer[data-flip-trigger="hover"]:hover .bkbg-fc-inner,
40 .bkbg-fc-outer[data-flip-trigger="hover"]:focus .bkbg-fc-inner {
41 transform: rotateY(180deg);
42 }
43
44 .bkbg-fc-outer[data-flip-dir="vertical"][data-flip-trigger="hover"]:hover .bkbg-fc-inner,
45 .bkbg-fc-outer[data-flip-dir="vertical"][data-flip-trigger="hover"]:focus .bkbg-fc-inner {
46 transform: rotateX(180deg);
47 }
48
49 /* ── Click trigger (JS adds data-flipped) ───────────────── */
50 .bkbg-fc-outer[data-flip-trigger="click"][data-flipped="true"] .bkbg-fc-inner {
51 transform: rotateY(180deg);
52 }
53
54 .bkbg-fc-outer[data-flip-dir="vertical"][data-flip-trigger="click"][data-flipped="true"] .bkbg-fc-inner {
55 transform: rotateX(180deg);
56 }
57
58 /* ── Both faces ─────────────────────────────────────────── */
59 .bkbg-fc-face {
60 position: absolute;
61 inset: 0;
62 display: flex;
63 flex-direction: column;
64 justify-content: center;
65 box-sizing: border-box;
66 backface-visibility: hidden;
67 -webkit-backface-visibility: hidden;
68 overflow: hidden;
69 border-radius: var(--bkbg-fc-radius, 16px);
70 }
71
72 /* ── Front face ─────────────────────────────────────────── */
73 .bkbg-fc-front {
74 background: #ffffff;
75 /* rotation = 0° already faces viewer */
76 }
77
78 /* ── Back face ──────────────────────────────────────────── */
79 .bkbg-fc-back {
80 background: #3b82f6;
81 transform: rotateY(180deg);
82 }
83
84 .bkbg-fc-outer[data-flip-dir="vertical"] .bkbg-fc-back {
85 transform: rotateX(180deg);
86 }
87
88 /* ── Icon wrapper ───────────────────────────────────────── */
89 .bkbg-fc-icon-wrap {
90 flex-shrink: 0;
91 }
92
93 .bkbg-fc-icon {
94 display: inline-flex;
95 align-items: center;
96 justify-content: center;
97 width: var(--bkbg-fc-icon-size, 48px);
98 height: var(--bkbg-fc-icon-size, 48px);
99 color: var(--bkbg-fc-icon-color, currentColor);
100 flex-shrink: 0;
101 }
102
103 .bkbg-fc-icon svg {
104 display: block;
105 width: var(--bkbg-fc-icon-size, 48px);
106 height: var(--bkbg-fc-icon-size, 48px);
107 fill: currentColor;
108 }
109
110 .bkbg-fc-icon .dashicons {
111 font-size: var(--bkbg-fc-icon-size, 48px);
112 width: var(--bkbg-fc-icon-size, 48px);
113 height: var(--bkbg-fc-icon-size, 48px);
114 color: inherit;
115 }
116
117 .bkbg-fc-char {
118 font-size: var(--bkbg-fc-icon-size, 48px);
119 line-height: 1;
120 display: block;
121 color: inherit;
122 }
123
124 /* ── Front title ────────────────────────────────────────── */
125 .bkbg-fc-front-title,
126 .bkbg-fc-face .bkbg-fc-front-title {
127 margin: 0;
128 padding: 0;
129 }
130
131 /* ── Subtitle / tag line ────────────────────────────────── */
132 .bkbg-fc-sub,
133 .bkbg-fc-face .bkbg-fc-sub {
134 margin: 0;
135 padding: 0;
136 }
137
138 /* ── Flip hint ──────────────────────────────────────────── */
139 .bkbg-fc-hint {
140 margin: 0;
141 padding: 0;
142 }
143
144 /* ── Back title ─────────────────────────────────────────── */
145 .bkbg-fc-back-title,
146 .bkbg-fc-face .bkbg-fc-back-title {
147 margin: 0;
148 padding: 0;
149 }
150
151 /* ── Back body text ─────────────────────────────────────── */
152 .bkbg-fc-back-text,
153 .bkbg-fc-face .bkbg-fc-back-text {
154 margin: 0;
155 padding: 0;
156 }
157
158 /* ── Button ─────────────────────────────────────────────── */
159 .bkbg-fc-btn {
160 display: inline-block;
161 text-decoration: none;
162 line-height: 1.2;
163 white-space: nowrap;
164 transition: opacity .15s ease, transform .15s ease;
165 cursor: pointer;
166 }
167
168 .bkbg-fc-btn:hover {
169 opacity: .85;
170 transform: translateY(-1px);
171 }
172
173 /* ── Reduced motion ─────────────────────────────────────── */
174 @media (prefers-reduced-motion: reduce) {
175 .bkbg-fc-inner {
176 transition: none;
177 }
178 }
179