Bug 100841

Summary: Allow CSS selectors as fragment identifiers
Product: WebKit Reporter: John Mellor <johnme>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: abarth, eoconnor, kenneth, koivisto, mjs, peter, sam, tony
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://simonstl.com/articles/cssFragID.html

Description John Mellor 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.
Comment 1 Maciej Stachowiak 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?