From 47eb4b2db7496c1309092e94c2c445c5edac7885 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 17 Mar 2022 16:11:23 +0000 Subject: [PATCH] Base: Add a test page for the CSS :where() selector This behaves identically to :is() except for specificity, so this test page is identical to the other one. It's not because I'm lazy. :^) --- Base/res/html/misc/welcome.html | 5 ++-- Base/res/html/misc/where-selector.html | 38 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 Base/res/html/misc/where-selector.html diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html index 9181d6e737..48da06eb4f 100644 --- a/Base/res/html/misc/welcome.html +++ b/Base/res/html/misc/welcome.html @@ -96,8 +96,9 @@
  • :nth-last-of-type
  • :empty
  • :root
  • -
  • :is
  • -
  • :not
  • +
  • :is()
  • +
  • :not()
  • +
  • :where()
  • :hover
  • Properties

  • Backgrounds
  • diff --git a/Base/res/html/misc/where-selector.html b/Base/res/html/misc/where-selector.html new file mode 100644 index 0000000000..f5749a76a5 --- /dev/null +++ b/Base/res/html/misc/where-selector.html @@ -0,0 +1,38 @@ + + + + + :where() test + + + +

    :where() test

    +
    +

    Nothing

    +

    These should have no background.

    +
    +
    +
    +

    .special :where(h2, p)

    +

    These should have a green background.

    +
    +
    +
    +

    .forgiving :where(&&&fakhsdaskjhd, h2, p)

    +

    These should have a green background. :where() takes a "permissive selector list", + so even though part of it is invalid, this does not make the whole selector-list invalid.

    +
    + +