Closed Bug 1861666 Opened 2 years ago Closed 2 years ago

style not applied for id containing dot

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 102
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: u20230201, Unassigned)

Details

Steps to reproduce:

Defined HTML "<span id="hs.order" />" and style "span#hs.order { break-before: page }"

Actual results:

The style was not applied, and no warning was output.
It seems that IDs containing a dot are not handled correctly, because when replacing "." with "-", it worked.

Expected results:

Either the style should have been applied, or some warning should have been output.
See also https://stackoverflow.com/a/79022/6607497

Sorry, maybe not a bug, but lack of wisdom: See https://stackoverflow.com/a/12310128/6607497

The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

Per https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier

In CSS, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A0 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, two hyphens, or a hyphen followed by a digit. Identifiers can also contain escaped characters and any ISO 10646 character as a numeric code (see next item). For instance, the identifier "B&W?" may be written as "B&W?" or "B\26 W\3F".

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.