Closed Bug 52109 Opened 24 years ago Closed 19 years ago

p:first-letter doesn't select letter after quotes using <q></q>

Categories

(Core :: Layout: Text and Fonts, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 45091

People

(Reporter: burnus, Unassigned)

Details

(Keywords: css1, testcase, Whiteboard: [CSS1-2.4])

Attachments

(1 file)

This is 2000-09-08-21/Linux.

If the style selector :first-letter is used, the specification at
http://www.w3.org/TR/REC-CSS1#the-first-litter-pseudo-element
suggests:
"The UA defines what characters are inside the 'first-letter' element. Normally,
quotes that precede the first letter should be included".

This works using <p>"Foo"</p>, but it fails with <p><q>Bar</q></p>.

Expected: <q> should be treated alike to ".

Note: There are some other observations:

a) <p lang="nl">IJselmeer</p>
Only the I gets selected, but IJ is in Dutch almost one letter; from the spec:
"Some languages may have specific rules about how to treat certain letter
combinations. In Dutch, for example, if the letter combination "ij" appears at
the beginning of a word, they should both be considered within the
'first-letter' pseudo-element. "

b) <p lang="es">¡Olé!</lang>
The ¡ gets big, but the spec says:
"When the paragraph starts with other punctuation (e.g. parenthesis and ellipsis
points) or other characters that are normally not considered letters (e.g.
digits and mathematical symbols), 'first-letter' pseudo-elements are usually
ignored."
Changing platform to all
Keywords: css1
OS: Linux → All
Hardware: PC → All
Netscape's standard compliance QA team reorganised itself once again, so taking 
remaining non-tables style bugs. Sorry about the spam. I tried to get this done 
directly at the database level, but apparently that is "not easy because of the 
shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian
Some quick observations that may help to explain why we only style the quote 
instead of styling both the quote and the first letter of the text...
- IsFirstLetterContent() is called only once and the content we pass is the 
opening quote of the Q instead of the quote followed by the text.
- FirstLetterCount() and NeedFirstLetterContinuation() are not called at all.
- When we go throught the "if (aTextData.mFirstLetterOK)" in 
nsTextFrame::MeasureText(), here again the only text we are passed is the opening 
quote.

Reassigned to Layout.

FYI, Q is defined in html.css as:
  q:before { content: open-quote;  }
  q:after  { content: close-quote; }
Assignee: pierre → attinasi
Component: Style System → Layout
QA Contact: ian → petersen
Target Milestone: --- → mozilla1.2
Keywords: testcase
Whiteboard: [CSS1-2.4]
I've also noticed this bug when curly quotes are used, as demonstrated by this page:

http://www.cadenceweb.com:8080/newsletter/sheerin/test/

Additionally, when that page is printed, the margin created by the first-letter
formatting is applied to the entire paragraph, and the one that follows it (the
last on the page).

Using 2002072608 under XP
->Fonts & Text
Assignee: attinasi → font
Component: Layout → Layout: Fonts and Text
QA Contact: petersen → ian
Severity: normal → minor
Depends on: 45091
Target Milestone: mozilla1.2alpha → ---
Blocks: 23605
This is a duplicate as we implemented the quotes using ::before which is what
bug 45091 is about.

*** This bug has been marked as a duplicate of 45091 ***
No longer blocks: 23605
Status: NEW → RESOLVED
Closed: 19 years ago
No longer depends on: 45091
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: