Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

<wp-inner-blocks> causes DOM differences between edit and frontend #50

@yscik

Description

@yscik

The <wp-inner-blocks> wrapper being added implicitly on the frontend is something block authors might not expect. It's not added in the editor right now, so anything relying on the DOM tree needs to handle two versions. Most notably this is styles with relationship selectors.

For example, Sensei's Flashcard block uses a structure where the first and second child blocks are considered the front and back of the card, respectively:

&--flipped-front > *:nth-child(1),
&--flipped-back > *:nth-child(2) { ... }

This is likely an edge case and can be worked around, but making it consistent across editor and frontend could improve the developer experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions