Intent to Implement :any-link

99 views
Skip to first unread message

Victoria Su

unread,
Nov 30, 2017, 9:56:53 PM11/30/17
to blink-dev

Contact emails

victor...@google.com


Spec

https://drafts.csswg.org/selectors-4/#the-any-link-pseudo


Design Doc

Link for the design document is currently pending.

Link to TAG review: https://github.com/w3ctag/design-reviews/issues/219


Summary

CSS Selectors 4 will be introducing the hyperlink pseudo-class :any-link.


Motivation

The motivation for implementing :any-link is to remove the need for the vendor-specific prefix to the :-webkit-any-link selector, which is currently implemented in Chrome, and improve interoperability. Safari and Firefox already implement :any-link, so implementing this in Chrome should further encourage Edge to implement it also.


Browsers Referenced

Browser

Version

Operating System

Chrome

62

Debian Linux

Firefox

57

Windows 10

Safari

11

macOS High Sierra

Edge

16

Windows 10



Risks

Interoperability and Compatibility

There should be very low interoperability risk for the :any-link selector as Safari and Firefox are already implementing it. Chrome also currently implements similar functionality through the selector :-webkit-any-link. Edge would then be further influenced to also implement this feature, as it is the only major browser that does not yet support this feature.

The compatibility risk of this feature should also be low, as the feature is already implemented under a different selector name. The risk will be reevaluated prior to shipping.

Comparison between browsers and their implementations of some of these features can be found here.


Ergonomics

N/A


Activation

It should not be challenging for developers to use this feature once it is implemented.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Feature Dashboard Link

The feature dashboard link for :any-link is: https://www.chromestatus.com/features/5724922840088576


Requesting approval to ship?

No.


Can also be viewed at:

https://docs.google.com/document/d/1IKqbjtmEOd1R8ngSifl_JBAxh0-9kk0FWoHB1jB04F8/edit?ts=5a20b609


Philip Jägenstedt

unread,
Dec 1, 2017, 8:48:49 AM12/1/17
to Victoria Su, blink-dev
Sounds great! Despite two existing implementations there don't seem to be any tests in web-platform-tests. Perhaps there are tests in Gecko or WebKit that can be converted and upstreamed?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c1fcc0af-7a31-49e4-9c04-f0c19fbdfca1%40chromium.org.

Philip Jägenstedt

unread,
Dec 1, 2017, 9:48:21 AM12/1/17
to Emilio Cobos Álvarez, Victoria Su, blink-dev
Emilio, assuming you to Gecko development, any chance you could upstream it? For a Chromium develop to do it would amount to copying it and changing it, and then telling a Gecko developer about the resulting duplication :)

On Fri, Dec 1, 2017 at 3:44 PM Emilio Cobos Álvarez <emi...@crisal.io> wrote:
There's literally a single reftest for this selector in Gecko[1] (d'oh),
but it's a nice one because it tests the dynamic change handling for it.

WebKit has two tests: LayoutTests/fast/selectors/any-link-basics.html
and LayoutTests/fast/selectors/any-link-basics-2.html.

Getting all those into WPT would be awesome! Let me know if you upstream
the Gecko one so I can remove it from the reftest suite when it gets
imported.

Thanks!

 -- Emilio

[1]:
https://searchfox.org/mozilla-central/source/layout/reftests/bugs/1364335.html


On 12/01/2017 02:48 PM, 'Philip Jägenstedt' via blink-dev wrote:
> Sounds great! Despite two existing implementations there don't seem to
> be any tests in web-platform-tests. Perhaps there are tests in Gecko or
> WebKit that can be converted and upstreamed?
>
> On Fri, Dec 1, 2017 at 3:56 AM 'Victoria Su' via blink-dev
> <blin...@chromium.org <mailto:blin...@chromium.org>> wrote:
>
>     Contact emails
>

>
>
>     Spec
>
>     https://drafts.csswg.org/selectors-4/#the-any-link-pseudo
>
>
>     Design Doc
>
>     Link for the design document is currently pending.
>
>     Link to TAG review: https://github.com/w3ctag/design-reviews/issues/219
>
>
>     Summary
>
>     CSS Selectors 4 will be introducing the hyperlink pseudo-class
>     :any-link.
>
>
>     Motivation
>
>     The motivation for implementing :any-linkis to remove the need for
>     the vendor-specific prefix to the :-webkit-any-linkselector, which

