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

Feature: Add support for -webkit-hyphens & -ms-hyphens #779

Open
SteelWagstaff opened this issue Jun 2, 2021 · 1 comment
Open

Feature: Add support for -webkit-hyphens & -ms-hyphens #779

SteelWagstaff opened this issue Jun 2, 2021 · 1 comment
Labels
book theme options related to the appearance of a book (its theme) and what a user can control without using custom CSS buckram This issue affects book theme components bug Something isn't working needs-reproduction

Comments

@SteelWagstaff
Copy link
Member

SteelWagstaff commented Jun 2, 2021

Description

Reported by Thomas Dumm:

I looked at a book (using the Malala theme) on my iphone with iOS13. I noticed that the justified text had many large “holes” and that no hyphenation was happening on the iphone despite the hyphens: auto CSS rule. I then added -webkit-hyphens: auto to the custom css and the justified text looked nice on the iphone too. Apparently iOS (also the latest version 13) only knows -webkit-hyphens. So maybe it makes sense to add -webkit-hyphens auto to the right place in the theme css (or in buckram?). Maybe include the -ms prefixes too?

https://caniuse.com/#feat=css-hyphens

Hyphens are set in McLuhan in a few places (

// Hyphenation
body,
p {
hyphens: $para-hyphens;
hyphenate-before: $para-hyphenate-before;
hyphenate-after: $para-hyphenate-after;
hyphenate-lines: $para-hyphenate-lines;
}

$para-hyphens: auto !default;

It also looks like several themes use -webkit-hyphens. See https://github.com/search?q=org%3Apressbooks+%22-webkit-hyphens%22&type=Code

@SteelWagstaff SteelWagstaff added book theme options related to the appearance of a book (its theme) and what a user can control without using custom CSS buckram This issue affects book theme components labels Jun 2, 2021
@SteelWagstaff SteelWagstaff added bug Something isn't working needs-reproduction labels Jul 31, 2022
@SteelWagstaff
Copy link
Member Author

We removed justification from the Malala theme. Need to see if the hyphen issue still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
book theme options related to the appearance of a book (its theme) and what a user can control without using custom CSS buckram This issue affects book theme components bug Something isn't working needs-reproduction
Projects
None yet
Development

No branches or pull requests

1 participant