Support » Plugin: Autoptimize » Element style not allowed as child of element noscript in this context.

  • Resolved ctrlaltdelete

    (@ctrlaltdelete)


    <noscript><style>.lazyload{display:none;}</style></noscript>

    Apparently this isn’t valid. Just reporting.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    it is not valid HTML as per the W3C tests, but it does work. if you search these forums you’ll find ways to disable this though, if you’re big on W3C compliance 🙂

    ctrlaltdelete

    (@ctrlaltdelete)

    Thanks used:

    add_filter('autoptimize_filter_imgopt_lazyload_cssoutput','no_noscript');
    function no_noscript() {
        return '<style>.lazyload,.lazyloading{opacity:0;}.lazyloaded{opacity:1;transition:opacity 300ms;}</style>';
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.