{"id":13725267,"url":"https://github.com/postcss/postcss-100vh-fix","last_synced_at":"2025-10-19T09:32:00.447Z","repository":{"id":40997475,"uuid":"281863286","full_name":"postcss/postcss-100vh-fix","owner":"postcss","description":"PostCSS plugin to fix height/min-height: 100vh on iOS","archived":false,"fork":false,"pushed_at":"2023-03-27T02:41:40.000Z","size":563,"stargazers_count":929,"open_issues_count":5,"forks_count":12,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-04-14T02:32:51.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postcss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"open_collective":"postcss","github":"ai"}},"created_at":"2020-07-23T05:52:46.000Z","updated_at":"2024-04-11T22:18:53.000Z","dependencies_parsed_at":"2023-09-21T20:04:51.812Z","dependency_job_id":null,"html_url":"https://github.com/postcss/postcss-100vh-fix","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.06451612903225812,"last_synced_commit":"c864433c348e5bd0a18be38bfd3a83e12252091d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-100vh-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-100vh-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-100vh-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-100vh-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postcss","download_url":"https://codeload.github.com/postcss/postcss-100vh-fix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877451,"owners_count":16554898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:02:17.773Z","updated_at":"2025-10-19T09:31:55.187Z","avatar_url":"https://github.com/postcss.png","language":"JavaScript","readme":"# PostCSS `100vh` Fix\n\n\u003cimg align=\"right\" width=\"135\" height=\"95\"\n     title=\"Philosopher’s stone, logo of PostCSS\"\n     src=\"https://postcss.org/logo-leftp.svg\"\u003e\n\n[PostCSS] plugin to fix [iOS’s bug] with `100vh`.\n\nIt works in Chrome (just `-webkit-fill-available` causes problems in Chrome\nin some cases), iOS/iPad/MacOS Safari and [all other browsers].\nPure CSS solution, no JS required.\n\n```css\nbody {\n  /* Footer will be hidden on iOS Safari because of bottom panel */\n  height: 100vh;\n}\n```\n\n```css\nbody {\n  height: 100vh;\n}\n\n/* Avoid Chrome to see Safari hack */\n@supports (-webkit-touch-callout: none) {\n  body {\n    /* The hack for Safari */\n    height: -webkit-fill-available;\n  }\n}\n```\n\n\u003cimg src=\"https://maximilianschmitt.me/posts/css-100vh-mobile-browsers/lld-minimal-vs-normal-ui@2x.png\"\n     alt=\"100vh bug illusration Max Schmitt\"\n     title=\"By Max Schmitt\"\u003e\n\nIt works with `min-height` and `max-height` too.\n\n[all other browsers]: https://caniuse.com/#feat=viewport-units\n[iOS’s bug]: https://allthingssmitty.com/2020/05/11/css-fix-for-100vh-in-mobile-webkit/\n[PostCSS]: https://github.com/postcss/postcss\n\n\u003ca href=\"https://evilmartians.com/?utm_source=postcss-dark-theme-class\"\u003e\n  \u003cimg src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\"\n       alt=\"Sponsored by Evil Martians\" width=\"236\" height=\"54\"\u003e\n\u003c/a\u003e\n\n\n## Limits\n\nPure CSS solution is limited. For many cases you need to use JS-based hack like\n[`postcss-viewport-height-correction`]:\n\nOur hack do not work with partial height like `height: 90vh`\nor `height: calc(100vh - 60px)`.\n\nAlso, we do not fix Chrome for Android bug:\n\n\u003cimg src=\"https://chanind.github.io/assets/100vh_problem.png\"\n     alt=\"100vh Chrome bug illusration David Chanin\"\n     title=\"By David Chanin\"\u003e\n\n[`postcss-viewport-height-correction`]: https://github.com/Faisal-Manzer/postcss-viewport-height-correction\n\n\n## Usage\n\n**Step 1:** Install plugin:\n\n```sh\nnpm install --save-dev postcss postcss-100vh-fix\n```\n\n**Step 2:** Check you project for existed PostCSS config: `postcss.config.js`\nin the project root, `\"postcss\"` section in `package.json`\nor `postcss` in bundle config.\n\nIf you do not use PostCSS, add it according to [official docs][PostCSS]\nand set this plugin in settings.\n\n**Step 3:** Add the plugin to plugins list:\n\n```diff\nmodule.exports = {\n  plugins: [\n+   require('postcss-100vh-fix'),\n    require('autoprefixer')\n  ]\n}\n```\n\n**Step 4:** Use `height: 100vh` or `min-height: 100vh` in your CSS.\n","funding_links":["https://opencollective.com/postcss","https://github.com/sponsors/ai"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-100vh-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostcss%2Fpostcss-100vh-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-100vh-fix/lists"}