- From: Jonathan Kew <jfkthame@gmail.com>
- Date: Tue, 10 Nov 2015 22:17:59 +0000
- To: robert@ocallahan.org
- Cc: Sebastian Zartner <sebastianzartner@gmail.com>, Adam Rich <adamzr@gmail.com>, www-style list <www-style@w3.org>
On 10/11/15 21:40, Robert O'Callahan wrote: > On Wed, Nov 11, 2015 at 10:28 AM, Jonathan Kew <jfkthame@gmail.com > <mailto:jfkthame@gmail.com>> wrote: > > On the other hand, if you capitalize text with things like > "left/right, forward/back", Gecko gives you "Left/right, > Forward/back", which doesn't look as good as the Webkit result > "Left/Right, Forward/Back". > > Basically, you can't win -- there's no simple, correct answer > without sophisticated (language- and context-specific) analysis of > the content that would be way out of scope for CSS. > > > Note that --- as I'm sure you know :-) --- Gecko capitalizes exactly at > after line-break opportunities, That doesn't seem to be strictly accurate. For example, it doesn't capitalize after an explicit hyphen in the text, although that is definitely a line-break opportunity. > so you can at least work around cases of > insufficient capitalization, e.g. by inserting a <wbr> before 'right'. > Which is probably a good idea anyway. Yes, if you control the content. But if you control the content, you'd do better to avoid relying on the vagaries of text-transform:capitalize at all, and instead make sure you explicitly capitalize things exactly as desired. IMO, the main use-case for text-transform:capitalize would be when external content with "uncontrolled" casing is being pulled in -- e.g. headlines, captions, etc. from a variety of data sources -- and you want to give it all a reasonably uniform-looking, title-like appearance but don't want ALL UPPERCASE and can't afford the resources to apply copy-editing by a human (or a high-end natural-language processing system). JK
Received on Tuesday, 10 November 2015 22:18:30 UTC