Skip to content

[mediaqueries] media query for relative animation performance #13316

@jcayzac

Description

@jcayzac

(update: fast) covers a whole spectrum of relative sluggishness. A low-end smartphone in battery-saving mode is incapable of executing large CSS animations or cross-page transitions other than fade-in/fade-out in a way that does not negatively impact its end user's experience.

Yet, there is currently no way for web developers to detect this and dial animations down.

What could be done to solve this?

  1. A (refresh-rate:) media query requiring a minimal number of FPS would probably not work, due to refresh rates being variable nowadays and the idle refresh rate probably kept low in the absence of any scrolling or animating. One way it could work would be by matching by default, but not match for a period after the refresh rate during scrolling or animating has dropped below the threshold, still.
  2. An aggregate measure of the recent rendering smoothness and CPU load could be exposed to provide some performance grade, and a new media query made to match only if a certain grade is met.
  3. More ideas welcome!

Metadata

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