Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#27908 closed defect (bug) (fixed)

Arrow in "Continue reading" text should be preceded by a non-breaking space

Reported by: crculver's profile CRCulver Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.1 Priority: low
Severity: minor Version: 3.8
Component: Bundled Theme Keywords: good-first-bug has-patch commit
Focuses: template Cc:

Description

When [more] is used, the text "Continue reading →" appears. However, the space between "reading" and the arrow "→" is a normal space, which can cause the arrow to be separated from the words "Continue reading" and appear one line down or even further from the text, especially common when dealing with floating images. This is not typographically elegant. I am attaching a screenshot.

I suggest that this text be changed to "Continue reading →", and the HTML entity for the non-breaking space will ensure that the line remains together.

Attachments (10)

continuereading.png (13.3 KB) - added by CRCulver 11 years ago.
Screenshot to show inappropriate line breaking
27908-twentyfourteen.patch (7.5 KB) - added by dominik.schwind 11 years ago.
Patch for the twentyfourteen theme.
27908-twentyfourteen-pot.patch (856 bytes) - added by dominik.schwind 11 years ago.
The pot-file was missing in the original patch.
27908-twentythirteen.patch (9.3 KB) - added by dominik.schwind 11 years ago.
Patch for the twentythirteen theme.
27908-twentytwelve.patch (4.7 KB) - added by dominik.schwind 11 years ago.
Patch for the twentytwelve theme.
27908-twentyeleven.patch (6.7 KB) - added by dominik.schwind 11 years ago.
Patch for the twentyeleven theme.
27908-twentyten.patch (2.8 KB) - added by dominik.schwind 11 years ago.
Patch for the twentyten theme.
27908.patch (877 bytes) - added by SergeyBiryukov 11 years ago.
27908.diff (774 bytes) - added by DustinHartzler 10 years ago.
27908.2.diff (2.1 KB) - added by SergeyBiryukov 10 years ago.

Download all attachments as: .zip

Change History (38)

@CRCulver
11 years ago

Screenshot to show inappropriate line breaking

#1 @CRCulver
11 years ago

  • Summary changed from Arrow in "Continuing reading" text should be preceded by a non-breaking space to Arrow in "Continue reading" text should be preceded by a non-breaking space

#2 @SergeyBiryukov
11 years ago

  • Component changed from General to Bundled Theme
  • Focuses template added

Looks like this applies to all our bundled themes.

#3 @helen
11 years ago

  • Version changed from 3.9 to 3.8

#4 @obenland
11 years ago

  • Keywords good-first-bug added

@dominik.schwind
11 years ago

Patch for the twentyfourteen theme.

#5 @dominik.schwind
11 years ago

Okay, I've added a patch for the twentyfourteen theme. (Hello, from the WordCamp in Zürich!)

This will mess up all the translations, though.

#6 @obenland
11 years ago

  • Keywords has-patch added; good-first-bug removed
  • Milestone changed from Awaiting Review to 4.0

@dominik.schwind
11 years ago

The pot-file was missing in the original patch.

@dominik.schwind
11 years ago

Patch for the twentythirteen theme.

#7 follow-up: @ocean90
11 years ago

Hello Dominik,

thanks for your patch. There is no need to patch the .pot files because they are auto-generated by our potbot (which is currently nacin. :))

#8 in reply to: ↑ 7 @dominik.schwind
11 years ago

Replying to ocean90:

Good to know. :) I'll patch ten to twelve, too.

@dominik.schwind
11 years ago

Patch for the twentytwelve theme.

@dominik.schwind
11 years ago

Patch for the twentyeleven theme.

@dominik.schwind
11 years ago

Patch for the twentyten theme.

#9 follow-up: @SergeyBiryukov
11 years ago

I wonder if we could patch get_the_content() instead, so that all themes (not just bundled ones) would benefit from this without breaking existing translations.

See 27908.patch, which replaces regular spaces with   outside of HTML tags.

#10 in reply to: ↑ 9 @dominik.schwind
11 years ago

Replying to SergeyBiryukov:

I wonder if we could patch get_the_content() instead, so that all themes (not just bundled ones) would benefit from this without breaking existing translations.

Yes, that's probably the cleaner way of doing it.

#11 @lancewillett
11 years ago

  • Component changed from Bundled Theme to Formatting

#12 @miqrogroove
10 years ago

This seems like more of a style bug to me. Why do we have to change the text?

#13 @SergeyBiryukov
10 years ago

Indeed, .more-link { white-space: nowrap; } would resolve this for a particular theme.

Should we perhaps make it a suggestion in theme review guidelines?

#14 @grapplerulrich
10 years ago

@SergeyBiryukov The official guidlines are here: http://make.wordpress.org/themes/guidelines/

#15 @DrewAPicture
10 years ago

  • Keywords commit added

27908.patch still applies. Seems like the cleaner solution. Moving for commit consideration.

This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.


10 years ago

#17 @obenland
10 years ago

I think CSS would be the more elegant route. And in light of avoiding default styles recently (HTML5 galleries and captions, and such), I'm leaning towards letting themes handle it.

This ticket was mentioned in IRC in #wordpress-dev by obenland. View the logs.


10 years ago

This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.


10 years ago

#20 @obenland
10 years ago

  • Keywords close added; commit removed

The more I think about it, the stronger I feel about it being something a theme should address.
We don't filter the_title() to prevent orphans either.

#21 @SergeyBiryukov
10 years ago

Should we address it in bundled themes then?

#22 @obenland
10 years ago

  • Component changed from Formatting to Bundled Theme
  • Keywords needs-patch added; has-patch close removed
  • Milestone changed from 4.0 to Future Release
  • Priority changed from normal to low
  • Severity changed from normal to minor

Yes, let's go with your suggestion.

#23 @obenland
10 years ago

  • Keywords good-first-bug added

#24 @DustinHartzler
10 years ago

Added .more-link { white-space: nowrap; } to twentyfourteen and twentythirteen themes in 27908.diff

#25 @Viper007Bond
10 years ago

  • Keywords has-patch added; needs-patch removed

#26 @SergeyBiryukov
10 years ago

  • Keywords commit added

27908.diff is a good start, but it only applies to print styles.

27908.2.diff should cover this for all the bundled themes.

#27 @SergeyBiryukov
10 years ago

  • Milestone changed from Future Release to 4.1

#28 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 29771:

Bundled themes: Prevent the arrow in "Continue reading" links from wrapping to a second line.

props DustinHartzler, dominik.schwind.
fixes #27908.

Note: See TracTickets for help on using tickets.