Open Bug 1366908 Opened 7 years ago Updated 2 years ago

:visited styles that depend on an attribute aren't restyled correctly

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jryans, Unassigned)

References

Details

While working on :visited support for Stylo in bug 1328509, I noticed that Gecko seems to miss the following case:

<style type="text/css">
a { text-decoration: none }
:link { color: fuchsia; }
[bob]:visited { color: purple; }
</style>
<a href="visited-page.html">link</a>
<script>
  // Attempt to set attribute _after_ the visited state takes affect
  setTimeout(() => {
    document.querySelector("a").setAttribute("bob", "");
  }, 100);
</script>

If the attribute changes takes affect after the link became visited, it doesn't get restyled.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.