:hover pseudo-class doesn't work on ::before and ::after pseudo-elements

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
3 years ago
3 months ago

People

(Reporter: sebo, Unassigned, NeedInfo)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

3 years ago
According to bug 922669 it should be possible to use the :hover pseudo-class on pseudo-elements. Though this doesn't seem to work.
It's possible for some pseudo-elements.  Specifically, the ones flagged with CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE in nsCSSPseudoElementList.h.  At the moment, that's just the HTML form control internal pseudo-elements.

See bug 922669 comment 3, in particular.

That said, the ::before and ::after do in fact have an Element associated with them, so I'm not sure why we can't support :hover there.  Cameron?
Flags: needinfo?(cam)
(Reporter)

Comment 2

2 years ago
The needinfo was requested almost nine months ago. Cameron, can you provide the necessary info. If not, can you pass on the request to someone else?

Sebastian
I don't think Boris was asking for information; I think he was asking Cameron to do the work.
Summary: :hover pseudo-class doesn't work on pseudo-elements → :hover pseudo-class doesn't work on ::before and ::after pseudo-elements
Right.  (I'm taking the chance at the start of the quarter to go through my needinfo backlog so there's a greater chance of me getting to this soon.)
See Also: → bug 1299046
You need to log in before you can comment on or make changes to this bug.