hyphens:auto

Giganews Newsgroups
Subject: hyphens:auto
Posted by:  Stan Brown (the_stan_bro…@fastmail.fm)
Date: Mon, 10 Sep 2018

I just discovered this property, and was thrilled. I haven't tried
any other browsers yet, but with
    body { hyphens:auto; }
in my stylesheet, Firefox does quite a creditable job of hyphenating.
Now my ragged-right text is less ragged than it used to be.

I haven't yet found an example where I actually need this, but
thinking ahead:

How can we inhibit the user-agent from breaking a particular word? I
know that if we provide soft hyphens, the user-agent won't hyphenate
anywhere else, but is the a convenient way to tell it not to
hyphenate a particular word at all? Do we need to enclose it in <span
style="hyphens:manual">...</span>, or can we do something simpler
like put a soft hyphen before the first letter of the word? I spent
considerable time reading
https://drafts.csswg.org/css-text-3/
but couldn't find an answer to my question.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
                                      http://BrownMath.com/
                                http://OakRoadSystems.com/
HTML 4.01 spec:http://www.w3.org/TR/html401/
validator:    http://validator.w3.org/
CSS 2.1 spec:  http://www.w3.org/TR/CSS21/
validator:    http://jigsaw.w3.org/css-validator/
Why We Won't Help You:http://preview.tinyurl.com/WhyWont

Replies