| 1 |
/** |
| 2 |
* Charitable styles for the block editor CANVAS (the editor iframe). |
| 3 |
* |
| 4 |
* Since WP 6.3 the post editor canvas is an iframe, so styles enqueued on |
| 5 |
* admin_enqueue_scripts land in the parent admin document and cannot reach the blocks. |
| 6 |
* Gutenberg has a back-compat shim (useCompatibilityStyles) that clones any parent |
| 7 |
* stylesheet whose selectors mention `.editor-styles-wrapper` or `.wp-block` into the |
| 8 |
* iframe — but it logs a console warning naming the handle every time it does. |
| 9 |
* |
| 10 |
* These rules therefore live in their own file, enqueued on `enqueue_block_assets`, which |
| 11 |
* is the hook core collects for the iframe (see _wp_get_iframed_editor_assets()). Because |
| 12 |
* the sheet is then already present in the iframe under its own id, the shim skips it and |
| 13 |
* stays quiet. |
| 14 |
* |
| 15 |
* Keep this file free of anything that is not canvas-scoped, and do not move these |
| 16 |
* selectors back into charitable-admin.css — that reintroduces the warning. |
| 17 |
* |
| 18 |
* @since 1.8.12.1 |
| 19 |
*/ |
| 20 |
|
| 21 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-campaigns-block .charitable-logo, |
| 22 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-donations-block .charitable-logo, |
| 23 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-donors-block .charitable-logo, |
| 24 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-campaign-progress-bar .charitable-logo, |
| 25 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-donation-button .charitable-logo, |
| 26 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-campaign-stats .charitable-logo, |
| 27 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-my-donations .charitable-logo { |
| 28 |
max-width: 255px !important; |
| 29 |
margin-bottom: 10px !important; |
| 30 |
padding-bottom: 10px !important; |
| 31 |
border-bottom: 1px solid #e8e8eb; |
| 32 |
} |
| 33 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-campaigns-block p, |
| 34 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-donations-block p, |
| 35 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-donors-block p, |
| 36 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-campaign-progress-bar p, |
| 37 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-donation-button p, |
| 38 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-campaign-stats p, |
| 39 |
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-charitable-my-donations p { |
| 40 |
margin-top: 2px !important; |
| 41 |
margin-bottom: 2px !important; |
| 42 |
} |
| 43 |
|