Skip to content

Likes feature loads unminified render-blocking CSS on every page #46671

@westonruter

Description

@westonruter

Impacted plugin

Jetpack

Quick summary

Similar to #44532, I found that the when I enable the Likes feature, I am getting the CSS for the feature added to every page, even though the Like block isn't on the page.

Furthermore, I notice that the CSS is not minified and not inlined:

<link rel='stylesheet' id='jetpack_likes-css' href='https://example.com/wp-content/plugins/jetpack/modules/likes/style.css?ver=15.4' media='all' />

The stylesheet needs to be minified, conditionally-enqueued, and the path data needs to be added to the stylesheet so it is eligible for inlining so it needn't be render-blocking.

This is part of #8195.

Steps to reproduce

  1. Enable the Likes feature
  2. View a page that doesn't have the Likes block added to a block template.
  3. See render-blocking unminified stylesheet added to the HEAD.

Site owner impact

More than 60% of the total website/platform users

Severity

Moderate

What other impact(s) does this issue have?

No response

If a workaround is available, please outline it here.

No response

Platform (Simple and/or Atomic)

Self-hosted

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions