You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We expect the :focus-visible in the :has(:focus-visible) selector to be unmodified in the output CSS, just like in &:has(:focus-visible) (with the ampersand). However, this is not the case - for some reason, the presence of & matters in this specific example when it in fact should not.
To Reproduce
Container gives correct output, while Container2 gives incorrect output. We want Container2 to give the same output as Container.
constContainer=styled.div({"&:has(:focus-visible)": {"background": "purple",},});// results in// ._1o9o1cnh:has(:focus-visible) { background-color: purple }// (correct!)constContainer2=styled.div({":has(:focus-visible)": {"background": "purple",},});// results in// ._1vux1cnh:has(._1vux1cnh:focus-visible) { background-color: purple }// (wrong!)constApp=()=>(<><Container>{"Hello from webpack?"}<inputname="firstName"type="text"/>{"Goodbye from webpack!"}</Container><Container2>{"Hello from webpack?"}<inputname="firstName"type="text"/>{"Goodbye from webpack!"}</Container2></>);
Screenshots
The above code example, with :focus-visible turned on for both <input> elements through the Chrome inspection tools:
The text was updated successfully, but these errors were encountered:
Describe the bug
We expect the
:focus-visible
in the:has(:focus-visible)
selector to be unmodified in the output CSS, just like in&:has(:focus-visible)
(with the ampersand). However, this is not the case - for some reason, the presence of&
matters in this specific example when it in fact should not.To Reproduce
Container gives correct output, while Container2 gives incorrect output. We want Container2 to give the same output as Container.
Screenshots
The above code example, with
:focus-visible
turned on for both<input>
elements through the Chrome inspection tools:The text was updated successfully, but these errors were encountered: