The padding applied to the h1 (in conjunction with the non-breaking space) for Chapter 1. Understanding Drupal [in the User Guide, for instance
https://www.drupal.org/docs/user_guide/en/understanding-chapter.html
]
is causing the "g" in "Understanding" to wrap to the next line.

Comments

vegantriathlete created an issue. See original summary.

jhodgdon’s picture

Title: CSS padding causes strange wrapping » CSS padding in H1 page titles on docs pages causes strange wrapping
Project: User Guide » Bluecheese
Version: 8.x-0.x-dev » 7.x-2.x-dev
Component: Other » Code
Issue summary: View changes

Thanks! This is a Bluecheese Theme issue, and applies to all Documentation pages. Updating summary with link to page that has this problem.

jhodgdon’s picture

Also note that these non-breaking spaces are not, as far as I can tell, part of the page source. See also #2828248: Remove non-breaking space from titles

I don't know where the non-breaking spaces are coming from, but they are probably the main problem, not just the CSS. So this issue may not belong here. And that other one may be a duplicate.

eojthebrave’s picture

I'm pretty sure this is related to asciidoc, or the toolchain that processes the guide files and imports them into Drupal. These &nbsp characters are not present in other documentation pages.

My best guess from poking around a little bit is that this $autotoc.label.separator, in the feeds.xsl file is probably the culprit. The value of that is .&nbsp. However, I don't know how to change it, or have the asciidoc tools setup to test that change at the moment.

Jennifer, can you test to see if you replace this block in the feeds.xsl template if that fixes the problem? I guess we would have to look at the ouptput from asciidoc and see if the spaces are in the generated HTML, and then if changing this changes the spaces.

<xsl:if test="$label != ''">
   <xsl:value-of select="$autotoc.label.separator"/>
</xsl:if>

If that's the case, I think this issue belongs in the user_guide project and could probably get a different title.

eojthebrave’s picture

Additionally, we should also add word-wrap: normal; to the CSS for these titles. This would also help avoid this problem in the future. And, would actually solve it by itself if we decide we want to leave those non-breaking spaces.

jhodgdon’s picture

Ah. So... When I looked at the page source, I didn't see the non-breaking spaces, because instead of being HTML entities &nbsp; I think they are actually some ASCII non-breaking space character. So you are right, I can fix this in the scripts.

So this is really two different issues. How about if I fix the nbsp problem on #2828248: Remove non-breaking space from titles and we address the CSS problem on this issue, since this one has already been moved to Bluecheese?

jhodgdon’s picture

Project: Bluecheese » Drupal.org Design
Version: 7.x-2.x-dev »

I think this actually belongs in drupal.org design queue maybe.

jhodgdon’s picture

Status: Active » Fixed

The fix to #2828248: Remove non-breaking space from titles seems to have resolved this issue. I think we don't need to do anything else... so I'll mark this Fixed and if anyone sees lingering problems that we should still fix, we can reopen and address it with CSS now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.