>
>
>     Ergonomics
>
>     N/A
>
>
>     Activation
>
>     It should not be challenging for developers to use this feature once
>     it is implemented.
>
>
>     Will this feature be supported on all six Blink platforms (Windows,
>     Mac, Linux, Chrome OS, Android, and Android WebView)?
>
>     Yes.
>
>
>     Feature Dashboard <https://www.chromestatus.com/>Link

>
>     The feature dashboard link for :any-linkis:
>     https://www.chromestatus.com/features/5724922840088576
>
>
>     Requesting approval to ship?
>
>     No.
>
>

>
>
>     --
>     You received this message because you are subscribed to the Google
>     Groups "blink-dev" group.
>     To view this discussion on the web visit
>     https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c1fcc0af-7a31-49e4-9c04-f0c19fbdfca1%40chromium.org

>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.

> To view this discussion on the web visit

Rune Lillesveen

unread,
Dec 4, 2017, 3:00:20 AM12/4/17
to Victoria Su, blink-dev
I think this could've been an intent to implement _and_ ship. Do we need to do this behind a flag?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
--
Rune Lillesveen

Emilio Cobos Álvarez

unread,
Dec 4, 2017, 6:30:35 AM12/4/17
to blin...@chromium.org
Just for the record, since apparently blink-dev@ doesn't like my
personal account, I upstreamed the reftest in:

https://bugzilla.mozilla.org/show_bug.cgi?id=1422319

The merges / sync are delayed due to infra issues, but that should be
resolved today I hope.

-- Emilio
> <mailto:blin...@chromium.org <mailto:blin...@chromium.org>>> wrote:
> >
> >     Contact emails
> >
> >     victor...@google.com <mailto:victor...@google.com>
> <mailto:victor...@google.com <mailto:victor...@google.com>>
> <mailto:blink-dev%2Bunsu...@chromium.org>
> > <mailto:blink-dev+...@chromium.org
> <mailto:blink-dev%2Bunsu...@chromium.org>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYc1xhL6m1GnGwFtKkLnYOJfB-5wOUtZ2sT0nNLrBtuR4w%40mail.gmail.com
> >
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYc1xhL6m1GnGwFtKkLnYOJfB-5wOUtZ2sT0nNLrBtuR4w%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYfN6MA7zU%2B0o6Gm5mE1-8KqcQjbiSCGR4aqno0VxwpMpQ%40mail.gmail.com
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYfN6MA7zU%2B0o6Gm5mE1-8KqcQjbiSCGR4aqno0VxwpMpQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Philip Jägenstedt

unread,
Dec 4, 2017, 7:51:04 AM12/4/17
to Emilio Cobos Álvarez, blin...@chromium.org

Rune Lillesveen

unread,
Dec 5, 2017, 7:50:40 AM12/5/17
to Victoria Su, blink-dev
On Mon, Dec 4, 2017 at 9:00 AM Rune Lillesveen <fut...@chromium.org> wrote:
I think this could've been an intent to implement _and_ ship. Do we need to do this behind a flag?

Another thing, did you consider :-webkit-any-link to be an alias for :any-link?

--
Rune Lillesveen

Victoria Su

unread,
Dec 6, 2017, 1:52:24 AM12/6/17
to blink-dev, victor...@google.com
I implemented the feature behind an experimental flag as a learning exercise.

I have not considered using an alias. Would an alias work if I wanted to count :-webkit-any-link and :any-link separately?

Rune Lillesveen

unread,
Dec 6, 2017, 3:17:50 AM12/6/17
to Victoria Su, blink-dev
UMA reports e.g. Blink.UseCounter.CSSProperties.alias-webkit-animation-delay, so I'd assume so.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
--
Rune Lillesveen

Philip Jägenstedt

unread,
Dec 6, 2017, 7:30:35 AM12/6/17
to Rune Lillesveen, Victoria Su, blink-dev
I don't that use counters ought to be the main consideration for aliases. It is observable to web content whether it's and alias or not, and if we ever need to add :-webkit-any-link https://compat.spec.whatwg.org/ I think a plain alias would be simpler.

Reply all
Reply to author
Forward
0 new messages