' . "\n"; } /** * Listing CLS: stabilize card geometry and chapter meta rows. * * Consolidated from two separate functions (manga_listing_cls_lock_css and * manga_archive_meta_cls_css) that output identical chapter meta rules. * * - Card geometry: reserve min-heights for title, author, rating, and chapter date * to prevent post-paint growth from font/icon metric loading. * - Chapter meta row: lock inline-flex layout for view counts + icons so async * icon CSS doesn't cause line-wrap shifts on mobile. * - Mobile sub-header: hide .c-sub-header-nav.no-subnav from first paint * (matches existing JS behavior that currently runs only after window.load). */ add_action( 'wp_head', 'manga_listing_cls_lock_css', 5 ); function manga_listing_cls_lock_css() { if ( ! manga_is_listing_context() ) return; echo '' . "\n"; } /** * Reading page CLS: reserve space for chapter images + lock logo dimensions. * /** * Reading page CLS: lock logo dimensions to prevent header shift. * * Logo CLS: aspect-ratio ensures height is calculated from width immediately, * even when wp-custom-css applies height:auto. Prevents collapse→expand shift. * * Chapter image CLS is handled by Madara CLS Optimizer plugin when active. * If plugin is NOT active, basic fallback rules are applied. */ /** * Manga-single CLS: stabilize .tab-summary layout during async CSS swap. * * PSI reports CLS 0.062 on