PHPackages                             arts/scroll-timeline-polyfill - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. arts/scroll-timeline-polyfill

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

arts/scroll-timeline-polyfill
=============================

Registers the flackr scroll-timeline polyfill as a self-gating WordPress script for browsers without native CSS scroll-driven animations, plus an opt-out API for stylesheets the polyfill must not transpile.

v1.0.1(1mo ago)070↓73.1%GPL-3.0-or-laterPHPPHP &gt;=8.0

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/artkrsk/arts-scroll-timeline-polyfill)[ Packagist](https://packagist.org/packages/arts/scroll-timeline-polyfill)[ RSS](/packages/arts-scroll-timeline-polyfill/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (8)Versions (3)Used By (0)

arts/scroll-timeline-polyfill
=============================

[](#artsscroll-timeline-polyfill)

Registers the [flackr/scroll-timeline](https://github.com/flackr/scroll-timeline) polyfill as a self-gating WordPress script, so CSS scroll-driven animations work in browsers that don't ship them yet (Firefox, at the time of writing).

Browsers with native support download a ~600-byte loader and nothing else. Everyone else gets the polyfill fetched on demand.

Usage
-----

[](#usage)

Boot the plugin from your own plugin's bootstrap:

```
\Arts\ScrollTimelinePolyfill\Plugin::instance();
```

If your plugin prefixes its vendor tree (Strauss and friends), call the prefixed class — the package resolves its own asset URLs from wherever it ends up.

Then depend on the registered handle — that's what orders the loader ahead of your code:

```
wp_register_script( 'my-effects', $url, array( 'scroll-timeline-polyfill' ), $ver, true );
```

The handle is shared: if two plugins register it, the first wins. Ship the same package version across your plugins so they agree on the patch level.

### Driving timelines from JavaScript

[](#driving-timelines-from-javascript)

The loader appends the polyfill asynchronously, so `ViewTimeline` is not there on your first tick. Await the loader's promise, which never rejects:

```
const state = await window.__artsScrollTimelinePolyfillReady
// 'native'      — the browser ships scroll-driven animations; nothing was loaded
// 'polyfilled'  — the polyfill is installed; window.ViewTimeline is usable
// 'unavailable' — no timelines: the fetch failed, or the polyfill aborted its
//                 own init. Fall back; never commit to a layout that needs a
//                 timeline to be usable.
```

### Opting a stylesheet out

[](#opting-a-stylesheet-out)

The polyfill's CSS layer refetches and re-serializes whole stylesheets through a naive parser. If you drive your animations from JS, or a sheet trips the parser, opt it out by handle:

```
add_filter(
	'arts/scroll_timeline_polyfill/skipped_styles',
	fn( $handles ) => array_merge( $handles, array( 'my-handle' ) )
);
```

This tags the `` with `data-aphrodite`, the polyfill's own skip vocabulary.

The vendored copy
-----------------

[](#the-vendored-copy)

`src/php/libraries/scroll-timeline/scroll-timeline.js` is upstream 1.1.0, built and then patched. Upstream is effectively frozen, so the deviations live here rather than as a fork. They're listed in the file's banner; in short:

1. **Per-stylesheet transpile errors are non-fatal.** Upstream aborts the entire init when one sheet throws, leaving `ViewTimeline` undefined and every animation dead. Elementor's own inline CSS does exactly this ("Empty selector" out of the parser).
2. **`` opts a sheet out.** Upstream honors the attribute on inline `` only.
3. **The whole body is wrapped in a native-support guard**, testing the named timeline syntax alongside the anonymous functions — a browser implementing only part of the feature must not be misread as fully native.
4. **Source measurement bails on detached sources.** Upstream throws when an AJAX page swap detaches a timeline source between observer registration and callback.

License
-------

[](#license)

GPL-3.0-or-later. The vendored polyfill is Apache-2.0 (© Google LLC and contributors); its license travels with it in `src/php/libraries/scroll-timeline/LICENSE`.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7bea30c2234cb7a9564df323f88f993da491615955ed3fb66a42db98c12d0d15?d=identicon)[artkrsk](/maintainers/artkrsk)

---

Top Contributors

[![artkrsk](https://avatars.githubusercontent.com/u/15735987?v=4)](https://github.com/artkrsk "artkrsk (5 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/arts-scroll-timeline-polyfill/health.svg)

```
[![Health](https://phpackages.com/badges/arts-scroll-timeline-polyfill/health.svg)](https://phpackages.com/packages/arts-scroll-timeline-polyfill)
```

###  Alternatives

[yii2mod/yii2-cart

Yii2 Shopping cart

12018.0k](/packages/yii2mod-yii2-cart)[davidwebca/wordpress-menu-classes

Allow adding custom classes to WordPress menu ul, li, a and at different depths. Perfect for TailwindCSS and AlpineJS usage.

3612.7k](/packages/davidwebca-wordpress-menu-classes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
