Target another component on hover using emotion-js
See original GitHub issueHello i have a problem to target another component in focus using emotion-js
i try this:
&:hover + ${WrapScrollable} {
background: red;
}
but dont work
my code:
const WrapScrollable = styled.div`
height: calc(100% - 165px);
overflow: scroll;
background: orange;
margin-bottom: 100px;
`;
const Litem = styled.div`
display: flex;
align-items: center;
justify-content: center;
background: hotpink;
&:hover + ${WrapScrollable} {
background: red;
}
`;
example:
https://codesandbox.io/s/dazzling-turing-qbzlh?file=/src/App.js
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Target another component on hover using emotion-js
Here is my code and what I have tried. import React from 'react'; import styled from '@emotion/styled'; import { Link } from 'gatsby';...
Read more >Styled Components - Emotion
Targeting another emotion component Similar to styled-components, emotion allows for emotion components to be targeted like regular CSS selectors when using @ ......
Read more >How to style React Router links with styled-components
Let's look at how to use styled-components and TypeScript to style React Router links in an application's navbar.
Read more >Style library interoperability - Material UI - MUI
Note: If you are using styled-components and have StyleSheetManager with a custom target , make sure that the target is the first element...
Read more >goober: Introduction
goober, a less than 1KB css-in-js solution. ... the two most known css-in-js packages: styled-component and emotion. ... Render with target *1, ✓,,....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Use data attribute if needed: https://codesandbox.io/s/festive-ramanujan-jlhds?file=/src/App.js
this Workssss