# rodneyrehm/viewport-units-buggyfill

Making viewport units (vh|vw|vmin|vmax) work properly in Mobile Safari.

Repository: https://github.com/rodneyrehm/viewport-units-buggyfill
Canonical: https://ross.abutalabs.com/products/viewport-units-buggyfill
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2022-05-11T23:33:47+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4605, "days_push": 1575, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1581, forks 148 (observed 2026-08-28T04:05:06.947551+00:00)

## What it is
A JavaScript buggyfill that makes CSS viewport units (vh, vw, vmin, vmax) work correctly in Mobile Safari and other buggy browsers like old IE and Android Stock Browser. It reads stylesheets via the CSSOM, resolves viewport units against the viewport dimensions, and re-injects computed CSS, updating on orientation change.

## Use cases
- fix vh/vw units breaking layouts in Mobile Safari
- make calc() with viewport units work in IE9+
- support vmin and vmax in older IE
- fix viewport units in old Android Stock Browser
- handle layout recalculation on device orientation change

## When to choose
- you must support Mobile Safari or legacy IE/Android browsers where viewport units misbehave
- your CSS relies on vh/vw/vmin/vmax and you see rendering bugs on mobile WebKit
- you need a drop-in script rather than a build-time CSS transform

## When to avoid
- you only target modern evergreen browsers where viewport units work correctly
- you rely on viewport units in inline style attributes (not supported)
- your stylesheets are cross-origin without CORS or contain relative asset URLs that the re-injection would break

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, developer-tools
- domain: web-development, frontend, cross-platform
- platform: browser
- tags: css, viewport-units, buggyfill, mobile-safari, polyfill, legacy-browser-support, web-server

## Member repositories
- rodneyrehm/viewport-units-buggyfill (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:06.947551+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:56:34.504017+00:00, confidence not recorded.
  - readme: https://github.com/rodneyrehm/viewport-units-buggyfill (fetched 2026-08-28T04:05:06.947551+00:00, sha c4fe1f670fc9)
  - registry_npm: https://registry.npmjs.org/viewport-units-buggyfill (fetched 2026-08-29T11:26:54.085084+00:00, sha 0b41f78ffdbf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
