WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
100841
Allow CSS selectors as fragment identifiers
https://bugs.webkit.org/show_bug.cgi?id=100841
Summary
Allow CSS selectors as fragment identifiers
John Mellor
Reported
2012-10-31 04:24:35 PDT
It would be nice to allow using CSS selectors as fragment identifiers, so that you can link to things which don't have an id or name attribute. For example:
http://example.com/lorem.html#css(.content:nth-child(2
)) There's an unofficial draft spec:
http://simonstl.com/articles/cssFragID.html
And a community group:
http://www.w3.org/community/cssselfrags/
The main downside I can see is that such fragments may be brittle and break if the structure of the page is changed, but this is often still preferable to not being able to use a fragment at all.
Attachments
Add attachment
proposed patch, testcase, etc.
Maciej Stachowiak
Comment 1
2012-11-01 02:35:00 PDT
It's an interesting idea. Are there any other browser engines planning to implement this? Are there any plans to move this work into a full Working Group?
Radar WebKit Bug Importer
Comment 2
2022-07-13 11:39:12 PDT
<
rdar://problem/96964473
>
Mr. Beedell, Roke Julian Lockhart
Comment 3
2025-09-22 04:01:13 PDT
(In reply to Maciej Stachowiak from
comment #1
)
> Are there any other browser engines planning to implement this? Are there any > plans to move this work into a full Working Group?
https://github.com/karanlyons/pinpoint/blob/4b2ec192c0400f26d7ff80ec3a652e467d5ee563/README.mkd#not-using-safari
appears to be the closest available. I don't see any bugs for other browsers, and
https://github.com/WICG/scroll-to-text-fragment/blob/10e6348b200f973232e713838a5a57db0bf483fb/README.md#using-css-selectors-as-fragment-identifiers:~:text=Simon%20St.%20Laurent%20and%20Eric,on%20it%20in%20this%20proposal
explicitly corroborates this.
Anne van Kesteren
Comment 4
2025-10-01 06:11:42 PDT
We'll consider this once there's a standardized solution. No need to keep a bug around for this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug