Style header nav as pill buttons with clearer active state
Give nav links a visible translucent pill background and border so they read as buttons by default, and make the active tab solid white with the brand red text to clearly indicate the current page. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
f65fca09e4
commit
83030bff3a
@@ -64,32 +64,49 @@
|
|||||||
}
|
}
|
||||||
.nav {
|
.nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 0.5rem;
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
.nav a {
|
.nav a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: 0.3rem 0.6rem;
|
padding: 0.4rem 0.9rem;
|
||||||
border-radius: 4px;
|
border-radius: 999px;
|
||||||
opacity: 0.9;
|
background: rgba(255,255,255,0.12);
|
||||||
|
border: 1px solid rgba(255,255,255,0.25);
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1;
|
||||||
|
transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
|
||||||
}
|
}
|
||||||
.nav a:hover { opacity: 1; background: rgba(255,255,255,0.1); }
|
.nav a:hover {
|
||||||
.nav a.active {
|
|
||||||
background: rgba(255,255,255,0.22);
|
background: rgba(255,255,255,0.22);
|
||||||
opacity: 1;
|
border-color: rgba(255,255,255,0.4);
|
||||||
|
}
|
||||||
|
.nav a:active { transform: translateY(1px); }
|
||||||
|
.nav a.active {
|
||||||
|
background: #fff;
|
||||||
|
color: #b00d27;
|
||||||
|
border-color: #fff;
|
||||||
|
box-shadow: 0 1px 2px rgba(0,0,0,0.18);
|
||||||
}
|
}
|
||||||
.lang {
|
.lang {
|
||||||
background: rgba(255,255,255,0.18);
|
background: rgba(255,255,255,0.12);
|
||||||
color: inherit;
|
color: inherit;
|
||||||
border: 1px solid rgba(255,255,255,0.45);
|
border: 1px solid rgba(255,255,255,0.45);
|
||||||
padding: 0.35rem 0.85rem;
|
padding: 0.4rem 0.9rem;
|
||||||
border-radius: 4px;
|
border-radius: 999px;
|
||||||
font: inherit;
|
font: inherit;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
|
||||||
}
|
}
|
||||||
.lang:hover { background: rgba(255,255,255,0.28); }
|
.lang:hover {
|
||||||
|
background: rgba(255,255,255,0.22);
|
||||||
|
border-color: rgba(255,255,255,0.6);
|
||||||
|
}
|
||||||
|
.lang:active { transform: translateY(1px); }
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
.header { flex-wrap: wrap; }
|
.header { flex-wrap: wrap; }
|
||||||
|
|||||||
Reference in New Issue
Block a user