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

[Suggestion] Avoiding Rivers in the justified text by using hyphens: auto #58

Open
ganar opened this issue Sep 12, 2022 · 4 comments
Open

Comments

@ganar
Copy link

ganar commented Sep 12, 2022

[Suggestion] The justified text looks a lot better if you use hyphens:auto, particularly in small screens.

p {
    margin: 0;
    padding: 0.25em 0;
    text-align: justify;
    hyphens: auto;
}
@meyerweb
Copy link
Contributor

The CSS does apply hyphens: auto to the body (see https://github.com/chrisgriffith/glasstone-dolan/blob/main/html/style.css#L19-L22), and I’m seeing that inherited by paragraphs in the browsers I have available to test. Which browser/OS were you using that didn’t get the hyphenation?

@ganar
Copy link
Author

ganar commented Sep 13, 2022

I was using Brave on a Mac and Safari on my iphone SE 2020. I´ve checked a number of pages with rivers —which are apparent on mobile— and could not find a single instance of a hyphen.

@meyerweb
Copy link
Contributor

I found out (or had forgotten) that Safari still requires the webkit- prefix on hyphens, so I’ll update the CSS to read:

body {
	font: 1em/1.35 Cambria, Times, serif;
	-webkit-hyphens: auto;
	hyphens: auto;
}

Not sure how long it will be before that’s deployed, but it will get into the site sooner or later.

I’m not sure why Brave didn’t hyphenate for you; it’s based on Chromium, which does support hyphenating English on the Mac, at least according to my copy of Chrome 105. So Brave ought to do the same, as I understand it. I’ll try it myself once I get Brave downloaded and see what I can learn.

@acidus99
Copy link

This issue appears to have been fix with:
4072f2e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants