Skip to content

Animate the arrival bar with transform instead of inline-size - #154

Merged
MaggieCabrera merged 1 commit into
WordPress:trunkfrom
josephscott:arrival-transform
Oct 20, 2026
Merged

MaggieCabrera merged 1 commit into
WordPress:trunkfrom
josephscott:arrival-transform

Conversation

@josephscott

Copy link
Copy Markdown
Contributor

The arrival bar on single posts animates inline-size, which can't run on the compositor, so every frame of the sweep does style, layout, and paint on the main thread while the page is loading. Animating transform: scaleX() lets the compositor handle it, and the main thread no longer does layout or paint for it. RTL keeps the sweep direction with transform-origin: right.

Chrome's Performance panel shows it on the ipsum-arrival animation:

  • Before: Compositing failed: Unsupported CSS property: width
  • After: no compositing failures

The bar looks the same, and it still only runs when prefers-reduced-motion allows it.

Testing Instructions

  1. Open a single post, then in the DevTools Performance panel use Record and reload.
  2. Select ipsum-arrival in the Animations track - trunk shows "Compositing failed: Unsupported CSS property: width", this PR shows none.
  3. Check the bar still sweeps across the top and fades out, including in RTL.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Opus 5.5
Used for: Finding the issue, measuring the options, and the patch. Tightly guided, directed, and reviewed.

@github-actions github-actions Bot added the [Area] Global Styles Issues or PRs that touch theme.json or the base stylesheet. label Oct 12, 2026
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: josephscott <josephscott@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@MaggieCabrera MaggieCabrera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@MaggieCabrera
MaggieCabrera merged commit 7fce7eb into WordPress:trunk Oct 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Global Styles Issues or PRs that touch theme.json or the base stylesheet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants