Skip to content

Issue with new iAPI region-based navigation CSS loading #68691

@sethrubenstein

Description

@sethrubenstein

Description

The new iAPI router dynamic css loading has one major issue. When using CSSStyleSheet to regenerate styles, something is happening with the order of rules and how browsers are reading them.

Step-by-step reproduction instructions

  1. Enable iAPI in core/query block loop. Or any block that supports iAPI routing on a page.
  2. Place a core/social-links block set to small logos only add some icons.
  3. Go to your page with the iAPI core/query block and navigate to another page of results using the iAPI router.
  4. Observe the padding change on the core/social-links block as the styles are re-generated.

Screenshots, screen recording, code snippet

CleanShot.2025-01-15.at.13.25.09.mp4

Environment info

  • WP 6.7
  • Gutenberg 20
  • Demo video is via WP Playground

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

Labels

[Feature] Interactivity APIAPI to add frontend interactivity to blocks.[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions