W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Re: [css-text] text-transform:capitalize and Unicode digraphs

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 16 Mar 2015 09:13:34 -0700
Cc: Jonathan Kew <jfkthame@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <8D0B07F6-0696-4522-A2C7-79199BF95B67@gmail.com>
To: Patrick Dark <www-style.at.w3.org@patrick.dark.name>


> On Mar 15, 2015, at 7:17 PM, Patrick Dark <www-style.at.w3.org@patrick.dark.name> wrote:
> 
>> On 3/15/2015 5:18 PM, Jonathan Kew wrote:
>> But I think it's reasonable to suppose that sites might be applying text-transform:capitalize to elements such as headlines that are being pulled from external data sources, and that some of that external data -- not under the control of the designer writing the CSS for the aggregating site -- might at times be provided in all-caps.
> 
> That seems unlikely;

It happens all the time. 

> if the vast majority of headlines one is aggregating uses conventional title case,

Depends on the source of your headlines. If the source is the first several words of a comment someone left, for instance, it might be in all caps, all lowercase, or anything in between. In such cases, text-transform:capitalize is a good way to stylistically normalize the case into something that looks like a title. 

> then text-transform: capitalize is going to make most imported content look worse by capitalizing things like articles, conjunctions, prepositions, and proper nouns like "amiibo", "document.URL", or "iPhone" which, conventionally, begin with a lowercase letter.

If your source is so pristine that everyone writing the headlines is consistently following the style guide for not capitalizing articles, conjunctions, prepositions, etc. then you don't need text-transform:capitalize. But others do, even if it is more simplistic algorithm. 

> If an aggregator is willing to Take mangle their imported text like that, then I don't see why they'd be particularly concerned about an all-caps headline being restyled with a title case digraph.

Because we don't live in a perfect world, and "better" or "good enough" is often  better "didn't even try to improve" something that starts off with a lot of inconsistencies. 

> The above use-case seems especially unlikely because it requires three unlikely scenarios to occur at once: (A) an author applies text-transform: capitalize to all of their imported headlines;

Not at all unlikely, in many situations. 

> (B) the author is importing content with malformed, all-caps headlines;

Not at all unlikely. 

> and (C) some of those all-caps headlines contain digraphs.
> 
Received on Monday, 16 March 2015 16:14:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC