Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to refer to a StyleA? #82

Open
wenLiangcan opened this issue Apr 22, 2016 · 2 comments
Open

How to refer to a StyleA? #82

wenLiangcan opened this issue Apr 22, 2016 · 2 comments
Labels

Comments

@wenLiangcan
Copy link

How can I implement the CSS code below in ScalaCSS?

li:hover .item {
    display: block;
}
val item = style(
    display.none,
    /* ... */
)

val liStyle = style(
    &.hover(/* How to select `item` ? */)
)

Thanks in advanced!

@bpatters
Copy link

bpatters commented Mar 6, 2017

I'm curious about this too, haven't figured out to show an item when you hover on a parent item.

@nkgm
Copy link

nkgm commented Aug 21, 2019

val liStyle = style(
  &.hover(
    unsafeChild(".item")(
      display.block
    )
  )
)

would give:

.XYZ_Style-liStyle:hover .item {
  display: block;
}

BTW is it possible to customise the .XYZ_Style portion of the selector @japgolly?

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

No branches or pull requests

4 participants