diff --git a/src/wp-includes/blocks/legacy-widget.php b/src/wp-includes/blocks/legacy-widget.php
index 70f1f725bb..ed03f5e718 100644
|
a
|
b
|
function handle_legacy_widget_preview_iframe() { |
| 108 | 108 | padding: 0 !important; |
| 109 | 109 | margin: 0 !important; |
| 110 | 110 | } |
| | 111 | |
| | 112 | /* Hide root level text nodes */ |
| | 113 | body { |
| | 114 | font-size: 0 !important; |
| | 115 | } |
| | 116 | |
| | 117 | /* Hide non-widget elements */ |
| | 118 | body *:not(#page):not(#content):not(.widget):not(.widget *) { |
| | 119 | display: none !important; |
| | 120 | font-size: 0 !important; |
| | 121 | height: 0 !important; |
| | 122 | left: -9999px !important; |
| | 123 | max-height: 0 !important; |
| | 124 | max-width: 0 !important; |
| | 125 | opacity: 0 !important; |
| | 126 | pointer-events: none !important; |
| | 127 | position: absolute !important; |
| | 128 | top: -9999px !important; |
| | 129 | transform: translate(-9999px, -9999px); |
| | 130 | visibility: hidden !important; |
| | 131 | width: 0 !important; |
| | 132 | z-index: -999 !important; |
| | 133 | } |
| | 134 | |
| | 135 | /* Restore widget font-size */ |
| | 136 | .widget { |
| | 137 | font-size: var(--global--font-size-base); |
| | 138 | } |
| 111 | 139 | </style> |
| 112 | 140 | </head> |
| 113 | 141 | <body <?php body_class(); ?>> |