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

small cleanup of small modal size #2629

Merged
merged 1 commit into from
Apr 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/Modal/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,8 @@ export default {
// Sizing
&--small {
.modal-container {
width: 390px;
max-width: 95%;
width: 400px;
max-width: 90%;
Comment on lines -728 to +729
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing 390px to 400px is just for the sake of using a x00 number here instead of a random feeling number. Changing 95% to 90% is in order to align with the other used max values of mostly 90%.

max-height: 90%;
}
}
Expand Down Expand Up @@ -756,7 +756,7 @@ export default {

// Make modal full screen on mobile
@media only screen and (max-width: math.div($breakpoint-mobile, 2)) {
&:not(&--small) .modal-container {
.modal-container {
Copy link
Contributor Author

@szaimen szaimen Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this media query to also address the small modal has the reason that I designed the small modal initially to be used e.g. for prompts with a limited height. In reality it gets used in many places mostly with a pretty big height. Adjusting this makes sure that the mobile view is aligned to the other sizes and also looks better, imo.

max-width: initial;
width: 100%;
max-height: initial;
Expand Down