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

style(frontend): put buttons at the extreme bottoms for smaller screens [GIX-3015] #2555

Conversation

AntonioVentilii-DFINITY
Copy link
Contributor

Motivation

It was noticed that the buttons in modals for smaller screens are not at the extreme bottom, if the phone is longer.

Before

Screenshot 2024-09-27 at 10 38 10 Screenshot 2024-09-27 at 10 37 58 Screenshot 2024-09-27 at 10 37 34

After

Screenshot 2024-09-27 at 10 36 26 Screenshot 2024-09-27 at 10 36 41 Screenshot 2024-09-27 at 10 37 02 Screenshot 2024-09-27 at 10 37 14

@AntonioVentilii-DFINITY AntonioVentilii-DFINITY changed the title style(frontend): put buttons at the extreme bottoms for smaller screens style(frontend): put buttons at the extreme bottoms for smaller screens [GIX-3015] Sep 27, 2024
padding-inline: var(--padding-2_5x);

@media (min-width: 768px) {
Copy link
Member

@peterpeterparker peterpeterparker Sep 27, 2024

Choose a reason for hiding this comment

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

You can use @include media.min-width(medium) { from the mixin in gix cmp.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you! done!

@@ -145,7 +145,12 @@ div.modal {
border-radius: 0;

div.content {
height: 100vh;
Copy link
Member

Choose a reason for hiding this comment

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

Sorry did not noticed it before, that's correct?

  1. The inner content is not 100vh no?
  2. On desktop we don't want 100vh?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right: that was a poor solution. After a few iterations, I found that the best way is to set flex: 1 (see last commit.

For context, before this last solution, the ideal would have been 100%, but it was not working... The 100vh worked without going outside the parent... (see video below)

Screen.Recording.2024-09-27.at.13.22.57.mov

Copy link
Member

@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

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

LGTM, thx

@AntonioVentilii-DFINITY AntonioVentilii-DFINITY merged commit b6b1a60 into main Sep 29, 2024
7 checks passed
@AntonioVentilii-DFINITY AntonioVentilii-DFINITY deleted the style(frontend)/put-buttons-at-the-extreme-bottoms-for-smaller-screens branch September 29, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants