docfx icon indicating copy to clipboard operation
docfx copied to clipboard

A single word in the topic title may be broken at arbitrary points (default template css)

Open svver opened this issue 10 years ago • 7 comments

The default template CSS set word-break property to "break-all" for h1,h2 and so on, so the title may look ugly. For me this looks this way: image Is this a desired behaviour?

svver avatar Mar 24 '16 18:03 svver

I've noticed this too, it's definitely not desirable from my perspective. Maybe to accommodate very long unbroken strings in namespaces etc.

simonmurdock avatar Mar 25 '16 06:03 simonmurdock

@simonmurdock, indeed, here is an example where a long namespace takes tho lines. image If I set "word-break" to "normal" all the namespace goes to the new line. In case of a very long namespace this will be a problem.

I would split namespaces using "." as a separator and then insert an i tag with a space and set font-size to 1px:

Namespace Microsoft.<i> </i>CodeAnalysis.<i> </i>Workspaces.<i> </i>Dnx

<style>
   i {font-size: 1px}
</style>

svver avatar Mar 25 '16 11:03 svver

That makes sense. Would be good to move that "improve this doc" button somewhere else and reduce the font size a bit.

simonmurdock avatar Mar 25 '16 14:03 simonmurdock

We just moved "improve this doc" to the right navigation via #626 , and we will have action items to refactor the word wrap.

hellosnow avatar Aug 25 '16 08:08 hellosnow

How about surrounding the dot with U+200B ZERO WIDTH SPACE. See #1222.

richardschneider avatar Jan 22 '17 21:01 richardschneider

Sorry for the late updates, we fixed the title space by #1695 , the github pages will be refreshed after v2.18.0 is released.

hellosnow avatar May 26 '17 09:05 hellosnow

The code is in dev branch and not in master yet, the github pages will be refreshed after v2.19 is released.

hellosnow avatar May 31 '17 04:05 hellosnow