Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 1.11 KB

unorphan.md

File metadata and controls

13 lines (12 loc) · 1.11 KB
  • unorphan
  • the real solution is to create component that would wrap whatever content and would wrap the last x works in a span with a class. that span will get white-space: nowrap; and will work with SSG/SSR because it will go through children and operate that way, and if the component is set to render in the client as well then it can (optionally) make sure that the last line is not too long (see areUnorphanedWordsShorterThanHalfParentContentWidth)
  • https://cloudfour.com/thinks/responsive-headlines-are-about-to-get-awesome/ + comments
  • extract unorphan into a separate npm package

https://www.npmjs.com/package/jquery-unorphanize https://www.npmjs.com/package/@threespot/unorphanize https://www.npmjs.com/package/unorphan