| 1 |
/** |
| 2 |
* Blockenberg Editor Styles |
| 3 |
* Common styles for all blocks in editor |
| 4 |
*/ |
| 5 |
|
| 6 |
/* ======================================== |
| 7 |
Block Inserter: BKB Badge on Icons |
| 8 |
======================================== */ |
| 9 |
|
| 10 |
/* Target Blockenberg blocks in block inserter */ |
| 11 |
.block-editor-block-types-list__item[class*="blockenberg-"] .block-editor-block-types-list__item-icon, |
| 12 |
.block-editor-inserter__panel-content [class*="blockenberg-"] .block-editor-block-types-list__item-icon { |
| 13 |
position: relative; |
| 14 |
} |
| 15 |
|
| 16 |
.block-editor-block-types-list__item[class*="blockenberg-"] .block-editor-block-types-list__item-icon::after, |
| 17 |
.block-editor-inserter__panel-content [class*="blockenberg-"] .block-editor-block-types-list__item-icon::after { |
| 18 |
content: 'BKB'; |
| 19 |
position: absolute; |
| 20 |
bottom: -2px; |
| 21 |
right: -2px; |
| 22 |
background: var(--wp-admin-theme-color, #007cba); |
| 23 |
color: #fff; |
| 24 |
font-size: 7px; |
| 25 |
font-weight: 700; |
| 26 |
padding: 1px 3px; |
| 27 |
border-radius: 3px; |
| 28 |
line-height: 1; |
| 29 |
letter-spacing: 0.3px; |
| 30 |
} |
| 31 |
|
| 32 |
/* ======================================== |
| 33 |
Editor: Block Wrapper & Hover States |
| 34 |
======================================== */ |
| 35 |
.editor-styles-wrapper .bkbg-editor-wrap, |
| 36 |
.block-editor-block-list__block.bkbg-editor-wrap { |
| 37 |
position: relative; |
| 38 |
border: 1px dashed transparent !important; |
| 39 |
border-radius: 4px; |
| 40 |
transition: border-color 0.15s ease; |
| 41 |
} |
| 42 |
|
| 43 |
.editor-styles-wrapper .bkbg-editor-wrap:hover, |
| 44 |
.block-editor-block-list__block.bkbg-editor-wrap:hover { |
| 45 |
border-color: rgba(0, 124, 186, 0.5) !important; |
| 46 |
} |
| 47 |
|
| 48 |
.editor-styles-wrapper .bkbg-editor-wrap.is-selected, |
| 49 |
.editor-styles-wrapper .bkbg-editor-wrap.bkbg-block-selected, |
| 50 |
.block-editor-block-list__block.bkbg-editor-wrap.is-selected { |
| 51 |
border-color: #007cba !important; |
| 52 |
border-style: solid !important; |
| 53 |
} |
| 54 |
|
| 55 |
/* Block label in editor */ |
| 56 |
.bkbg-editor-wrap::before { |
| 57 |
content: attr(data-block-label); |
| 58 |
position: absolute; |
| 59 |
top: -10px; |
| 60 |
left: 10px; |
| 61 |
background: #007cba; |
| 62 |
color: #fff; |
| 63 |
font-size: 10px; |
| 64 |
font-weight: 600; |
| 65 |
padding: 2px 8px; |
| 66 |
border-radius: 3px; |
| 67 |
opacity: 0; |
| 68 |
transition: opacity 0.15s ease; |
| 69 |
pointer-events: none; |
| 70 |
z-index: 10; |
| 71 |
text-transform: uppercase; |
| 72 |
letter-spacing: 0.5px; |
| 73 |
} |
| 74 |
|
| 75 |
.bkbg-editor-wrap:hover::before, |
| 76 |
.bkbg-editor-wrap.is-selected::before { |
| 77 |
opacity: 1; |
| 78 |
} |
| 79 |
|
| 80 |
/* ======================================== |
| 81 |
Editor: Action Bar (Hover + Selected) |
| 82 |
======================================== */ |
| 83 |
|
| 84 |
.bkbg-editor-wrap .bkbg-editor-actions { |
| 85 |
position: absolute; |
| 86 |
left: -1px; |
| 87 |
right: -1px; |
| 88 |
top: 100%; |
| 89 |
bottom: auto; |
| 90 |
transform: translateY(2px); |
| 91 |
|
| 92 |
display: flex; |
| 93 |
align-items: center; |
| 94 |
justify-content: center; |
| 95 |
gap: 10px; |
| 96 |
opacity: 0; |
| 97 |
pointer-events: none; |
| 98 |
transition: opacity 0.15s ease, transform 0.15s ease; |
| 99 |
z-index: 20; |
| 100 |
|
| 101 |
padding: 10px 12px; |
| 102 |
border-radius: 0 0 10px 10px; |
| 103 |
background: rgba(255, 255, 255, 0.92); |
| 104 |
border: 1px dashed rgba(0, 124, 186, 0.45); |
| 105 |
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12); |
| 106 |
backdrop-filter: blur(8px); |
| 107 |
} |
| 108 |
|
| 109 |
.bkbg-editor-wrap:hover .bkbg-editor-actions, |
| 110 |
.bkbg-editor-wrap .bkbg-editor-actions:hover, |
| 111 |
.bkbg-editor-wrap.is-selected .bkbg-editor-actions, |
| 112 |
.bkbg-editor-wrap.bkbg-block-selected .bkbg-editor-actions, |
| 113 |
.bkbg-editor-wrap:focus-within .bkbg-editor-actions { |
| 114 |
opacity: 1; |
| 115 |
transform: translateY(0); |
| 116 |
pointer-events: auto; |
| 117 |
} |
| 118 |
|
| 119 |
.bkbg-editor-wrap .bkbg-editor-actions .components-button { |
| 120 |
gap: 6px; |
| 121 |
} |
| 122 |
|
| 123 |
/* Keep overlays usable when blocks are close together */ |
| 124 |
.bkbg-editor-wrap { |
| 125 |
z-index: 0; |
| 126 |
} |
| 127 |
|
| 128 |
.bkbg-editor-wrap:hover, |
| 129 |
.bkbg-editor-wrap.is-selected, |
| 130 |
.bkbg-editor-wrap:focus-within { |
| 131 |
z-index: 1; |
| 132 |
} |
| 133 |
|
| 134 |
/* ======================================== |
| 135 |
Layout Blocks: Section / Row / Column |
| 136 |
======================================== */ |
| 137 |
|
| 138 |
/* Layout block hierarchy visualization */ |
| 139 |
.editor-styles-wrapper [data-type="blockenberg/section"], |
| 140 |
.editor-styles-wrapper [data-type="blockenberg/row"], |
| 141 |
.editor-styles-wrapper [data-type="blockenberg/column"] { |
| 142 |
position: relative; |
| 143 |
} |
| 144 |
|
| 145 |
/* Section block editor styles */ |
| 146 |
.editor-styles-wrapper [data-type="blockenberg/section"] { |
| 147 |
margin-top: 24px; |
| 148 |
margin-bottom: 24px; |
| 149 |
} |
| 150 |
|
| 151 |
.editor-styles-wrapper [data-type="blockenberg/section"]:first-child { |
| 152 |
margin-top: 0; |
| 153 |
} |
| 154 |
|
| 155 |
/* Row block editor styles */ |
| 156 |
.editor-styles-wrapper [data-type="blockenberg/row"] { |
| 157 |
margin-top: 16px; |
| 158 |
margin-bottom: 16px; |
| 159 |
} |
| 160 |
|
| 161 |
.editor-styles-wrapper [data-type="blockenberg/row"]:first-child { |
| 162 |
margin-top: 0; |
| 163 |
} |
| 164 |
|
| 165 |
/* Ensure row inner blocks display as flex - direct children only */ |
| 166 |
.editor-styles-wrapper [data-type="blockenberg/row"] > .bkbg-row > .bkbg-row__inner > .block-editor-inner-blocks > .block-editor-block-list__layout { |
| 167 |
display: flex !important; |
| 168 |
flex-wrap: nowrap !important; |
| 169 |
align-items: stretch !important; |
| 170 |
width: 100% !important; |
| 171 |
overflow: hidden !important; |
| 172 |
} |
| 173 |
|
| 174 |
/* Column blocks in editor - force width constraints */ |
| 175 |
.editor-styles-wrapper [data-type="blockenberg/row"] > .block-editor-inner-blocks > .block-editor-block-list__layout > [data-type="blockenberg/column"] { |
| 176 |
flex-shrink: 0 !important; |
| 177 |
flex-grow: 0 !important; |
| 178 |
min-width: 0 !important; |
| 179 |
max-width: none; |
| 180 |
} |
| 181 |
|
| 182 |
/* Remove default Gutenberg margins on columns */ |
| 183 |
.editor-styles-wrapper [data-type="blockenberg/column"] { |
| 184 |
margin-left: 0 !important; |
| 185 |
margin-right: 0 !important; |
| 186 |
} |
| 187 |
|
| 188 |
/* ======================================== |
| 189 |
Layout Block: Visual Hierarchy Indicators |
| 190 |
======================================== */ |
| 191 |
|
| 192 |
/* Section outline */ |
| 193 |
.editor-styles-wrapper [data-type="blockenberg/section"] > .bkbg-section { |
| 194 |
position: relative; |
| 195 |
} |
| 196 |
|
| 197 |
.editor-styles-wrapper [data-type="blockenberg/section"] > .bkbg-section::after { |
| 198 |
content: ''; |
| 199 |
position: absolute; |
| 200 |
top: -2px; |
| 201 |
left: -2px; |
| 202 |
right: -2px; |
| 203 |
bottom: -2px; |
| 204 |
border: 2px dashed transparent; |
| 205 |
border-radius: 6px; |
| 206 |
pointer-events: none; |
| 207 |
transition: border-color 0.15s ease; |
| 208 |
} |
| 209 |
|
| 210 |
.editor-styles-wrapper [data-type="blockenberg/section"].is-selected > .bkbg-section::after, |
| 211 |
.editor-styles-wrapper [data-type="blockenberg/section"]:focus-within > .bkbg-section::after { |
| 212 |
border-color: rgba(59, 130, 246, 0.3); |
| 213 |
} |
| 214 |
|
| 215 |
/* Row outline */ |
| 216 |
.editor-styles-wrapper [data-type="blockenberg/row"] > .bkbg-row::after { |
| 217 |
content: ''; |
| 218 |
position: absolute; |
| 219 |
top: -1px; |
| 220 |
left: -1px; |
| 221 |
right: -1px; |
| 222 |
bottom: -1px; |
| 223 |
border: 1px dashed transparent; |
| 224 |
border-radius: 4px; |
| 225 |
pointer-events: none; |
| 226 |
transition: border-color 0.15s ease; |
| 227 |
} |
| 228 |
|
| 229 |
.editor-styles-wrapper [data-type="blockenberg/row"].is-selected > .bkbg-row::after, |
| 230 |
.editor-styles-wrapper [data-type="blockenberg/row"]:focus-within > .bkbg-row::after { |
| 231 |
border-color: rgba(59, 130, 246, 0.4); |
| 232 |
} |
| 233 |
|
| 234 |
/* ======================================== |
| 235 |
Layout Block: Drag Resize Handles |
| 236 |
======================================== */ |
| 237 |
|
| 238 |
/* Ensure handles overlay is above content */ |
| 239 |
.editor-styles-wrapper .bkbg-row__handles-overlay { |
| 240 |
z-index: 100; |
| 241 |
} |
| 242 |
|
| 243 |
/* Handle hover effect enhancement */ |
| 244 |
.editor-styles-wrapper .bkbg-row__resize-handle:hover .bkbg-row__resize-handle-line { |
| 245 |
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); |
| 246 |
} |
| 247 |
|
| 248 |
/* Handle active/dragging state */ |
| 249 |
.editor-styles-wrapper .bkbg-row__resize-handle.is-resizing .bkbg-row__resize-handle-line { |
| 250 |
box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2); |
| 251 |
} |
| 252 |
|
| 253 |
/* Cursor override during resize */ |
| 254 |
.editor-styles-wrapper .bkbg-row--is-resizing, |
| 255 |
.editor-styles-wrapper .bkbg-row--is-resizing * { |
| 256 |
cursor: col-resize !important; |
| 257 |
} |
| 258 |
|
| 259 |
/* ======================================== |
| 260 |
Layout Block: Responsive Mode Preview |
| 261 |
======================================== */ |
| 262 |
|
| 263 |
/* Tablet mode preview styling */ |
| 264 |
.editor-styles-wrapper .bkbg-row--mode-tablet { |
| 265 |
background-image: repeating-linear-gradient( |
| 266 |
90deg, |
| 267 |
transparent, |
| 268 |
transparent 10px, |
| 269 |
rgba(59, 130, 246, 0.02) 10px, |
| 270 |
rgba(59, 130, 246, 0.02) 20px |
| 271 |
); |
| 272 |
} |
| 273 |
|
| 274 |
/* Mobile mode preview styling */ |
| 275 |
.editor-styles-wrapper .bkbg-row--mode-mobile { |
| 276 |
background-image: repeating-linear-gradient( |
| 277 |
90deg, |
| 278 |
transparent, |
| 279 |
transparent 8px, |
| 280 |
rgba(234, 88, 12, 0.02) 8px, |
| 281 |
rgba(234, 88, 12, 0.02) 16px |
| 282 |
); |
| 283 |
} |
| 284 |
|
| 285 |
/* Mode badge color variants */ |
| 286 |
.editor-styles-wrapper .bkbg-row--mode-tablet .bkbg-row__mode-badge { |
| 287 |
background: #8b5cf6; |
| 288 |
} |
| 289 |
|
| 290 |
.editor-styles-wrapper .bkbg-row--mode-mobile .bkbg-row__mode-badge { |
| 291 |
background: #ea580c; |
| 292 |
} |
| 293 |
|
| 294 |
/* ======================================== |
| 295 |
Layout Block: Empty State |
| 296 |
======================================== */ |
| 297 |
|
| 298 |
/* Empty column placeholder */ |
| 299 |
.editor-styles-wrapper .bkbg-column:empty::before, |
| 300 |
.editor-styles-wrapper .bkbg-column .bkbg-column__inner:empty::before { |
| 301 |
content: 'Add content'; |
| 302 |
display: flex; |
| 303 |
align-items: center; |
| 304 |
justify-content: center; |
| 305 |
min-height: 60px; |
| 306 |
color: #94a3b8; |
| 307 |
font-size: 12px; |
| 308 |
font-style: italic; |
| 309 |
} |
| 310 |
|
| 311 |
/* Empty row placeholder */ |
| 312 |
.editor-styles-wrapper .bkbg-row .bkbg-row__inner:empty::before { |
| 313 |
content: 'Add columns'; |
| 314 |
display: flex; |
| 315 |
align-items: center; |
| 316 |
justify-content: center; |
| 317 |
min-height: 50px; |
| 318 |
color: #94a3b8; |
| 319 |
font-size: 12px; |
| 320 |
font-style: italic; |
| 321 |
} |
| 322 |
|
| 323 |
/* ======================================== |
| 324 |
Layout Block: Toolbar & Controls |
| 325 |
======================================== */ |
| 326 |
|
| 327 |
/* Preset buttons in inspector */ |
| 328 |
.bkbg-row-presets { |
| 329 |
display: flex; |
| 330 |
flex-direction: column; |
| 331 |
gap: 6px; |
| 332 |
} |
| 333 |
|
| 334 |
.bkbg-row-presets .components-button { |
| 335 |
justify-content: flex-start; |
| 336 |
width: 100%; |
| 337 |
padding: 8px 12px; |
| 338 |
} |
| 339 |
|
| 340 |
.bkbg-row-presets .components-button:hover { |
| 341 |
background: #f1f5f9; |
| 342 |
} |
| 343 |
|
| 344 |
/* Column width controls */ |
| 345 |
.bkbg-column-widths-controls .components-range-control__wrapper { |
| 346 |
margin-bottom: 12px; |
| 347 |
} |
| 348 |
|
| 349 |
/* ======================================== |
| 350 |
Layout Block: Selection States |
| 351 |
======================================== */ |
| 352 |
|
| 353 |
/* When section is selected */ |
| 354 |
.editor-styles-wrapper [data-type="blockenberg/section"].is-selected { |
| 355 |
z-index: 1; |
| 356 |
} |
| 357 |
|
| 358 |
/* When row is selected inside section */ |
| 359 |
.editor-styles-wrapper [data-type="blockenberg/section"] [data-type="blockenberg/row"].is-selected { |
| 360 |
z-index: 2; |
| 361 |
} |
| 362 |
|
| 363 |
/* When column is selected inside row */ |
| 364 |
.editor-styles-wrapper [data-type="blockenberg/row"] [data-type="blockenberg/column"].is-selected { |
| 365 |
z-index: 3; |
| 366 |
} |
| 367 |
|
| 368 |
/* ======================================== |
| 369 |
Layout Block: Appender Buttons |
| 370 |
======================================== */ |
| 371 |
|
| 372 |
/* Row appender */ |
| 373 |
.editor-styles-wrapper .bkbg-row .block-list-appender { |
| 374 |
display: flex; |
| 375 |
align-items: center; |
| 376 |
justify-content: center; |
| 377 |
min-width: 48px; |
| 378 |
margin: 0 8px; |
| 379 |
} |
| 380 |
|
| 381 |
/* Column appender */ |
| 382 |
.editor-styles-wrapper .bkbg-column .block-list-appender { |
| 383 |
min-height: 48px; |
| 384 |
display: flex; |
| 385 |
align-items: center; |
| 386 |
justify-content: center; |
| 387 |
} |
| 388 |
|
| 389 |
/* Section appender */ |
| 390 |
.editor-styles-wrapper .bkbg-section .block-list-appender { |
| 391 |
margin-top: 16px; |
| 392 |
} |
| 393 |
|
| 394 |
/* ======================================== |
| 395 |
Testimonials / Team Members: Carousel Nav |
| 396 |
======================================== */ |
| 397 |
|
| 398 |
/* Ensure bottom nav is clickable in editor */ |
| 399 |
.editor-styles-wrapper .bkbg-ts-nav-bottom .bkbg-ts-nav, |
| 400 |
.editor-styles-wrapper .bkbg-tm-nav-bottom .bkbg-tm-nav { |
| 401 |
position: relative; |
| 402 |
z-index: 10; |
| 403 |
} |
| 404 |
|
| 405 |
.editor-styles-wrapper .bkbg-ts-nav-bottom .bkbg-ts-nav-btn, |
| 406 |
.editor-styles-wrapper .bkbg-tm-nav-bottom .bkbg-tm-nav-btn { |
| 407 |
position: relative; |
| 408 |
z-index: 11; |
| 409 |
} |
| 410 |
|