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

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

349 lines 8.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* ========================================
2 Accordion Block Styles
3 Prefix: bkbg-ac-
4 ======================================== */
5
6 /* CSS Custom Properties */
7 .bkbg-ac-wrap {
8 --bkbg-ac-gap: 12px;
9 --bkbg-ac-radius: 8px;
10 --bkbg-ac-brd-w: 1px;
11 --bkbg-ac-brd-style: solid;
12 --bkbg-ac-header-padding: 16px 20px;
13 --bkbg-ac-content-padding: 16px 20px 20px;
14 --bkbg-ac-header-bg: #f8fafc;
15 --bkbg-ac-header-bg-hover: #f1f5f9;
16 --bkbg-ac-header-bg-active: #e2e8f0;
17 --bkbg-ac-header-color: #1e293b;
18 --bkbg-ac-header-color-hover: #0f172a;
19 --bkbg-ac-header-color-active: #0f172a;
20 --bkbg-ac-content-bg: #ffffff;
21 --bkbg-ac-content-color: #475569;
22 --bkbg-ac-border-color: #e2e8f0;
23 --bkbg-ac-border-color-active: #cbd5e1;
24 --bkbg-ac-icon-color: #64748b;
25 --bkbg-ac-icon-color-active: #3b82f6;
26 --bkbg-ac-accent: #3b82f6;
27 --bkbg-ac-header-font-size: 16px;
28 --bkbg-ac-header-font-weight: 600;
29 --bkbg-ac-header-line-height: 1.4;
30 --bkbg-ac-content-font-size: 15px;
31 --bkbg-ac-content-font-weight: 400;
32 --bkbg-ac-content-line-height: 1.7;
33 --bkbg-ac-icon-size: 20px;
34 --bkbg-ac-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
35 --bkbg-ac-animation-duration: 300ms;
36 --bkbg-ac-divider-color: #e2e8f0;
37 --bkbg-ac-divider-width: 1px;
38 display: flex;
39 flex-direction: column;
40 gap: var(--bkbg-ac-gap);
41 }
42
43 /* Item container */
44 .bkbg-ac-item {
45 border: var(--bkbg-ac-brd-w) var(--bkbg-ac-brd-style) var(--bkbg-ac-border-color);
46 border-radius: var(--bkbg-ac-radius);
47 overflow: hidden;
48 background: var(--bkbg-ac-content-bg);
49 box-shadow: var(--bkbg-ac-shadow);
50 transition: border-color var(--bkbg-ac-animation-duration) ease,
51 box-shadow var(--bkbg-ac-animation-duration) ease;
52 }
53
54 .bkbg-ac-item.is-active {
55 border-color: var(--bkbg-ac-border-color-active);
56 }
57
58 /* Style: Separated (default) - uses base styling above */
59
60 /* Style: Connected - items share borders */
61 .bkbg-ac-wrap[data-style="connected"] {
62 gap: 0;
63 }
64
65 .bkbg-ac-wrap[data-style="connected"] .bkbg-ac-item {
66 border-radius: 0;
67 margin-top: calc(var(--bkbg-ac-brd-w) * -1);
68 box-shadow: none;
69 }
70
71 .bkbg-ac-wrap[data-style="connected"] .bkbg-ac-item:first-child {
72 border-top-left-radius: var(--bkbg-ac-radius);
73 border-top-right-radius: var(--bkbg-ac-radius);
74 margin-top: 0;
75 }
76
77 .bkbg-ac-wrap[data-style="connected"] .bkbg-ac-item:last-child {
78 border-bottom-left-radius: var(--bkbg-ac-radius);
79 border-bottom-right-radius: var(--bkbg-ac-radius);
80 }
81
82 /* Style: Minimal - no borders, subtle background */
83 .bkbg-ac-wrap[data-style="minimal"] .bkbg-ac-item {
84 border: none;
85 box-shadow: none;
86 background: transparent;
87 }
88
89 .bkbg-ac-wrap[data-style="minimal"] .bkbg-ac-header {
90 background: transparent;
91 border-radius: var(--bkbg-ac-radius);
92 }
93
94 .bkbg-ac-wrap[data-style="minimal"] .bkbg-ac-header:hover {
95 background: var(--bkbg-ac-header-bg);
96 }
97
98 /* Style: Boxed - prominent borders and background */
99 .bkbg-ac-wrap[data-style="boxed"] .bkbg-ac-item {
100 border-width: 2px;
101 }
102
103 .bkbg-ac-wrap[data-style="boxed"] .bkbg-ac-header {
104 background: var(--bkbg-ac-header-bg);
105 }
106
107 /* Header button */
108 .bkbg-ac-header {
109 display: flex;
110 align-items: center;
111 justify-content: space-between;
112 gap: 16px;
113 padding: var(--bkbg-ac-header-padding);
114 background: var(--bkbg-ac-header-bg);
115 color: var(--bkbg-ac-header-color);
116 font-size: var(--bkbg-ac-header-font-size);
117 font-weight: var(--bkbg-ac-header-font-weight);
118 line-height: var(--bkbg-ac-header-line-height);
119 cursor: pointer;
120 border: none;
121 width: 100%;
122 text-align: left;
123 transition: background var(--bkbg-ac-animation-duration) ease,
124 color var(--bkbg-ac-animation-duration) ease;
125 }
126
127 .bkbg-ac-header:hover {
128 background: var(--bkbg-ac-header-bg-hover);
129 color: var(--bkbg-ac-header-color-hover);
130 }
131
132 .bkbg-ac-header:focus {
133 outline: 2px solid var(--bkbg-ac-accent);
134 outline-offset: -2px;
135 }
136
137 .bkbg-ac-header:focus:not(:focus-visible) {
138 outline: none;
139 }
140
141 .bkbg-ac-header:focus-visible {
142 outline: 2px solid var(--bkbg-ac-accent);
143 outline-offset: -2px;
144 }
145
146 .bkbg-ac-header[aria-expanded="true"] {
147 background: var(--bkbg-ac-header-bg-active);
148 color: var(--bkbg-ac-header-color-active);
149 }
150
151 /* Divider between header and content when open */
152 .bkbg-ac-wrap[data-divider="1"] .bkbg-ac-header[aria-expanded="true"] {
153 border-bottom: var(--bkbg-ac-divider-width) solid var(--bkbg-ac-divider-color);
154 }
155
156 /* Title */
157 .bkbg-ac-title {
158 flex: 1;
159 margin: 0;
160 font-size: inherit;
161 font-weight: inherit;
162 line-height: inherit;
163 }
164
165 /* Icon container */
166 .bkbg-ac-icon {
167 display: flex;
168 align-items: center;
169 justify-content: center;
170 width: var(--bkbg-ac-icon-size);
171 height: var(--bkbg-ac-icon-size);
172 color: var(--bkbg-ac-icon-color);
173 transition: transform var(--bkbg-ac-animation-duration) ease,
174 color var(--bkbg-ac-animation-duration) ease;
175 flex-shrink: 0;
176 }
177
178 .bkbg-ac-icon svg {
179 width: 100%;
180 height: 100%;
181 fill: currentColor;
182 }
183
184 .bkbg-ac-header[aria-expanded="true"] .bkbg-ac-icon {
185 color: var(--bkbg-ac-icon-color-active);
186 }
187
188 /* Icon rotation based on type */
189 .bkbg-ac-wrap[data-icon="chevron"] .bkbg-ac-header[aria-expanded="true"] .bkbg-ac-icon {
190 transform: rotate(180deg);
191 }
192
193 .bkbg-ac-wrap[data-icon="plus"] .bkbg-ac-header[aria-expanded="true"] .bkbg-ac-icon {
194 transform: rotate(45deg);
195 }
196
197 .bkbg-ac-wrap[data-icon="arrow"] .bkbg-ac-header[aria-expanded="true"] .bkbg-ac-icon {
198 transform: rotate(90deg);
199 }
200
201 .bkbg-ac-wrap[data-icon="caret"] .bkbg-ac-header[aria-expanded="true"] .bkbg-ac-icon {
202 transform: rotate(180deg);
203 }
204
205 /* Icon position left */
206 .bkbg-ac-wrap[data-icon-pos="left"] .bkbg-ac-header {
207 flex-direction: row-reverse;
208 }
209
210 /* Content panel with animation */
211 .bkbg-ac-content {
212 display: grid;
213 grid-template-rows: 0fr;
214 transition: grid-template-rows var(--bkbg-ac-animation-duration) ease;
215 }
216
217 .bkbg-ac-content[aria-hidden="false"] {
218 grid-template-rows: 1fr;
219 }
220
221 /* Animation disabled */
222 .bkbg-ac-wrap[data-animation="0"] .bkbg-ac-content {
223 transition: none;
224 }
225
226 .bkbg-ac-inner {
227 overflow: hidden;
228 }
229
230 .bkbg-ac-body {
231 padding: var(--bkbg-ac-content-padding);
232 color: var(--bkbg-ac-content-color);
233 background: var(--bkbg-ac-content-bg);
234 font-size: var(--bkbg-ac-content-font-size);
235 font-weight: var(--bkbg-ac-content-font-weight);
236 line-height: var(--bkbg-ac-content-line-height);
237 }
238
239 .bkbg-ac-body p:first-child {
240 margin-top: 0;
241 }
242
243 .bkbg-ac-body p:last-child {
244 margin-bottom: 0;
245 }
246
247 /* ========================================
248 Editor Styles
249 ======================================== */
250
251 /* Make editor items look exactly like frontend */
252 .bkbg-ac-wrap .bkbg-ac-item {
253 position: relative;
254 }
255
256 /* Editor: selected item highlight */
257 .bkbg-ac-item.is-selected {
258 outline: 2px solid var(--bkbg-ac-accent);
259 outline-offset: 2px;
260 }
261
262 /* Editor: item actions toolbar */
263 .bkbg-ac-item-actions {
264 position: absolute;
265 top: 8px;
266 right: 8px;
267 display: none;
268 gap: 4px;
269 z-index: 10;
270 background: #fff;
271 padding: 4px;
272 border-radius: 4px;
273 box-shadow: 0 2px 8px rgba(0,0,0,0.15);
274 }
275
276 .bkbg-ac-item:hover .bkbg-ac-item-actions,
277 .bkbg-ac-item.is-selected .bkbg-ac-item-actions {
278 display: flex;
279 }
280
281 /* Editor: inline editable title */
282 .bkbg-ac-header .bkbg-ac-title-input {
283 flex: 1;
284 background: transparent;
285 border: none;
286 color: inherit;
287 font: inherit;
288 padding: 0;
289 margin: 0;
290 outline: none;
291 cursor: text;
292 }
293
294 .bkbg-ac-header .bkbg-ac-title-input:focus {
295 background: rgba(255,255,255,0.5);
296 border-radius: 4px;
297 padding: 2px 6px;
298 margin: -2px -6px;
299 }
300
301 /* Editor: inline editable content */
302 .bkbg-ac-body-editor {
303 min-height: 60px;
304 }
305
306 .bkbg-ac-body-editor:focus {
307 outline: none;
308 }
309
310 /* Editor: Add button */
311 .bkbg-ac-add-item {
312 display: flex;
313 align-items: center;
314 justify-content: center;
315 gap: 8px;
316 padding: 12px 20px;
317 margin-top: 8px;
318 border: 2px dashed var(--bkbg-ac-border-color);
319 border-radius: var(--bkbg-ac-radius);
320 background: transparent;
321 color: var(--bkbg-ac-header-color);
322 font-size: 14px;
323 font-weight: 500;
324 cursor: pointer;
325 transition: all 0.2s ease;
326 }
327
328 .bkbg-ac-add-item:hover {
329 border-color: var(--bkbg-ac-accent);
330 color: var(--bkbg-ac-accent);
331 background: rgba(59, 130, 246, 0.05);
332 }
333
334 .bkbg-ac-add-item svg {
335 width: 20px;
336 height: 20px;
337 }
338
339 /* Hover effects disabled */
340 .bkbg-ac-wrap[data-hover="0"] .bkbg-ac-header:hover {
341 background: var(--bkbg-ac-header-bg);
342 color: var(--bkbg-ac-header-color);
343 }
344
345 /* Shadow disabled */
346 .bkbg-ac-wrap[data-shadow="0"] .bkbg-ac-item {
347 box-shadow: none;
348 }
349