{"id":15297167,"url":"https://github.com/kennethormandy/hanging-punctuation","last_synced_at":"2025-10-22T21:20:58.540Z","repository":{"id":18757009,"uuid":"21969401","full_name":"kennethormandy/hanging-punctuation","owner":"kennethormandy","description":"A polyfill for proper hanging punctuation in CSS.","archived":false,"fork":true,"pushed_at":"2014-07-22T18:21:15.000Z","size":296,"stargazers_count":50,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-11T23:52:40.969Z","etag":null,"topics":["typography"],"latest_commit_sha":null,"homepage":"http://kennethormandy.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Boldewyn/jQuery.exdent","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kennethormandy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-18T05:56:46.000Z","updated_at":"2023-12-08T21:45:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kennethormandy/hanging-punctuation","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethormandy%2Fhanging-punctuation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethormandy%2Fhanging-punctuation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethormandy%2Fhanging-punctuation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethormandy%2Fhanging-punctuation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kennethormandy","download_url":"https://codeload.github.com/kennethormandy/hanging-punctuation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877409,"owners_count":16554890,"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":["typography"],"created_at":"2024-09-30T19:15:28.456Z","updated_at":"2025-10-07T10:30:51.054Z","avatar_url":"https://github.com/kennethormandy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e _Hanging punctuation_ prevents quotations and other marks from taking a bite out of the crisp left edge of a text block. Make a clean edge by pushing the quotation marks into the margin.\u003cbr/\u003e\n\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;—Ellen Lupton, _Thinking with Type, 2\u003csup\u003end\u003c/sup\u003e Revised and Expanded Edition_\n\n# Hanging Punctuation\n\nA polyfill for proper [hanging punctuation](http://www.w3.org/TR/css-text-3/#hanging-punctuation) in CSS.\n\nThe `hanging-punctuation` property should be part of CSS in the future, but no browser supports in yet. In the meantime, this [Stylefill](https://github.com/nathanford/stylefill/) polyfills the missing features through the exact same CSS:\n\n```css\np {\n  hanging-punctuation: first;\n  /* Dynamically hang punctuation\n     on the left margin. */\n}\n\nhtml[lang=\"zh-Hans\"] {\n  text-align: justify;\n  hanging-punctuation: allow-end;\n  /* Allow ending punctuation\n     to hang even when justified. */\n}\n```\n\nNow, the first glyph only hangs if it is at the beginning of a line. This corrects\n\n```\n“Lorem  ipsum  dolor  sit  amet, consectetuer\nadipiscing elit. Ut a sapien alt,” they said,\n“Purus  molestie  dolor. Integer  quis eros ut\nerat posuere dictum.”\n```\n\nto this:\n\n```\n“Lorem  ipsum  dolor  sit  amet, consectetuer\n adipiscing elit. Ut a sapien alt,” they said,\n“Purus  molestie  dolor. Integer  quis eros ut\n erat posuere dictum.”\n```\n\n## Getting started\n\nHanging Punctuation is a [Stylefill](https://github.com/nathanford/stylefill/), meaning you only need to interact with this library through your CSS, and browsers that already support the `hanging-punctuation` property won’t use this polyfill.\n\nTo install Hanging Punctuation, add it to your project or use the package manager and build tool of your choice.\n\n\u003c!--\n\n##### Manually\n\n--\u003e\n\n##### With npm\n\n```bash\nnpm install kennethormandy/hanging-punctuation\n```\n\nNow it’s ready to include through your task runner or build tool, or you may just reference the files in your HTML:\n\n```html\n\u003cscript src=\"node_modules/hanging-punctuation/hanging-punctuation.min.js\"\u003e\u003c/script\u003e\n```\n\n##### With Component\n\n```bash\ncomponent install kennethormandy/hanging-punctuation\n```\n\n##### With Bower\n\n```bash\nbower install hanging-punctuation\n```\n\n## Running locally\n\nTo run the tests locally:\n\n```bash\ngit clone https://github.com/kennethormandy/hanging-punctuation\nnpm install\nnpm test\n# Now visit http://127.0.0.1:8080/test\n```\n\n## Contributing\n\nThanks for considering contributing! There’s information about how to [get started with Hanging Punctuation here](CONTRIBUTING.md).\n\n## License\n\n[The MIT License (MIT)](LICENSE.md)\n\nCopyright © 2014 [Kenneth Ormandy](http://kennethormandy.com) \u0026 [Chloi Inc.](http://chloi.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethormandy%2Fhanging-punctuation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkennethormandy%2Fhanging-punctuation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethormandy%2Fhanging-punctuation/lists"}