Open
Bug 1122965
Opened 9 years ago
Updated 2 years ago
:hover pseudo-class doesn't work on ::before and ::after pseudo-elements
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
NEW
People
(Reporter: sebo, Unassigned)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-needed)
According to bug 922669 it should be possible to use the :hover pseudo-class on pseudo-elements. Though this doesn't seem to work.
Comment 1•9 years ago
|
||
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•9 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
Comment 4•9 years ago
|
||
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.)
Updated•6 years ago
|
Blocks: css-pseudo-4
Reporter | ||
Comment 5•6 years ago
|
||
Once this is fixed, this should be documented at https://developer.mozilla.org/en-US/docs/Web/CSS/:hover, maybe also mentioned at https://developer.mozilla.org/en-US/docs/Web/CSS/::before and https://developer.mozilla.org/en-US/docs/Web/CSS/::after. (In reply to Cameron McCormack (:heycam) from comment #4) > 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.) This "soon" is now already two and a half years long now. :-) Sebastian
Keywords: dev-doc-needed
Comment 6•6 years ago
|
||
So, yes, I don't think there's any real reason we can't support this, and the Selectors spec does require it to be supported. (On all pseudo-elements, actually.) FWIW no other browser supports this yet. Just adding CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE to the relevant entries in nsCSSPseudoElementList.h is insufficient, though, so perhaps there's something else in the mouse handling code that needs to be adjusted.
Flags: needinfo?(cam)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•