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

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

369 lines 11.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* ========================================
2 Styled List Block
3 Prefix: bkbg-sl-
4 ======================================== */
5
6 /* ── CSS Custom Properties ────────────────────────────────────────────────── */
7 .bkbg-sl-wrap {
8 --bkbg-sl-gap: 12px;
9 --bkbg-sl-col-gap: 32px;
10 --bkbg-sl-columns: 1;
11 --bkbg-sl-icon-size: 18px;
12 --bkbg-sl-icon-color: #3b82f6;
13 --bkbg-sl-icon-bg: #dbeafe;
14 --bkbg-sl-icon-bg-size: 34px;
15 --bkbg-sl-icon-radius: 50%;
16 --bkbg-sl-item-padding: 10px 14px;
17 --bkbg-sl-item-bg: transparent;
18 --bkbg-sl-item-bg-hover: transparent;
19 --bkbg-sl-item-brd-w: 0px;
20 --bkbg-sl-item-brd-color: #e2e8f0;
21 --bkbg-sl-item-brd-style: solid;
22 --bkbg-sl-item-radius: 0px;
23 --bkbg-sl-divider-color: #e2e8f0;
24 --bkbg-sl-divider-w: 1px;
25 --bkbg-sl-font-size: 16px;
26 --bkbg-sl-font-weight: 400;
27 --bkbg-sl-line-height: 1.6;
28 --bkbg-sl-text-color: #374151;
29 --bkbg-sl-desc-size: 14px;
30 --bkbg-sl-desc-weight: 400;
31 --bkbg-sl-desc-color: #6b7280;
32
33 list-style: none;
34 margin: 0;
35 padding: 0;
36 display: flex;
37 flex-direction: column;
38 gap: var(--bkbg-sl-gap);
39 }
40
41 /* ── Layout Variants ──────────────────────────────────────────────────────── */
42
43 /* Grid – 2 columns (default) */
44 .bkbg-sl-wrap[data-list-style="grid"] {
45 display: grid;
46 grid-template-columns: repeat(2, 1fr);
47 column-gap: var(--bkbg-sl-col-gap);
48 }
49
50 /* Grid – custom columns */
51 .bkbg-sl-wrap[data-list-style="grid-custom"] {
52 display: grid;
53 grid-template-columns: repeat(var(--bkbg-sl-columns), 1fr);
54 column-gap: var(--bkbg-sl-col-gap);
55 }
56
57 /* Horizontal – single wrapping row */
58 .bkbg-sl-wrap[data-list-style="horizontal"] {
59 flex-direction: row;
60 flex-wrap: wrap;
61 column-gap: var(--bkbg-sl-col-gap);
62 align-items: flex-start;
63 }
64
65 .bkbg-sl-wrap[data-list-style="horizontal"] .bkbg-sl-li {
66 flex: 0 0 auto;
67 }
68
69 /* ── List Item ────────────────────────────────────────────────────────────── */
70 .bkbg-sl-li {
71 margin: 0;
72 padding: 0;
73 list-style: none;
74 }
75
76 .bkbg-sl-item {
77 display: flex;
78 align-items: center;
79 gap: 12px;
80 padding: var(--bkbg-sl-item-padding);
81 background: var(--bkbg-sl-item-bg);
82 border: var(--bkbg-sl-item-brd-w) var(--bkbg-sl-item-brd-style) var(--bkbg-sl-item-brd-color);
83 border-radius: var(--bkbg-sl-item-radius);
84 transition: background 0.2s ease, box-shadow 0.2s ease;
85 position: relative;
86 }
87
88 .bkbg-sl-item:hover {
89 background: var(--bkbg-sl-item-bg-hover);
90 }
91
92 /* Shadow variant */
93 .bkbg-sl-item.has-shadow {
94 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
95 }
96
97 /* ── Icon alignment ───────────────────────────────────────────────────────── */
98 .bkbg-sl-wrap[data-icon-align="center"] .bkbg-sl-item {
99 align-items: center;
100 }
101
102 .bkbg-sl-wrap[data-icon-align="top"] .bkbg-sl-item {
103 align-items: flex-start;
104 }
105
106 /* Icon on the right – reverse order */
107 .bkbg-sl-wrap[data-icon-pos="right"] .bkbg-sl-item {
108 flex-direction: row-reverse;
109 }
110
111 /* ── Text alignment ───────────────────────────────────────────────────────── */
112 .bkbg-sl-wrap[data-align="center"] .bkbg-sl-item {
113 justify-content: center;
114 text-align: center;
115 }
116
117 .bkbg-sl-wrap[data-align="right"] .bkbg-sl-item {
118 justify-content: flex-end;
119 text-align: right;
120 }
121
122 /* ── Divider between items ────────────────────────────────────────────────── */
123 .bkbg-sl-wrap[data-divider="1"] .bkbg-sl-li + .bkbg-sl-li {
124 border-top: var(--bkbg-sl-divider-w) solid var(--bkbg-sl-divider-color);
125 padding-top: var(--bkbg-sl-gap);
126 margin-top: 0;
127 }
128
129 /* When dividers enabled, remove the wrap gap and use padding instead */
130 .bkbg-sl-wrap[data-divider="1"] {
131 gap: 0;
132 }
133
134 .bkbg-sl-wrap[data-divider="1"] .bkbg-sl-li:first-child {
135 padding-top: 0;
136 border-top: none;
137 }
138
139 .bkbg-sl-wrap[data-divider="1"] .bkbg-sl-li {
140 padding-top: var(--bkbg-sl-gap);
141 }
142
143 /* ── Icon wrapper ─────────────────────────────────────────────────────────── */
144 .bkbg-sl-icon-wrap {
145 display: inline-flex;
146 align-items: center;
147 justify-content: center;
148 flex-shrink: 0;
149 color: var(--bkbg-sl-icon-color);
150 width: var(--bkbg-sl-icon-size);
151 height: var(--bkbg-sl-icon-size);
152 }
153
154 /* ── Icon element ─────────────────────────────────────────────────────────── */
155 .bkbg-sl-icon {
156 display: inline-flex;
157 align-items: center;
158 justify-content: center;
159 width: var(--bkbg-sl-icon-size);
160 height: var(--bkbg-sl-icon-size);
161 color: inherit;
162 flex-shrink: 0;
163 }
164
165 .bkbg-sl-icon svg {
166 width: 100%;
167 height: 100%;
168 fill: currentColor;
169 display: block;
170 }
171
172 /* Dashicon icon sizing */
173 .bkbg-sl-icon .dashicons {
174 font-size: var(--bkbg-sl-icon-size);
175 width: var(--bkbg-sl-icon-size);
176 height: var(--bkbg-sl-icon-size);
177 line-height: 1;
178 }
179
180 /* Custom image icon */
181 .bkbg-sl-icon .bkbg-sl-img-icon {
182 width: var(--bkbg-sl-icon-size);
183 height: var(--bkbg-sl-icon-size);
184 object-fit: contain;
185 display: block;
186 border-radius: 2px;
187 }
188
189 /* Remove colour tinting on image icons */
190 .bkbg-sl-wrap[data-icon-type="custom-image"] .bkbg-sl-icon {
191 color: transparent;
192 }
193
194 /* ── Custom character icon ─────────────────────────────────────────────────── */
195 .bkbg-sl-icon .bkbg-sl-char {
196 font-size: var(--bkbg-sl-icon-size);
197 line-height: 1;
198 font-weight: 700;
199 display: inline-flex;
200 align-items: center;
201 }
202
203 /* Ordered number */
204 .bkbg-sl-icon .bkbg-sl-num {
205 font-size: calc(var(--bkbg-sl-icon-size) * 0.75);
206 font-weight: 700;
207 line-height: 1;
208 display: inline-flex;
209 align-items: center;
210 }
211
212 /* ── Icon Shapes ──────────────────────────────────────────────────────────── */
213
214 /* Circle — Filled */
215 .bkbg-sl-wrap[data-icon-shape="circle-filled"] .bkbg-sl-icon-wrap {
216 width: var(--bkbg-sl-icon-bg-size);
217 height: var(--bkbg-sl-icon-bg-size);
218 border-radius: 50%;
219 background: var(--bkbg-sl-icon-bg);
220 }
221
222 /* Circle — Outline */
223 .bkbg-sl-wrap[data-icon-shape="circle-outline"] .bkbg-sl-icon-wrap {
224 width: var(--bkbg-sl-icon-bg-size);
225 height: var(--bkbg-sl-icon-bg-size);
226 border-radius: 50%;
227 border: 2px solid currentColor;
228 }
229
230 /* Square — Filled */
231 .bkbg-sl-wrap[data-icon-shape="square-filled"] .bkbg-sl-icon-wrap {
232 width: var(--bkbg-sl-icon-bg-size);
233 height: var(--bkbg-sl-icon-bg-size);
234 border-radius: 4px;
235 background: var(--bkbg-sl-icon-bg);
236 }
237
238 /* Square — Outline */
239 .bkbg-sl-wrap[data-icon-shape="square-outline"] .bkbg-sl-icon-wrap {
240 width: var(--bkbg-sl-icon-bg-size);
241 height: var(--bkbg-sl-icon-bg-size);
242 border-radius: 4px;
243 border: 2px solid currentColor;
244 }
245
246 /* Rounded Square — Filled */
247 .bkbg-sl-wrap[data-icon-shape="rounded-filled"] .bkbg-sl-icon-wrap {
248 width: var(--bkbg-sl-icon-bg-size);
249 height: var(--bkbg-sl-icon-bg-size);
250 border-radius: var(--bkbg-sl-icon-radius);
251 background: var(--bkbg-sl-icon-bg);
252 }
253
254 /* Rounded Square — Outline */
255 .bkbg-sl-wrap[data-icon-shape="rounded-outline"] .bkbg-sl-icon-wrap {
256 width: var(--bkbg-sl-icon-bg-size);
257 height: var(--bkbg-sl-icon-bg-size);
258 border-radius: var(--bkbg-sl-icon-radius);
259 border: 2px solid currentColor;
260 }
261
262 /* ── Content area ─────────────────────────────────────────────────────────── */
263 .bkbg-sl-content {
264 flex: 1;
265 min-width: 0;
266 }
267
268 /* ── Text ─────────────────────────────────────────────────────────────────── */
269 .bkbg-sl-text {
270 font-size: var(--bkbg-sl-font-size);
271 font-weight: var(--bkbg-sl-font-weight);
272 line-height: var(--bkbg-sl-line-height);
273 color: var(--bkbg-sl-text-color);
274 margin: 0;
275 }
276
277 .bkbg-sl-text p {
278 margin: 0;
279 }
280
281 /* ── Description ──────────────────────────────────────────────────────────── */
282 .bkbg-sl-desc {
283 font-size: var(--bkbg-sl-desc-size);
284 font-weight: var(--bkbg-sl-desc-weight);
285 color: var(--bkbg-sl-desc-color);
286 margin: 4px 0 0;
287 line-height: 1.5;
288 }
289
290 .bkbg-sl-desc p {
291 margin: 0;
292 }
293
294 /* ── Responsive ───────────────────────────────────────────────────────────── */
295 @media (max-width: 768px) {
296 .bkbg-sl-wrap[data-list-style="grid"],
297 .bkbg-sl-wrap[data-list-style="grid-custom"] {
298 grid-template-columns: 1fr;
299 }
300
301 .bkbg-sl-wrap[data-list-style="horizontal"] {
302 flex-direction: column;
303 }
304 }
305
306 /* ── Editor-only styles ───────────────────────────────────────────────────── */
307 .editor-styles-wrapper .bkbg-sl-wrap {
308 /* Ensure ul resets inside editor too */
309 list-style: none;
310 padding: 0;
311 margin: 0;
312 }
313
314 .editor-styles-wrapper .bkbg-sl-li {
315 list-style: none;
316 }
317
318 /* Focused item highlight */
319 .editor-styles-wrapper .bkbg-sl-item.is-focused {
320 outline: 2px solid #3b82f6;
321 outline-offset: 2px;
322 border-radius: var(--bkbg-sl-item-radius);
323 }
324
325 /* Item toolbar (editor only) */
326 .bkbg-sl-item-toolbar {
327 position: absolute;
328 top: -32px;
329 left: 0;
330 display: flex;
331 align-items: center;
332 gap: 2px;
333 background: #1e1e1e;
334 border-radius: 4px;
335 padding: 2px 4px;
336 z-index: 10;
337 box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
338 }
339
340 .bkbg-sl-item-toolbar .components-button {
341 color: #fff !important;
342 min-width: 28px;
343 height: 28px;
344 padding: 0 6px;
345 }
346
347 .bkbg-sl-item-toolbar .components-button:hover {
348 background: rgba(255, 255, 255, 0.15) !important;
349 }
350
351 .bkbg-sl-item-toolbar .is-destructive {
352 color: #f87171 !important;
353 }
354
355 .bkbg-sl-item-toolbar .is-destructive:hover {
356 background: rgba(248, 113, 113, 0.15) !important;
357 }
358
359 /* ── Editor: RichText placeholders ───────────────────────────────────────── */
360 .editor-styles-wrapper .bkbg-sl-text[data-is-placeholder-visible="true"]::before,
361 .editor-styles-wrapper .bkbg-sl-desc[data-is-placeholder-visible="true"]::before {
362 opacity: 0.4;
363 }
364
365 /* ── Editor: item actions bar ────────────────────────────────────────────── */
366 .editor-styles-wrapper .bkbg-editor-actions {
367 margin-top: 8px;
368 }
369