Skip to content

Include styles in <head> instead of footer #181

Open
@mikemanger

Description

Currently the plugin enqueues block and global block styles in the footer, this is causing some large Cumulative Layout Shift (CLS) issues across our sites. It also makes it difficult/confusing to override styles for individual blocks via the className property.

The fix should just involve moving the enqueue styles code out of the render callback and some logic to add the relevant args to the register_block_type() function call.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions