Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Refer to child properties in pseudo selector #1032

Open
AlphaGeek opened this issue Oct 20, 2019 · 0 comments
Open

Refer to child properties in pseudo selector #1032

AlphaGeek opened this issue Oct 20, 2019 · 0 comments

Comments

@AlphaGeek
Copy link

AlphaGeek commented Oct 20, 2019

I have a styles object with nested properties. In my :hover on the parent, I want to change the styles on the child properties...is there a way to do that?

So something like this:

`const styles = {

resultItem: {
[...some styles go here],
symbol: { /* default style for symbol /
fontSize: '1.2rem'
},
name: { /
default style for name /
fontSize: '1.4rem'
}
':hover': { /
hover selector for resultItem parent /
symbol: { /
change symbol style on hovering over parent (resultItem) /
fontSize: '1.4rem'
},
name: { /
change name style too on hovering over parent (resultItem) */
fontSize: '1.6rem',
color: 'blue'
}
}
}
}`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant