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

Is there a way to change the css of an element by hovering on another element ? #145

Closed
aziz-boudi4 opened this issue Sep 22, 2016 · 1 comment

Comments

@aziz-boudi4
Copy link

aziz-boudi4 commented Sep 22, 2016

I'm trying to show hidden content by hovering on a visible element.

I have a visible {p} element and a hidden list {ul}.

how can I make the {ul} list visible by hovering on the {p} ?

                    const stylesHeader = StyleSheet.create({

                      dropdown : {
                          position: relative;
                         display: inline-block;
                      },

                     dropdown-content : {
                          display: none;
                          position: absolute;
                          background-color: #f9f9f9;
                          min-width: 160px;
                          box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
                          padding: 12px 16px;
                       }, 

Can I do something like that ?
I want to display dropdown-content by hovering on dropdown

                        `dropdown: {
                             "hover": {
                                 dropdown-content {
                                     display: block;
                                  }
                                }
                            }
                         });`


                          <div className="dropdown">
                                <span>Hover over me</span>
                                <div className="dropdown-content">
                                       <p>Test 1</p>
                                       <p>Test 2</p>
                                       <p>Test 3</p>
                                       <p>Test 4</p>
                                </div>
                            </div>`
@xymostech
Copy link
Contributor

There isn't a way to do this right now, this is a duplicate of #10, you can read through that to see progress on that and hacks to achieve this right now.

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

No branches or pull requests

2 participants