-
Notifications
You must be signed in to change notification settings - Fork 3.4k
SideNav: push-in instead of slideIn overlay. #2208
Comments
I'm exploring options with this. Right now, you could set the
Does that help? |
@cdonohue Using a property to toggle Now I am trying to do the same thing but with the |
While that does it, there is no transitioning when you toggle using |
I'm not sure if you guys are talking about the same issue I have at the moment: on |
For whoever is looking for this feature can take a look at my codepen: http://codepen.io/anon/pen/qdymaB Drop in directive:
LESS styles:
To make use of this: simply add sidenav-push-in attribute to your md-sidenav and add css class 'md-sidenav-push-in-target' to your content element. I firmly believe that this can be integrated to core fairly easily. |
Related #3027. |
+1 this happens to me as well, but i wouldn't like to use |
@FDIM answer is not consistent. The transform size should be adjusted according the current breakpoint. How to get the current size of sidenav in a less file ? I guess i should use $layout-breakpoint-XX combined to his solution. |
@sam2x I am not sure what is the situation now, but at the time I commented I am pretty sure the size was fixed to 304px. But I noticed that at certain size my content jumps a bit - something might have changed I guess. |
Yes the size is changed according the breakpoint. Actually the constants are the following :
On desktop, the following rule is applied (when width >= 1280px, sidenav is 400px, else it's ) :
Depending on mobile phone width (eg: iphone 4, i got 264px), the sidenav is calculated dynamically via width - $sidenav-min-space. I like your solution, but i need to find a way to use breakpoints with it (without modifying the original css file). |
Closing this issue as the requested outcome can be reproduce with the current api. |
@EladBezalel Please reopen. The proposed solution is a hack and is inconsistent with $mdSidenav service. There is no animation for example, and it effectively disables the See also #3027. |
@omeid there's an animation @ThomasBurleson @topherfangio thoughts? |
edit: nvm my comment, out of scope. |
+1 for reopening. I've used Using the
The flicker is caused due to So I used open and close independently to avoid having that flicker.
But using the above code, there is a considerable delay after pressing the close button and the sidenav closing. One more method I used was to add I think this is also related #3027. We should be able to toggle the sidenav independent of |
@EladBezalel Sorry for the delayed response, I do feel like this is a valid request because we do not currently implement any animation for this, and as users are saying, it is difficult to achieve. That said, we should definitely put some thought into how to best support all scenarios. It seems like we want the following use cases, and the ability to switch between them easily:
I am going to reopen so that we can continue the discussion on how to support this. |
+1 reopen |
In an ideal world, i would like the possibility to mix the behaviors, as you said @topherfangio "pinned" on smaller screens, then "drawer" on bigger ones. With an option to show or hide the sidenav when the page first loading happens, but not necessarily locked. |
This issue is closed as part of our ‘Surge Focus on Material 2' efforts. |
There is an issue with md-is-locked-open, it prevents toggle when clicked outside somewhere else on the screen. |
Is there a way for md-sidenav to open without overlaying main content?
I am trying to reproduce the scenario for right Side Nav on desktop described in the material design guidelines here : http://www.google.com/design/spec/layout/structure.html#structure-side-nav
Is there a way to open an md-sidenav and not overlap the main content? I searched for some md-sidenav-someoption css to achieve this with no luck, maybe another one does the trick?
I am using v0.8.3
Thanks for your help!
The text was updated successfully, but these errors were encountered: