Problem
There are 2 related issues:
- Pseudoclasses don't work properly on pseudo-elements (ex.
.element::after:hover).
- No support for "direct" pseudo-elements with pseudo-classes. Only pseudo-elements that have a "parent" are currently supported (ex.
::before,::after).
Identified cause
Regardless of the intent, all pseudo-elements are moved to the end of the composed selector:
|
[pseudoElement] = selector.children.splice(pseudoElementPos, 1); |
Moreover, pseudo-classes attached to them are left in their old position. This relates to the above issues in the following way:
- Selectors like
.myParent .myChild::after:hover get computed as .myParent[scope=scope1] .myChild:hover:not(*scope magic✨*)::after. Notice the place of the :hover.
- Selectors like
.myParent ::picker(select):popover-open get computed as .myParent :popover-open:not(*scope magic✨*)::picker(select).
Problem
There are 2 related issues:
.element::after:hover).::before,::after).Identified cause
Regardless of the intent, all pseudo-elements are moved to the end of the composed selector:
webpack-scoped-css/src/cssScopeLoader.js
Line 163 in a402641
Moreover, pseudo-classes attached to them are left in their old position. This relates to the above issues in the following way:
.myParent .myChild::after:hoverget computed as.myParent[scope=scope1] .myChild:hover:not(*scope magic✨*)::after. Notice the place of the:hover..myParent ::picker(select):popover-openget computed as.myParent :popover-open:not(*scope magic✨*)::picker(select).