Make WordPress Core

Ticket #53801: 53801_css01.diff

File 53801_css01.diff, 740 bytes (added by costdev, 3 years ago)
  • src/wp-includes/blocks/legacy-widget.php

    diff --git a/src/wp-includes/blocks/legacy-widget.php b/src/wp-includes/blocks/legacy-widget.php
    index e827f8f7c5..01ce57d380 100644
    a b function handle_legacy_widget_preview_iframe() { 
    108108                                padding: 0 !important;
    109109                                margin: 0 !important;
    110110                        }
     111
     112                        /* Hide non-widget text nodes */
     113                        body {
     114                                font-size: 0;
     115                        }
     116
     117                        /* Hide non-widget elements */
     118                        body > *:not(#page),
     119                        #page > *:not(#content),
     120                        #content > *:not(.widget) {
     121                                display: none;
     122                        }
     123
     124                        /* Restore widget font-size */
     125                        .widget {
     126                                font-size: var(--global--font-size-base);
     127                        }
    111128                </style>
    112129        </head>
    113130        <body <?php body_class(); ?>>