`background-color` of `body` element is resetted to initial if it is specifeid by custom property and there is a body::after

Issue #12376022 • Assigned to Bogdan B.


Jun 17, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Minimal test case is this:

:root {
  --foo: green;

body {
  background-color: var(--foo);

body::after {
  background-color: #f0f;
  content: "test";

With this CSS, the page should have green background, but Edge 15 renders with initial value (transparent).

If this CSS specify background-color without custom property or does not have body::after ruleset, Edge 15 renders correctly in green.


0 attachments

    Comments and activity

    • Test page on JSFiddle: https://jsfiddle.net/vc60vegu/

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “Rick J.”

      Changed Assigned To to “Bogdan B.”

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

    Sign in