p-foundation / pink-app

The repository is created for learning adaptive web design and team collaboration through git and GitHub
https://p-foundation.github.io/pink-app/
0 stars 0 forks source link

Refactoring Media Queries for BEM Blocks: Contacts and Map #7

Closed naumch1k closed 7 months ago

naumch1k commented 10 months ago

Issue Description

Background:

The CSS media queries for the contacts and map BEM blocks utilize the max-width property, but there is a need to adjust the logic for proper handling of breakpoints. The transition currently occurs twice 😬 for each breakpoint (see video). When transitioning from 661px to 660px, the Contacts and Map sections switch from desktop to tablet view, and from 660px to 559px, the remaining sections shift from tablet to mobile view.

https://github.com/p-foundation/pink-app/assets/76534205/ce66060d-feb2-4e99-aaae-cd091bc023ad

Proposed Changes:

To proceed with max-width, the logic needs to change as follows:

.element {
  /* styles for 1200px and above */
}

@media screen and (max-width: 1199px) {
  .element {
    /* styles for screens from 660px to 1199px (excluding 1200px) */
  }
}

@media screen and (max-width: 659px) {
  .element {
    /* styles for screens from 320px to 660px (excluding 600px) */
  }
}

Quick Instruction for Working on the Issue

‼️ Before checking out to a new branch, ensure you have the latest updates from the main by running git pull command.

This pull request resolves [#123](https://github.com/username/repository/issues/123)
MarPostovik commented 7 months ago

.take

github-actions[bot] commented 7 months ago

@MarPostovik πŸ‘‹ Thanks for picking up this issue! πŸ™Œ Feel free to reach out if you need any help or have questions!