Closed Bug 554630 Opened 16 years ago Closed 7 years ago

CSS transitions not applied to :visited:hover or :visited:focus

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: hsivonen, Unassigned)

References

(Blocks 1 open bug, )

Details

Self-built from 2010-03-23 trunk. Steps to reproduce: 1) Load http://hsivonen.iki.fi/ 2) Follow one of the article links to get a visited link. 3) Navigate back. 4) Make sure you see both visited and unvisited links. 5) Cycle through the links by pressing tab repeatedly. Actual results: When focusing an unvisited link, the width of the outline animates. When focusing a visited link, the width of the outline does not animate. Expected results: Expected the outline width to animate in both cases as in WebKit.
Hmmm. It works fine in my tree, likely due to bug 147777. I wonder why it doesn't work without that.
So, given your styles, I'd expect visited links not to animate when leaving :focus, since you have the transition properties specified for the following selectors: :link:focus :visited:focus :link :link:hover, :visited:hover (Note the omission of :visited .) But that doesn't explain a difference when entering :focus.
(And, boy, that style sheet has a lot of unnecessary repetition.)
I also don't understand why I don't see an animation when leaving :focus. (Though maybe I'm just not seeing it; the transitions are pretty quick.)
Given the rules on this page, and in particular the fact that :visited has no outline styling of its own, when we go from :visited to :visited:focus, computed outline-width changes from "medium" (an enumerated value) to a length. So GetCommonUnit returns eUnit_Null, and then AddWeighted returns false, which propagates back into a "don't animate" decision.
It's fixed with Stylo, right?
Flags: needinfo?(hsivonen)
(In reply to Kuba Niewiarowski from comment #6) > It's fixed with Stylo, right? Yes, this has been fixed some time along the way. (In reply to David Baron :dbaron: 🏴󠁵󠁳󠁣󠁡󠁿 ⌚UTC-8 from comment #4) > I also don't understand why I don't see an animation when leaving :focus. > (Though maybe I'm just not seeing it; the transitions are pretty quick.) Also I don't see animation on leaving :focus.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(hsivonen)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.