Skip to content

fix(lint): flag seek-unsafe CSS transitions - #3797

Open
Ftgn-dpA wants to merge 2 commits into
heygen-com:mainfrom
Ftgn-dpA:fix/css-transition-lint
Open

fix(lint): flag seek-unsafe CSS transitions#3797
Ftgn-dpA wants to merge 2 commits into
heygen-com:mainfrom
Ftgn-dpA:fix/css-transition-lint

Conversation

@Ftgn-dpA

@Ftgn-dpA Ftgn-dpA commented Sep 9, 2026

Copy link
Copy Markdown

What

Add a css_transition_used lint error for seek-unsafe CSS transition
declarations in <style> blocks and inline styles.

The rule covers standard and -webkit- transition properties, while allowing
explicit transition: none / transition-property: none declarations and
ignoring custom properties.

Why

CSS transitions run on the browser clock rather than the seekable Hyperframes
timeline. Class or attribute changes can therefore restart a transition on
fresh render workers, causing parallel renders and snapshots to produce
different frames.

Fixes #3493.

How

Use PostCSS to inspect actual declarations instead of matching raw CSS text.
Unsafe declarations report an error with guidance to keep state changes in
classes or attributes and move the visual animation onto the paused GSAP
timeline.

Test plan

  • Unit tests added/updated

  • Manual testing performed — not required for this parser-only rule

  • Documentation updated — not applicable

  • bun run --filter @hyperframes/lint test — 648 passed

  • bun run --filter @hyperframes/lint typecheck

  • bunx oxlint packages/lint/src/rules/core.ts packages/lint/src/rules/core.test.ts

  • bunx oxfmt --check packages/lint/src/rules/core.ts packages/lint/src/rules/core.test.ts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lint: flag CSS transition (seek-unsafe; adapter only covers @keyframes)

2 participants