You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We hit this on a WordPress multisite running IndieWeb 5.2.0. indieweb.css is about 120 KB raw (28 KB gzipped) and is enqueued on every front-end page, but it only styles rel-me links and h-cards.
The plugin already runs code at exactly the points where the CSS is needed: Indieweb\Hcard\User::get_rel_me_list() and Indieweb\Hcard\User::hcard(). So it could load on demand with no new option. Register the style on wp_enqueue_scripts instead of enqueueing it, then call wp_enqueue_style( 'indieweb' ) from those two methods.
With block themes the template renders before wp_head, so the style still lands in the head. With classic themes it gets enqueued late and prints in the footer. A filter could restore always-on loading for sites that style rel-me markup elsewhere.
We're running this from outside the plugin as a workaround. We dequeue at priority 20 unless indieweb_rel_me or hcard_display_defaults has fired, and re-enqueue if either fires later. Happy to open a PR with unit tests if the approach works for you. It would complement #300, which shrinks the file itself.
Activity
lhero-org commentedon Sep 26, 2026
We hit this on a WordPress multisite running IndieWeb 5.2.0.
indieweb.cssis about 120 KB raw (28 KB gzipped) and is enqueued on every front-end page, but it only styles rel-me links and h-cards.The plugin already runs code at exactly the points where the CSS is needed:
Indieweb\Hcard\User::get_rel_me_list()andIndieweb\Hcard\User::hcard(). So it could load on demand with no new option. Register the style onwp_enqueue_scriptsinstead of enqueueing it, then callwp_enqueue_style( 'indieweb' )from those two methods.With block themes the template renders before
wp_head, so the style still lands in the head. With classic themes it gets enqueued late and prints in the footer. A filter could restore always-on loading for sites that style rel-me markup elsewhere.We're running this from outside the plugin as a workaround. We dequeue at priority 20 unless
indieweb_rel_meorhcard_display_defaultshas fired, and re-enqueue if either fires later. Happy to open a PR with unit tests if the approach works for you. It would complement #300, which shrinks the file itself.pfefferle commentedon Sep 26, 2026
Thanks for the detailed report! The approach looks good to me,
get_rel_me_list()andhcard()should cover all the places where the CSS is needed.A few notes for the PR:
indiewebhandle, so theiw_relme_bwoption still works.Happy to review a PR!