Scripsit Ben C:
>> This first question is: why would anyone write such a monstrosity?
>
> Often because it's a URL generated by something like a content
> management system that requires at least one unique URL for each atom
> in the universe.
Then this problem should be fixed instead of trying to make the display
of a monstrous URL wrapped. URLs are to be used in attribute values in
HTML, not as textual content (except when you _discuss_ URLs as strings,
and then you should be competent enough in HTML matters and "URL in
context" rules).
>> There is nothing in CSS as currently defined to
>> suggest either hyphenation or breaking strings without hyphenation-
>
> Well, in the sense that CSS doesn't define exactly what a
> "line-breaking opportunity" is.
It doesn't define it at all. It would be appropriate to say that _HTML_
doesn't define it exactly (but makes, unline CSS, some vague feeble
attempts at making notes that remotely resemble excuses for parts of
draft definitions).
> But it does imply that browsers
> should only ever break lines at line-breaking opportunities, and that
> what counts as a line-breaking opportunity doesn't change just
> because there is less space available.
Huh, what, where? I don't see such things in CSS specs. The statement
"browsers should only ever break lines at line-breaking opportunities"
is more or less a truism (line break opportunities are line break
opportunities), but I don't think CSS says even that.
In CSS 3 drafts, there are attempts at defining properties for line
breaking control, but they are incomplete sketches that have made little
if any progress during the last few years, and they are neither
normative or even proposed normative document nor implemented even
experimentally in available browsers, except for some properties.
> In fact Unicode specifications do define a lot of stuff about line
> breaking
Quite a lot indeed, with many oddities.
> and most browsers either implement that or a simplification
> of it although as we know they aren't required to.
I don't think any browser even tries to get close to implementing
Unicode line breaking rules or even a simplification of them. Rather,
browsers may apply some of those rules, typically in a poor way they
were never meant to be used. The rules say that you may break after a
hyphen, but it's just stupid to do so in a string like " -x ".
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/