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

Improve responsive mode for mobile devices #3 #9

Merged
merged 4 commits into from
Nov 9, 2023

Conversation

mrbjnb
Copy link
Contributor

@mrbjnb mrbjnb commented Nov 3, 2023

  • Add reset.css for reseting the format of all browser.
  • Improve responsive mode on mobile devices by adjusting the margin and font-size of header and quote.
  • Make the same changes with smaller size.

site/reset.css Show resolved Hide resolved
site/index.css Outdated Show resolved Hide resolved
site/index.css Outdated Show resolved Hide resolved
site/reset.css Outdated
Comment on lines 120 to 122
q {
quotes: none;
}
Copy link
Contributor

@aredshift aredshift Nov 4, 2023

Choose a reason for hiding this comment

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

This removes the quotation marks, which I think should be added back.

Copy link
Contributor Author

@mrbjnb mrbjnb Nov 4, 2023

Choose a reason for hiding this comment

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

I will add it back to the index.css. Because this is the default reset.css for reseting every browser to 0 so I rather not touching it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good work! I'll just remark here that reading Eric Meyer's website, he did intend for the reset.css script to be tweaked as needed! So going forward we should feel free to tweak about as we please.

I don't particularly recommend that you just use this in its unaltered state in your own projects. It should be tweaked, edited, extended, and otherwise tuned to match your specific reset baseline. Fill in your preferred colors for the page, links, and so on.

https://meyerweb.com/eric/tools/css/reset/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see, then hmm, I should modify the reset.css then.

site/index.css Outdated
font-size: 1.2em;
}

#aquapants-quote {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a good implementation, but I don't like how it looks on taller screens (too crowded). Can we use a media query to only apply this rule to mobile horizontal screens (ie. max-height is 620px)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I can do that, I thought how much I can put in that max-width:620px query 😅 cause that that what the requirement is for (landscape mode)

Copy link
Contributor

@aredshift aredshift Nov 4, 2023

Choose a reason for hiding this comment

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

Ah I see, maybe I should have commented that block. When I added the max-width:620px query, I meant for that to be portrait mode. The idea of using 620px as a breakpoint was loosely based on this article and some arguments I read on StackOverflow regarding common breakpoints.

I think since landscape mode is just rotated portrait-mode, we should simply treat it with a max-height:620px media query. Your current implementation does not apply the style on most landscape-orientation phones, which often have a width (ie. the height of the phone in portrait mode) that is larger than 620px.

@aredshift aredshift self-assigned this Nov 4, 2023
@aredshift
Copy link
Contributor

Also, FYI, it is good practice to describe what changes you made and why you made them in the Pull Request description. This helps reviewers read your code and also helps future contributors come back to your PR and understand why we did things the way we did.

https://www.freecodecamp.org/news/how-to-write-a-pull-request-description/
https://www.pullrequest.com/blog/writing-a-great-pull-request-description/

No need to go into as much detail as the articles say, but some commentary would help a lot.

This is also partially our fault because we haven't provided a template yet. I'll make sure we do that!

@aredshift aredshift mentioned this pull request Nov 4, 2023
@aredshift
Copy link
Contributor

Also, when opening a PR that is addressing an existing issue in Github, it's particularly useful to mark the pull request using a simple comment like "closes #3" or alternatively, use the UI. More instructions here:

  1. Linking a pull request to an issue
  2. Using keywords in issues and pull requests

Added portrait mode, adjusted the size in landscape mode and added quotes back (reset.css remove it)
@mrbjnb mrbjnb changed the title improve spacing on mobile landscape mode #3 improve spacing on mobile landscape mode and portrait mode #3 Nov 4, 2023
@mrbjnb mrbjnb changed the title improve spacing on mobile landscape mode and portrait mode #3 Improve spacing on mobile landscape mode and portrait mode #3 Nov 4, 2023
@mrbjnb
Copy link
Contributor Author

mrbjnb commented Nov 4, 2023

Lmk if I need to add anything more.

@aredshift aredshift linked an issue Nov 4, 2023 that may be closed by this pull request
@aredshift
Copy link
Contributor

@mrbjnb Great improvements! Just a few more suggestions for cleaning it up before we merge and deploy.

Also note, on iPhone 12/13 portrait-mode (375/812) the quote looks a bit squished on the sides. We could probably solve this by adding a margin on both sides (I'm guessing the added css reset removed whatever margins used to be there).

Screenshot:
image

@mrbjnb mrbjnb changed the title Improve spacing on mobile landscape mode and portrait mode #3 Improve spacing on mobile landscape mode and portrait mode for small devices #3 Nov 5, 2023
@mrbjnb mrbjnb changed the title Improve spacing on mobile landscape mode and portrait mode for small devices #3 Improve responsive mode for mobile devices #3 Nov 5, 2023
@mrbjnb mrbjnb closed this Nov 5, 2023
@mrbjnb mrbjnb deleted the 3-improve-landscape-spacing branch November 5, 2023 04:01
@mrbjnb mrbjnb restored the 3-improve-landscape-spacing branch November 5, 2023 04:01
@mrbjnb mrbjnb reopened this Nov 5, 2023
@mrbjnb
Copy link
Contributor Author

mrbjnb commented Nov 5, 2023

Oh I tried to change the name of the branch, I guess it doesn't work xd

Copy link
Contributor

@aredshift aredshift left a comment

Choose a reason for hiding this comment

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

Thank you @mrbjnb! I have just a couple more nitpicks before we close this one out.

site/index.css Show resolved Hide resolved
site/index.css Outdated Show resolved Hide resolved
site/index.css Outdated Show resolved Hide resolved
site/index.css Outdated Show resolved Hide resolved
Copy link
Contributor

@aredshift aredshift left a comment

Choose a reason for hiding this comment

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

Sorry for the delay - Looks great to me! Thanks @mrbjnb for all your work, well done! We'll merge this and I'll notify you when the changes are deployed.

@aredshift aredshift merged commit ffc1456 into aquapants:main Nov 9, 2023
@aredshift
Copy link
Contributor

aredshift commented Nov 9, 2023

@mrbjnb your changes are officially deployed to aquapants.org!

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.

Improve spacing on mobile landscape mode
2 participants