Hello! I was just reading the CSS-Fonts-3 spec to learn about about the strings allowed inside format()
, but due to hyphens: auto;
being applied on the text of the spec itself, it appeared like "open-type" was allowed, when in reality the text of the spec says it's "opentype" that's allowed.
I checked a couple of other specs and the same hyphenation rule seems to affect them as well, I wonder how many other people this has tripped up and frustrated.
Here's what I see in my browser for this section:
And here's the HTML content without the hyphenation applied:
Could the auto hyphenation be removed for any quoted strings, or even the whole text? Now that I'm looking at it, I don't think it's helping the legibility of the unquoted words either.
Thanks for the bug report. This turns out to potentially affect all W3C specifications. I just posted the following to [email protected]
:
A bug was raised against a CSS specification, because it seemed as if a hyphen was allowed in a keyword ("open-type" as well as "opentype").
https://github.com/w3c/csswg-drafts/issues/2307
It turned out not to be a bug in the grammar but to be introduced by the styling. Furthermore, that bug is in base.css and thus affects all W3C specs, not just CSS WG ones.
The rule in question is
body { hyphens: auto}
Hyphenation is fine in general, but not when it alters the technical content of a specification.
https://lists.w3.org/Archives/Public/spec-prod/2018JanMar/0014.html
In the meanwhile, marking up such text in the <code>
element turns off hyphenation.
Most helpful comment
In the meanwhile, marking up such text in the
<code>
element turns off hyphenation.