text-transform:capitalize sometimes fails to capitalize words at the start of a tag

RESOLVED INVALID

Status

()

Core
CSS Parsing and Computation
RESOLVED INVALID
12 years ago
11 years ago

People

(Reporter: Johan Sundström, Assigned: dbaron)

Tracking

1.8 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051107 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051107 Firefox/1.5

<style type="text/css">
li { display:inline; text-transform:capitalize; }
</style>
[...]
<ul><li>first</li><li>second</li><li>n:th</li></ul>

renders as "First", "second", "n:th", not expected "First", "Second", "N:th".
The bug seems tied to the combination of display:inline and text-transform:capitalize, and somehow relate to whitespace, because if the first style is removed, or a space character is inserted before the text that ought to have been rendered uppercase, the problem goes away.

Reproducible: Always

Steps to Reproduce:
1. visit test case URL
(Reporter)

Comment 1

12 years ago
And, as pointed out in the testcase page, in a less stripped-down real-world case, the exact opposite behaviour has been seen too -- first, Second, N:th -- see here:
http://ecmanaut.blogspot.com/2005/10/spoil-yourself-with-adblock.html
Version: unspecified → 1.5 Branch

Updated

12 years ago
Assignee: nobody → dbaron
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → ian
Version: 1.5 Branch → 1.8 Branch
Testcase URI is not resolving.  Please attach the testcase to the bug.
Keywords: qawanted
Created attachment 232666 [details]
reporter's testcase

Resolves for me, this minute, anyway.
Seems invalid to me, though: having made li inline, and with no whitespace, it might just as well be <b>f</b><em>i</em><strong>r</strong><i>st</i>, which looks like one word to me, with the margin-left in the test case or not.
(Assignee)

Comment 5

11 years ago
Yep, it's all one word.  Thanks for catching that.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.