Force mobile nav rules with !important to defeat stale CSS cache
After multiple deploys the mobile nav still wraps into a tall stack on some user devices. The CSS source is correct, so the most likely cause is Safari aggressively caching the previous stylesheet. Adding !important to the @media block guarantees that once the new CSS actually parses, no leftover specificity quirk or cached partial keeps the wrapped layout alive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+14
-12
@@ -238,29 +238,31 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* On narrow screens, switch to horizontal scrolling so all 6 tabs stay
|
/* On narrow screens, switch to horizontal scrolling so all 6 tabs stay
|
||||||
on a single row instead of breaking into a tall stack. Placed after
|
on a single row instead of breaking into a tall stack. !important is
|
||||||
the base .nav-btn rules so its specificity-tie-breaker wins. */
|
used defensively here — any cached older CSS or future style overrides
|
||||||
|
shouldn't be able to bring back the wrapped layout on phones. */
|
||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
.main-nav {
|
.main-nav {
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap !important;
|
||||||
overflow-x: auto;
|
overflow-x: auto !important;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden !important;
|
||||||
scroll-snap-type: x proximity;
|
scroll-snap-type: x proximity;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
gap: 4px;
|
gap: 4px !important;
|
||||||
padding: 6px;
|
padding: 6px !important;
|
||||||
}
|
}
|
||||||
.main-nav::-webkit-scrollbar {
|
.main-nav::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.nav-btn {
|
.nav-btn {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto !important;
|
||||||
min-width: auto;
|
min-width: auto !important;
|
||||||
white-space: nowrap;
|
max-width: none !important;
|
||||||
|
white-space: nowrap !important;
|
||||||
scroll-snap-align: start;
|
scroll-snap-align: start;
|
||||||
padding: 10px 14px;
|
padding: 10px 14px !important;
|
||||||
font-size: 0.88rem;
|
font-size: 0.88rem !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user