Vuetify: 0.17.2
Vue: 2.5.7
Browsers: Chrome 62.0.3202.94
OS: Windows 7
Create a navigation drawer with some list tiles and set the mini-variant-width to a non-default value (e.g. 100). Now activate mini-variant.
See provided codepen for issue demonstration and fix.
Tile icons should be horizontally centered regardless of the width of the mini sidebar.
The icons are off-center because it assumes the default mini-variant-width of 80px to calculate the icon alignment. Also, if you do not wrap the v-list-tile-title in a v-list-tile-content parts of the title will still show in mini mode because the opacity override only applies to .list__tile__content. Same with the right hand icon (the up/down arrow) in case of using a list-tile-group.
https://codepen.io/anon/pen/pdLXWj
I am proposing a fix in my codepen which will make it work with any sidebar width. Also, with this solution the current CSS overrides to hide title, etc. is not technically needed because the icon/avatar will always fill the full width of the sidebar.
Duplicate of #2205 but I'll allow it.
The proposed fix makes <v-list-tile-content> jump when the drawer is closed.
To prevent this, instead of using min-width: 100% for aligning, you can manually specify the equal amount of padding for <v-list-tile-action>
An update on this issue. I spent some time tonight seeing how this might integrate and came up with 2 potential solutions:
Remove margin and center content when mini is closed
Pros: Works at any width of mini-variant
Cons: Creates a disjointed animation when changing from mini to non-mini
Don't remove margin
Pros: For the default drawer experience (a dense list), has a smooth expand/contract animation
Cons: Does not work with any width of mini-variant
For the purposes of the MD2 update, I'm going to go with option 2 for a few reasons:
I'm going to leave this issue open so we can maybe revisit in the future as it _is_ something I would like to have in the framework, it just doesn't feel right right now.
After a bunch of experimentation, I'm starting to double think the mini-variant changes and having it center despite the animation hurdles. Overall it increases the flexibility of the component.
So question: why is this closed? The behavior is honestly pretty janky right now when you hover to expand the menu. I mean, hover:true is a supported property in the docs, but it looks bad when you turn it on. The demo in the docs is pretty jumpy too. Is there a plan to address that more permanently?
https://codepen.io/gabaum10/pen/WqOdWY?&editable=true&editors=101
Most helpful comment
So question: why is this closed? The behavior is honestly pretty janky right now when you hover to expand the menu. I mean,
hover:trueis a supported property in the docs, but it looks bad when you turn it on. The demo in the docs is pretty jumpy too. Is there a plan to address that more permanently?https://codepen.io/gabaum10/pen/WqOdWY?&editable=true&editors=101