mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Media queries improvements
This commit is contained in:
@@ -33,7 +33,7 @@ footer #copyright {
|
|||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 768px) {
|
@media only screen and (max-width: 1024px) {
|
||||||
footer {
|
footer {
|
||||||
padding: 3rem 5rem;
|
padding: 3rem 5rem;
|
||||||
|
|
||||||
|
|||||||
@@ -89,8 +89,9 @@ header #nav-toggler {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 768px) {
|
@media only screen and (max-width: 1024px) {
|
||||||
header, nav {
|
header, nav {
|
||||||
|
margin: 1.5rem auto;
|
||||||
padding: 0.938rem 1.25rem;
|
padding: 0.938rem 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ function loadBurger() {
|
|||||||
mobileNavigation.style.top = burgerOpen
|
mobileNavigation.style.top = burgerOpen
|
||||||
? `calc(${header.getBoundingClientRect().y}px + ${
|
? `calc(${header.getBoundingClientRect().y}px + ${
|
||||||
header.getBoundingClientRect().height
|
header.getBoundingClientRect().height
|
||||||
}px + 0.625rem)`
|
}px)`
|
||||||
: 'initial';
|
: 'initial';
|
||||||
mobileNavigation.style.left = burgerOpen
|
mobileNavigation.style.left = burgerOpen
|
||||||
? `${headerInitialLeftPosition}px`
|
? `${headerInitialLeftPosition}px`
|
||||||
: 'initial';
|
: 'initial';
|
||||||
document.querySelector('main').style.marginTop = burgerOpen
|
document.querySelector('main').style.marginTop = burgerOpen
|
||||||
? `calc(${header.getBoundingClientRect().height}px + 5rem)`
|
? `calc(${header.getBoundingClientRect().height}px + 3rem)`
|
||||||
: '0px';
|
: '0px';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ function resetBurger() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resetBurgerWhenWindowResized() {
|
function resetBurgerWhenWindowResized() {
|
||||||
if (window.innerWidth > 768) {
|
if (window.innerWidth > 1024) {
|
||||||
resetBurger();
|
resetBurger();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user