Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

mdSideNav: Animation is broken when specifing "style="width: ...px" attribute #7483

Closed
vladimir-barsuchenko opened this issue Mar 9, 2016 · 3 comments
Labels
P4: minor Minor issues. May not be fixed without community contributions. pr: merge ready This PR is ready for a caretaker to review

Comments

@vladimir-barsuchenko
Copy link

I have a scenario when a sidenav has ability for resizing dynamicly.

For that purpose I add "style="width: ...px" attribute for <'md-sidenav'> element.
Resizing works perfectly.

But after attribute is added animation of the toggle is broken. Without it animation works.

Here is Codepen

Thanks!

@devversion
Copy link
Member

Note: Also caused when applying [flex] on the sidenav. (Applying flex on the sidenav is really common)

@topherfangio topherfangio added the P4: minor Minor issues. May not be fixed without community contributions. label Mar 16, 2016
@topherfangio topherfangio added this to the Backlog milestone Mar 16, 2016
EladBezalel added a commit that referenced this issue Mar 16, 2016
- Made `width` and `min-width` important for the animation

fixes #7483
@EladBezalel EladBezalel added the pr: merge ready This PR is ready for a caretaker to review label Mar 16, 2016
@flick36
Copy link

flick36 commented Apr 14, 2016

I don't think this is solved, codepen still doesn't work and in my project when i was in 1.1.0-rc2 i solved this by also setting the min-width & max-width to the custom width i set by default, for example:

md-sidenav, md-sidenav._md-closed._md-locked-open-add-active {
    width: 240px;
    min-width: 240px;
}

but now in 1.1.0-rc3 it doesn't work, it happens the same as the codepen, and the slideIn animation doesn't work, only when you hide the nav the animation it's working

unless i override the !important in this new "fix" so i can have something like this:

md-sidenav, md-sidenav._md-closed._md-locked-open-add-active {
    width: 240px;
    min-width: 240px !important;
}

@flick36
Copy link

flick36 commented Apr 14, 2016

the min-width's have to be important? cause if i remove those important declarations, the animation it's working:

http://codepen.io/flick36/pen/pyLQgP

ilovett pushed a commit to ilovett/material that referenced this issue Apr 22, 2016
- Made `width` and `min-width` important for the animation

fixes angular#7483

Closes angular#7605
@Splaktar Splaktar removed this from the - Backlog milestone Feb 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P4: minor Minor issues. May not be fixed without community contributions. pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants