Bug 100841
| Summary: | Allow CSS selectors as fragment identifiers | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | John Mellor <johnme> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Enhancement | CC: | abarth, annevk, bfulgham, eoconnor, ie2kl43y, kenneth, koivisto, mjs, peter, sam, tony, webkit-bug-importer |
| Priority: | P3 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://simonstl.com/articles/cssFragID.html | ||
John Mellor
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
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
<rdar://problem/96964473>
Mr. Beedell, Roke Julian Lockhart
(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
We'll consider this once there's a standardized solution. No need to keep a bug around for this.