CSS variables inside ::selection make styles behave as they were without ::selection

Duplicate Issue #12132854 • See Issue #11495448

Details

Author
Dmitry V.
Created
May 25, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Duplicates
See progress on Bug #11495448
Found in build #
40.15063
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

This simple css:

body { --bg: red; }
*::selection { background: var(--bg); }

makes the whole page red, not only selected text (please see the screenshot attached).
JSBin: http://jsbin.com/dovapedimo/edit?html,css,output

Attachments

1 attachment

Comments and activity

You need to sign in to your Microsoft account to add a comment.

Sign in