Slide the nav underline when changing tabs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -119,6 +119,7 @@ html[lang="fa"] body {
|
|||||||
top: 0;
|
top: 0;
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
view-transition-name: navbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-container {
|
.nav-container {
|
||||||
@@ -156,6 +157,7 @@ html[lang="fa"] body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
|
position: relative;
|
||||||
color: var(--navbar-muted);
|
color: var(--navbar-muted);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -167,8 +169,16 @@ html[lang="fa"] body {
|
|||||||
color: var(--navbar-fg);
|
color: var(--navbar-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link.active {
|
.nav-link.active::after {
|
||||||
border-bottom: 2px solid var(--navbar-accent);
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
height: 2px;
|
||||||
|
background: var(--navbar-accent);
|
||||||
|
border-radius: 2px;
|
||||||
|
view-transition-name: nav-indicator;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-actions {
|
.nav-actions {
|
||||||
@@ -218,6 +228,44 @@ html[lang="fa"] body {
|
|||||||
max-width: var(--content-max);
|
max-width: var(--content-max);
|
||||||
margin: 2rem auto;
|
margin: 2rem auto;
|
||||||
padding: 0 2rem;
|
padding: 0 2rem;
|
||||||
|
view-transition-name: main;
|
||||||
|
}
|
||||||
|
|
||||||
|
@view-transition {
|
||||||
|
navigation: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
::view-transition-group(navbar),
|
||||||
|
::view-transition-old(navbar),
|
||||||
|
::view-transition-new(navbar) {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::view-transition-old(main) {
|
||||||
|
animation: 180ms ease both main-leave;
|
||||||
|
}
|
||||||
|
|
||||||
|
::view-transition-new(main) {
|
||||||
|
animation: 180ms ease both main-enter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes main-leave {
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes main-enter {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(6px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
@view-transition {
|
||||||
|
navigation: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-grid {
|
.page-grid {
|
||||||
|
|||||||
Reference in New Issue
Block a user