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

Layouts 📐 #14

Closed
robinmetral opened this issue Feb 6, 2019 · 1 comment
Closed

Layouts 📐 #14

robinmetral opened this issue Feb 6, 2019 · 1 comment

Comments

@robinmetral
Copy link
Owner

robinmetral commented Feb 6, 2019

Style admin panel with this

@robinmetral robinmetral transferred this issue from another repository Feb 11, 2019
@robinmetral
Copy link
Owner Author

robinmetral commented Feb 12, 2019

Got the panel (todo: rename Admin into Panel) to toggle open and closed with a dynamic styled-components display attribute. (182d0a8).

Now I need to animate the opening and closing of the panel.
I don't think it's possible with display, I could switch to this hack: (source)

div {
  border: 1px solid #eee;
}
div > ul {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.5s linear;
}
div:hover > ul {
  visibility: visible;
  opacity: 1;
}
<div>
  <ul>
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
  </ul>
</div>

A better animation would be to slide from the right. Two solutions:

  1. Either I'd need to set a width:0; and transition into 50% width
    Edit: the problem with transitioning width is that the text wraps and unwraps instead of just sliding
  2. Or place the panel outside of the screen to the right (like in this example).

@robinmetral robinmetral changed the title Style 💅 Layouts 📐 Feb 13, 2019
@robinmetral robinmetral mentioned this issue Feb 16, 2019
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

1 participant