New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 638267 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

::first-letter not correctly applied with French quotation mark

Reported by xavier.l...@gmail.com, Aug 16 2016

Issue description

Chrome Version       : 53.0.2785.46 (Official Build) beta (64-bit)
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: OK (9.1.2)
    Firefox: FAIL (47.0) (the style is not applied to anything)
         IE: not tested

What steps will reproduce the problem?

(this describes the content of the attached html file)
(1) have an element's text starting with "« " (French opening quotation mark followed by non-breaking space), then some text and a sub-element with text
(2) apply a CSS style to its ::first-letter pseudo-element

What is the expected result?

The style should be applied to the group of characters quotation mark + non-breaking space + first letter (the nbsp is required by French typographic conventions).

What happens instead?

The style is applied to the first letter of the sub-element

Please provide any additional information below. Attach a screenshot if
possible.

The problem is still visible if I replace the non-breaking space by a regular space ( ) or a four-per-em space ( ) 

 
first-letter.html
186 bytes View Download
expected-(safari).png
3.9 KB View Download
actual.png
3.8 KB View Download
Tested on IE11 and Edge: the style is only applied to the quotation mark, not the letter following it.
Cc: msrchandra@chromium.org
Components: Blink>CSS
Labels: M-54 OS-Linux OS-Mac OS-Windows
Owner: rob@robwu.nl
Status: Assigned (was: Unconfirmed)
Tested the issue Windows, Mac & Linux using Chrome Beta# 53.0.2785.70 and is able to reproduce the issue.
This is a Regression Issue in M46 builds. Bisect tool did not provide the exact CL details, so providing the change log manually.
Chrome Good Build :: 46.0.2474.0
Chrome Bad  Build :: 46.0.2475.0

CHANGE LOG --
https://chromium.googlesource.com/chromium/src/+log/46.0.2474.0..46.0.2475.0?pretty=fuller&n=10000

From the CL, assigning the issue to concern owner. Pardon me if it has nothing to do with your changes and if possible please assign it to conern owner.
Thank You.

Comment 3 by rob@robwu.nl, Aug 18 2016

Owner: msrchandra@chromium.org
Why did you assign this to me? My only changes in that huge range is some unit test and documentation.

I suggest that you investigate the 8 blink rolls (those commits with third_party/WebKit in the message).
Here are all rolls: https://chromium.googlesource.com/chromium/blink/+log/5c812a3..78cb832
Owner: ----
Status: Untriaged (was: Assigned)
Apologies.
Changing the status to Untriaged so that the issue would get addressed.
Thank You.
Components: -Blink>CSS Blink>Layout
Owner: dsinclair@chromium.org

Comment 6 by e...@chromium.org, Aug 19 2016

Cc: tabatkins@chromium.org
Labels: Needs-Feedback
Status: Unconfirmed (was: Untriaged)
All browsers renders this differently and it is unclear what the "correct" behavior is.

The spec indicates that punctuation should be included and that works across browsers:

Punctuation (i.e, characters defined in Unicode in the "open" (Ps), "close" (Pe), "initial" (Pi). "final" (Pf) and "other" (Po) punctuation classes), that precedes or follows the first letter should be included. [UNICODE]
https://drafts.csswg.org/selectors-3/#first-letter

Spaces are *not* included in that list though and Safari appears to be the only browser that includes both in first-letter.

Owner: e...@chromium.org
Regarding comment #6: the spec also notes that "In some cases the ::first-letter pseudo-element should include more than just the first non-punctuation character on a line." I would agree that this is one of those cases.

The rule about punctuation makes a lot of sense for opening quotation mark (such as in the example in the spec), and the opening quotation mark in French cannot go without a space (https://en.wikipedia.org/wiki/Quotation_mark#French).

Also, if the element starts with non-breaking spaces and then a letter (without having a punctuation in front), the style gets applied to the spaces as well (see leading-space.html attachment), so the spaces are already included in the pseudo-element sometimes.

At least, the other part of the bug (the style being applied to the first letter of the first sub-element) should be fixed. It doesn't make sense to apply the :first-letter style to text that can be far away from the beginning of the element.
leading-space.html
201 bytes View Download

Comment 9 by e...@chromium.org, Aug 25 2016

Labels: -OS-Linux -OS-Windows -Type-Bug -OS-Mac OS-All Type-Feature
Status: Available (was: Unconfirmed)
We should try to get the spec amended to clarify the expectations here so that all browsers can render it the same way.

Comment 10 by e...@chromium.org, Apr 7 2017

Owner: ----
Project Member

Comment 11 by sheriffbot@chromium.org, Apr 12 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 12 by e...@chromium.org, Apr 18 2018

Cc: kojii@chromium.org
Status: Available (was: Untriaged)

Sign in to add a comment