Make WordPress Core

Ticket #53801: 53801_css03.diff

File 53801_css03.diff, 1.2 KB (added by costdev, 3 years ago)

Remove width. Add !important to transform.

  • 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..e51c795406 100644
    a b function handle_legacy_widget_preview_iframe() { 
    108108                                padding: 0 !important;
    109109                                margin: 0 !important;
    110110                        }
     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                        }
    111138                </style>
    112139        </head>
    113140        <body <?php body_class(); ?>>