Fixed navbar flicker on windows

This commit is contained in:
Cuptain 2024-11-05 11:56:10 +11:00
parent 3e667f004d
commit 24f32cdba5
2 changed files with 12 additions and 7 deletions

View File

@ -19,10 +19,10 @@
r = document.getElementById('wrapper');
})
function setMargin(){
document.documentElement.style.setProperty('--navMargin', '17rem');
r.style.setProperty('--navMargin', '17rem');
}
function unsetMargin(){
document.documentElement.style.setProperty('--navMargin', '5rem');
r.style.setProperty('--navMargin', '5rem');
}
function initialColor() {
@ -70,12 +70,13 @@
--text-secondary: #ececec;
--bg-secondary: #2c2c33;
--bg-primary: #141418;
--navMargin: 5rem;
background-color: var(--bg-secondary);
}
#wrapper{
--accent-color: purple;
--navMargin: 5rem;
}
.navbar{
z-index: 5;

View File

@ -91,11 +91,12 @@ function unextend(){
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
}
.nav-item{
width: 100%;
display: flex;
white-space: nowrap;
}
.nav-item:last-child{
margin-top: auto;
@ -120,13 +121,16 @@ function unextend(){
fill: var(--text-primary);
transition: 300ms;
text-decoration: none;
width: 17rem;
}
.nav-icon{
width: 3rem;
margin: 0 1rem;
white-space: nowrap;
align-self: left;
}
.nav-link:hover{
fill: purple;
fill:var(--accent-color);
background-color: var(--bg-secondary);
}
@ -150,14 +154,14 @@ function unextend(){
}
.navbar:hover .logo svg {
transform: rotate(-180deg);
fill: purple;
fill:var(--accent-color);
}
.logo .link-text{
color: var(--text-secondary);
transition: 300ms;
}
.navbar:hover .logo .link-text{
color:purple;
color:var(--accent-color);
transition: 300ms;
}
</style>