[Feature request] Dialog width/max-width enhancements
See original GitHub issueI suggest the following tweaks to the dialog component:
- Make max-width default to ‘none’ (i.e. remove it) instead of 290px
- Set default width to ‘auto’
What will it allow you to do that you can’t do today?
Currently, if you don’t specify the max-width
prop the dialog will span the entire screen (100% width). Imho it would be more appropriate to leave the default width at ‘auto’ so it fits the content and not set a max-width
explicitly.
If the user wants a full width dialog, they should use the full-width
prop which should append a class dialog--full-width
to the dialog element. Currently, this prop is not working as intended I believe as it targets the wrong element (see). (this might justify a separate bug report)
How will it make current work-arounds straightforward?
It is cumbersome to create dialogs that stretches to its content with the current model. max-width
has to be set to ‘none’ and you need to use a custom class to override the width
on the dialog.
What potential bugs and edge cases does it help to avoid?
I believe most users expect the dialog to fit the content and not stretch 100% by default. This fix will make usage of the dialog component more straightforward.
What do you think?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top GitHub Comments
.v-dialog { width: unset; }
Is it possible to make a dialog with size fitting its content? A VDialog spans 100% width even if width and max-width are omitted as this snippet.
https://codepen.io/michitaro/pen/yQpvOM