How can we improve the Microsoft Edge developer experience?

Implement ::selection according to Pseudo Elements Level 4

::selection has now been re-added to the spec: https://drafts.csswg.org/css-pseudo-4/#selectordef-selection

You should considering starting to work on updating the implementating in Edge according to that spec. There are many bugs in the current implementation - you can't, for instance, write :root::selection or html::selection, and body::selection only applies to direct descendants, text nodes placed directly into <body> without wrapping. In the spec, it says: "Authors wanting multiple selections styles should use ‘:root::selection’ for their document-wide selection style, since this will allow clean overriding in descendants. (‘::selection’ alone would apply to every element in the tree, overriding the more specific styles of any ancestors.)". When writing :root::selection in Edge, it doesn't have any effect on anything. Even trying :root *::selection { background: inherit; color: inherit } as a hack doesn't work - the inherit keyword doesn't work.

Also #id::selection, .class::selection and any-tag::selection should work flawlessly, and inherit to children, which Edge doesn't.

After fixing this, you should consider adding more features from the spec, like extending the allowed properties (cursor, outline and text-decoration, for instance, are all allowed according to https://drafts.csswg.org/css-pseudo-4/#highlight-styling), and maybe also implementing the newly added ::spelling-error and ::grammar-error?

5 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    mnsth shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • mnsth commented  ·   ·  Flag as inappropriate

        I now understand that most of the "bugs" described here comes from the property not being inherited, and there's no way to turn inheritance on using the inherit keyword. If you turn on inheritance on ::selection (and allow unset/initial/inherit as values for user control), the bugs described here would vanish.

      • mnsth commented  ·   ·  Flag as inappropriate

        I filed a bug two months ago, too, requesting to fix those bugs, but didn't recieve any feedback, comments or attention: https://connect.microsoft.com/IE/Feedback/Details/1581954

        (I added it here, too, since this also is a feature request - to update the implementation according to spec, and adding new features related to ::selection - and so that people can vote for it.)

      Feedback and Knowledge Base