Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LaTeX style hyphenation #14

Closed
jonrh opened this issue Jul 19, 2017 · 2 comments
Closed

Add LaTeX style hyphenation #14

jonrh opened this issue Jul 19, 2017 · 2 comments

Comments

@jonrh
Copy link
Owner

jonrh commented Jul 19, 2017

Make blog text justified. I think this should just be a simple CSS property but we will see. Look into if it is possible to have LaTeX style hyphenation. I have seen it before but not sure how it is implemented.

@jonrh
Copy link
Owner Author

jonrh commented Dec 3, 2017

Added text-align: justify. It's okay but not great. I will leave this issue open to maybe implement a proper LaTeX style hyphenation. I think it might require some libraries though.

@jonrh jonrh added the maybe label Jun 12, 2018
@jonrh jonrh changed the title Make blog text justified Add LaTeX style hyphenation Jun 12, 2018
@jonrh
Copy link
Owner Author

jonrh commented Aug 7, 2022

Noticed by chance while reading Cramming 'Papers, Please' Onto Phones that the site was using hyphenations:

.content p {
  hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  -webkit-hyphens: auto;
}

According to caniuse.com hyphens have 97% support with vendor prefixes and 78% unprefixed. For hyphens to work the HTML lang attribute must be specified which it already is. Support is lackluster for many languages but since this website is only in English it should work. Worth trying out at least.

jonrh added a commit that referenced this issue Aug 7, 2022
Noticed by chance while reading [Cramming 'Papers, Please' Onto Phones](https://dukope.com/devlogs/papers-please/mobile/) that the site was using hyphenations:

```css
.content p {
  hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  -webkit-hyphens: auto;
}
```

According to [caniuse.com](https://caniuse.com/?search=hyphens) `hyphens` have 97% support with vendor prefixes and 78% unprefixed. For hyphens to work the HTML `lang` attribute must be specified which it already is. Support is lackluster for many languages but since this website is only in English it should work. Worth trying out at least.

See: 
#14
@jonrh jonrh closed this as completed Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant