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

Refer to child properties in pseudo selector #1032

@AlphaGeek

Description

@AlphaGeek

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'
}
}
}
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions