WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#18486 closed enhancement (invalid)

Add CSS3 Hyphenation to Twenty Eleven

Reported by: sksmatt Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.2.1
Component: Bundled Theme Keywords: has-patch dev-feedback
Focuses: Cc:
PR Number:

Description

Yesterday’s release of Firefox 6 and last month’s release of Safari 5.1 on OS X Lion mean that two browsers now support CSS 3 hyphenation.

Turning on hyphenation is easy. Only needs this rule:

p {
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

Attachments (1)

style.diff (329 bytes) - added by sksmatt 8 years ago.

Download all attachments as: .zip

Change History (9)

@sksmatt
8 years ago

#1 @dd32
8 years ago

  • Component changed from Themes to Bundled Theme

#2 @johnbillion
8 years ago

  • Cc johnbillion@… added

#3 follow-up: @toscho
8 years ago

  • Cc info@… added

Could you point out why this is useful and which problem it will solve?

In languages with longer average words (Finnish, German) we would risk too many hyphenated line endings. I think this is rather a child theme territory.

#4 in reply to: ↑ 3 @sksmatt
8 years ago

Good points. Might be mostly a design preference. This is what I have:

Replying to toscho:

Could you point out why this is useful and which problem it will solve?

Extracts from [Font Deck http://blog.fontdeck.com/post/9037028497/hyphens]

Why Hyphenation?

"[...] Justified text (where words line up on both the left and right margins) generally looks terrible on the web because ‘rivers’ of white are introduced through the text as words are spaced apart to make lines touch both margins. These rivers make reading harder as the eye is drawn down them instead of along the line of text. If justification is not applied then lines of text can still appear overly ‘ragged’ at their ends. This tends to prohibit use of narrow measures (short lines). Hyphenation helps alleviate both these issues."

In languages with longer average words (Finnish, German) we would risk too many hyphenated line endings. I think this is rather a child theme territory.

"It works for all languages which have a hyphenation dictionary. You will need to specify the language of the text somewhere, either in an HTTP header or by using the lang="en" or lang="fr", etc attribute where hyphenation is required."

#5 @toscho
8 years ago

TwentyEleven doesn’t use justified text. And it shouldn’t for a long, long time.

It works is not the same as it is aesthetically acceptable, that’s why I asked which problem this would solve. A child theme using justified text can add the hyphenation rules too. Left aligned text like in TwentyEleven doesn’t create rivers of white space.

#6 @johnbillion
8 years ago

I agree with toscho. Hyphenation is intended to improve justified text and adds very little to left-aligned text, especially with longer line length. Best left to a child theme.

#7 @sksmatt
8 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Thanks for the feedback guys, will set as invalid/close.

#8 @SergeyBiryukov
8 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.