{"id":17304816,"url":"https://github.com/lgarron/minimal-html-style","last_synced_at":"2026-02-01T23:02:55.392Z","repository":{"id":66794217,"uuid":"566647920","full_name":"lgarron/minimal-html-style","owner":"lgarron","description":"✨ An HTML style snippet that looks nice on all devices while being as small as possible.","archived":false,"fork":false,"pushed_at":"2026-01-13T21:35:26.000Z","size":2507,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-13T23:49:01.484Z","etag":null,"topics":["css","dark-mode","responsive"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lgarron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-16T05:36:59.000Z","updated_at":"2026-01-13T21:35:29.000Z","dependencies_parsed_at":"2023-04-01T13:05:13.400Z","dependency_job_id":null,"html_url":"https://github.com/lgarron/minimal-html-style","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lgarron/minimal-html-style","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgarron%2Fminimal-html-style","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgarron%2Fminimal-html-style/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgarron%2Fminimal-html-style/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgarron%2Fminimal-html-style/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lgarron","download_url":"https://codeload.github.com/lgarron/minimal-html-style/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgarron%2Fminimal-html-style/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["css","dark-mode","responsive"],"created_at":"2024-10-15T11:53:56.911Z","updated_at":"2026-02-01T23:02:55.384Z","avatar_url":"https://github.com/lgarron.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimal HTML `\u003cstyle\u003e`\n\nAn HTML style snippet that looks nice on all devices while being as small as possible.\n\n## Snippet\n\nPlace in the `\u003chead\u003e` of a page:\n\n```html\n  \u003c!-- From: https://github.com/lgarron/minimal-html-style (v1.0.0) --\u003e\n  \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=0.75\"\u003e\n  \u003cstyle\u003e\n    :root { color-scheme: light dark; }\n    html {\n      font-family: -apple-system, Roboto, Ubuntu, Tahoma, sans-serif;\n      font-size: 1.25rem; padding: 2em;\n      display: grid; justify-content: center;\n    }\n    body { width: 100%; max-width: 40em; margin: 0; overflow: scroll; }\n  \u003c/style\u003e\n```\n\nSee [`index.html`](./index.html) for more.\n\n## Explanation\n\nThe snippet makes these opinionated choice:\n\n- **Sans-serif font** — for less-cluttered screen display.\n- **Slightly larger font** — for easier reading, especially for pages with very few (even one) line of text.\n- **Horizontally centered text** — for visual balance.\n- **Limited column width** — for easier reading and scanning on large screens, automatically adjusting (\"responsive\") to fill smaller screens.\n- **Dark mode** — with corresponding text and link color fixes.\n- **Mobile viewport scaling** — to prevent very small text size on mobile screens.\n\nExcluded choices:\n\n- No **vertical centering** — this can interfere with other CSS too easily.\n- No **general resets** — this is not a CSS framework, just a way to spruce up pages that you want put together in a minute and move on.\n\n## Additional changes you might like\n\n### Justify the text column\n\n```css\nbody {\n  text-align: justify;\n}\n```\n\nAlso see: [`text-wrap: pretty`](https://webkit.org/blog/16547/better-typography-with-text-wrap-pretty/).\n\n### Fully center the body\n\n```css\nhtml {\n  min-height: 100%;\n  place-content: center;\n  box-sizing: border-box;\n}\n```\n\n## Screenshots\n\n### iOS\n\n\u003cimg src=\"./screenshots/ios-safari-horizontal-dark.png\" height=\"200\"\u003e\n\n\u003cimg src=\"./screenshots/iOS-safari-vertical-light.jpg\" height=\"300\"\u003e\n\n### Android\n\n\u003cimg src=\"./screenshots/android-chrome-light-landscape.png\" height=\"200\"\u003e\n\n### Laptop\n\n\u003cimg src=\"./screenshots/macOS-safari-medium_size-dark.png\" height=\"400\"\u003e\n\n### Large screen (5K)\n\n\u003cimg src=\"./screenshots/macOS-chrome-dark-5K.png\" width=\"600\"\u003e\n\n### Narrow window\n\n\u003cimg src=\"./screenshots/macOS-chrome-dark-tall.png\" width=\"300\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgarron%2Fminimal-html-style","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flgarron%2Fminimal-html-style","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgarron%2Fminimal-html-style/lists"}