Re: [csswg-drafts] [css-variables] [selectors] Should custom properties work for :visited?

I think from the spec wording, Firefox is right. "Compute the element's style as if the relevant link was :visited" should include matching, cascading, and resolving variable references. I'm not sure how could you justify that something like:

```html
<!doctype html>
<style>
  :link {
    --foo: brown;
  }

  :visited {
    --foo: yellow;
    color: var(--foo);
  }
</style>
<a href="">Which color?</a>
```

Should display brown if the link is visited, since clearly computing the style as if the element was :visited would've never matched `:link`.

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2263#issuecomment-362748436 using your GitHub account

Received on Saturday, 3 February 2018 00:14:35 UTC