diff --git a/src/wp-includes/blocks/legacy-widget.php b/src/wp-includes/blocks/legacy-widget.php
index e827f8f7c5..e51c795406 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) !important; |
| 130 | visibility: hidden !important; |
| 131 | z-index: -999 !important; |
| 132 | } |
| 133 | |
| 134 | /* Restore widget font-size */ |
| 135 | .widget { |
| 136 | font-size: var(--global--font-size-base); |
| 137 | } |
111 | 138 | </style> |
112 | 139 | </head> |
113 | 140 | <body <?php body_class(); ?>> |